@abi-software/flatmapvuer 0.6.3-vue.3.9 → 1.0.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.
Files changed (38) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +120 -120
  3. package/cypress.config.js +23 -23
  4. package/dist/flatmapvuer.js +15894 -16259
  5. package/dist/flatmapvuer.umd.cjs +132 -145
  6. package/dist/index.html +17 -17
  7. package/dist/style.css +1 -1
  8. package/package.json +95 -95
  9. package/public/index.html +17 -17
  10. package/reporter-config.json +9 -9
  11. package/src/App.vue +310 -310
  12. package/src/assets/_variables.scss +43 -43
  13. package/src/assets/styles.scss +5 -5
  14. package/src/components/AnnotationTool.vue +450 -446
  15. package/src/components/EventBus.js +3 -3
  16. package/src/components/ExternalResourceCard.vue +107 -107
  17. package/src/components/FlatmapVuer.vue +2600 -2531
  18. package/src/components/MultiFlatmapVuer.vue +731 -731
  19. package/src/components/ProvenancePopup.vue +503 -495
  20. package/src/components/SelectionsGroup.vue +255 -255
  21. package/src/components/Tooltip.vue +50 -50
  22. package/src/components/TreeControls.vue +231 -231
  23. package/src/components/index.js +7 -7
  24. package/src/components/legends/DynamicLegends.vue +106 -106
  25. package/src/components/legends/SvgLegends.vue +112 -112
  26. package/src/icons/flatmap-marker.js +1 -1
  27. package/src/icons/fonts/mapicon-species.svg +14 -14
  28. package/src/icons/fonts/mapicon-species.ttf +0 -0
  29. package/src/icons/fonts/mapicon-species.woff +0 -0
  30. package/src/icons/mapicon-species-style.css +42 -42
  31. package/src/icons/yellowstar.js +5 -5
  32. package/src/legends/legend.svg +25 -25
  33. package/src/main.js +19 -19
  34. package/src/services/flatmapQueries.js +453 -453
  35. package/src/store/index.js +23 -23
  36. package/vite.config.js +73 -73
  37. package/vite.static-build.js +12 -12
  38. package/vuese-generator.js +64 -64
@@ -1,231 +1,231 @@
1
- <template>
2
- <div class="container">
3
- <el-row>
4
- <el-col :span="12">
5
- <div class="title-text">Systems</div>
6
- </el-col>
7
- </el-row>
8
- <div class="tree-container">
9
- <el-tree
10
- ref="tree"
11
- node-key="key"
12
- show-checkbox
13
- :check-strictly="false"
14
- :data="treeData"
15
- :render-after-expand="false"
16
- :default-expanded-keys="defaultExpandedKeys"
17
- @check="checkChanged"
18
- >
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>
34
- </el-tree>
35
- </div>
36
- </div>
37
- </template>
38
-
39
- <script>
40
- /* eslint-disable no-alert, no-console */
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'
48
-
49
- /**
50
- * A vue component for toggling visibility of various regions.
51
- */
52
- export default {
53
- name: 'TreeControls',
54
- components: {
55
- Checkbox,
56
- CheckboxGroup,
57
- ColorPicker,
58
- Row,
59
- Tree,
60
- },
61
- props: {
62
- treeData: {
63
- type: Array,
64
- default: function () {
65
- return []
66
- },
67
- },
68
- active: {
69
- type: String,
70
- default: '',
71
- },
72
- hover: {
73
- type: String,
74
- default: '',
75
- },
76
- },
77
- data: function () {
78
- return {
79
- defaultExpandedKeys: ['All'],
80
- }
81
- },
82
- unmounted: function () {
83
- this.sortedPrimitiveGroups = undefined
84
- },
85
- methods: {
86
- nodeIsActive: function (data) {
87
- return this.active === data.models
88
- },
89
- nodeIsHover: function (data) {
90
- return this.hover === data.models
91
- },
92
- changeActiveByNode: function (data) {
93
- if (data.models) {
94
- this.$emit('change-active', data.models)
95
- }
96
- },
97
- changeHoverByNode: function () {
98
- //if (data.models) {
99
- // this.$emit("change-active", data.models);
100
- //}
101
- },
102
- checkChanged: function (node, data) {
103
- const isChecked = data.checkedKeys.includes(node.key)
104
- if (node.key === 'All') {
105
- this.$emit('checkAll', isChecked)
106
- } else {
107
- this.$emit('changed', { key: node.key, value: isChecked })
108
- }
109
- },
110
- getBackgroundStyles: function (node) {
111
- if ('colour' in node) {
112
- return { background: node.colour }
113
- }
114
- return {}
115
- },
116
- },
117
- }
118
- </script>
119
-
120
- <style lang="scss" scoped>
121
-
122
- .checkbox-container {
123
- display: flex;
124
- cursor: pointer;
125
- }
126
-
127
- .tree-controls {
128
- position: absolute;
129
- bottom: 0px;
130
- transition: all 1s ease;
131
-
132
- &:focus {
133
- outline: none;
134
- }
135
- }
136
-
137
- .container {
138
- text-align: left;
139
- overflow: none;
140
- padding-top: 7px;
141
- padding-bottom: 16px;
142
- background: #ffffff;
143
- }
144
-
145
- .title-text {
146
- width: 59px;
147
- height: 20px;
148
- color: rgb(48, 49, 51);
149
- font-size: 14px;
150
- font-weight: normal;
151
- line-height: 20px;
152
- margin-left: 8px;
153
- }
154
-
155
- .all-checkbox {
156
- float: right;
157
- }
158
-
159
- .tree-container {
160
- width: 260px;
161
- border: 1px solid rgb(144, 147, 153);
162
- border-radius: 4px;
163
- background: #ffffff;
164
- margin-top: 6px;
165
- scrollbar-width: thin;
166
-
167
- :deep(.el-tree) {
168
- max-height: 240px;
169
- min-height: 130px;
170
- overflow: auto;
171
- &::-webkit-scrollbar {
172
- width: 4px;
173
- }
174
-
175
- &::-webkit-scrollbar-thumb {
176
- border-radius: 10px;
177
- box-shadow: inset 0 0 6px #c0c4cc;
178
- }
179
- }
180
-
181
- :deep(.el-tree-node__content) {
182
- height: 22px;
183
- }
184
- }
185
-
186
- :deep(.el-checkbox__input) {
187
- &.is-indeterminate,
188
- &.is-checked {
189
- .el-checkbox__inner {
190
- background-color: $app-primary-color;
191
- border-color: $app-primary-color;
192
- }
193
- }
194
- }
195
-
196
- :deep(
197
- .el-tree-node__children
198
- .el-tree-node__children
199
- .el-tree-node__content
200
- > label.el-checkbox) {
201
- display: none;
202
- }
203
-
204
- :deep(.el-checkbox__label) {
205
- padding-left: 5px;
206
- color: $app-primary-color !important;
207
- font-size: 12px;
208
- font-weight: 500;
209
- letter-spacing: 0px;
210
- line-height: 14px;
211
- }
212
-
213
- .activeItem {
214
- background-color: #bbb !important;
215
- }
216
-
217
- .region-tree-node {
218
- flex: 1;
219
- color: $app-primary-color !important;
220
- display: flex;
221
- font-size: 12px;
222
- line-height: 14px;
223
- padding-left: 0px;
224
- background-color: #fff;
225
- width: 100%;
226
- }
227
-
228
- .hoverItem {
229
- background-color: #eee !important;
230
- }
231
- </style>
1
+ <template>
2
+ <div class="container">
3
+ <el-row>
4
+ <el-col :span="12">
5
+ <div class="title-text">Systems</div>
6
+ </el-col>
7
+ </el-row>
8
+ <div class="tree-container">
9
+ <el-tree
10
+ ref="tree"
11
+ node-key="key"
12
+ show-checkbox
13
+ :check-strictly="false"
14
+ :data="treeData"
15
+ :render-after-expand="false"
16
+ :default-expanded-keys="defaultExpandedKeys"
17
+ @check="checkChanged"
18
+ >
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>
34
+ </el-tree>
35
+ </div>
36
+ </div>
37
+ </template>
38
+
39
+ <script>
40
+ /* eslint-disable no-alert, no-console */
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'
48
+
49
+ /**
50
+ * A vue component for toggling visibility of various regions.
51
+ */
52
+ export default {
53
+ name: 'TreeControls',
54
+ components: {
55
+ Checkbox,
56
+ CheckboxGroup,
57
+ ColorPicker,
58
+ Row,
59
+ Tree,
60
+ },
61
+ props: {
62
+ treeData: {
63
+ type: Array,
64
+ default: function () {
65
+ return []
66
+ },
67
+ },
68
+ active: {
69
+ type: String,
70
+ default: '',
71
+ },
72
+ hover: {
73
+ type: String,
74
+ default: '',
75
+ },
76
+ },
77
+ data: function () {
78
+ return {
79
+ defaultExpandedKeys: ['All'],
80
+ }
81
+ },
82
+ unmounted: function () {
83
+ this.sortedPrimitiveGroups = undefined
84
+ },
85
+ methods: {
86
+ nodeIsActive: function (data) {
87
+ return this.active === data.models
88
+ },
89
+ nodeIsHover: function (data) {
90
+ return this.hover === data.models
91
+ },
92
+ changeActiveByNode: function (data) {
93
+ if (data.models) {
94
+ this.$emit('change-active', data.models)
95
+ }
96
+ },
97
+ changeHoverByNode: function () {
98
+ //if (data.models) {
99
+ // this.$emit("change-active", data.models);
100
+ //}
101
+ },
102
+ checkChanged: function (node, data) {
103
+ const isChecked = data.checkedKeys.includes(node.key)
104
+ if (node.key === 'All') {
105
+ this.$emit('checkAll', isChecked)
106
+ } else {
107
+ this.$emit('changed', { key: node.key, value: isChecked })
108
+ }
109
+ },
110
+ getBackgroundStyles: function (node) {
111
+ if ('colour' in node) {
112
+ return { background: node.colour }
113
+ }
114
+ return {}
115
+ },
116
+ },
117
+ }
118
+ </script>
119
+
120
+ <style lang="scss" scoped>
121
+
122
+ .checkbox-container {
123
+ display: flex;
124
+ cursor: pointer;
125
+ }
126
+
127
+ .tree-controls {
128
+ position: absolute;
129
+ bottom: 0px;
130
+ transition: all 1s ease;
131
+
132
+ &:focus {
133
+ outline: none;
134
+ }
135
+ }
136
+
137
+ .container {
138
+ text-align: left;
139
+ overflow: none;
140
+ padding-top: 7px;
141
+ padding-bottom: 16px;
142
+ background: #ffffff;
143
+ }
144
+
145
+ .title-text {
146
+ width: 59px;
147
+ height: 20px;
148
+ color: rgb(48, 49, 51);
149
+ font-size: 14px;
150
+ font-weight: normal;
151
+ line-height: 20px;
152
+ margin-left: 8px;
153
+ }
154
+
155
+ .all-checkbox {
156
+ float: right;
157
+ }
158
+
159
+ .tree-container {
160
+ width: 260px;
161
+ border: 1px solid rgb(144, 147, 153);
162
+ border-radius: 4px;
163
+ background: #ffffff;
164
+ margin-top: 6px;
165
+ scrollbar-width: thin;
166
+
167
+ :deep(.el-tree) {
168
+ max-height: 240px;
169
+ min-height: 130px;
170
+ overflow: auto;
171
+ &::-webkit-scrollbar {
172
+ width: 4px;
173
+ }
174
+
175
+ &::-webkit-scrollbar-thumb {
176
+ border-radius: 10px;
177
+ box-shadow: inset 0 0 6px #c0c4cc;
178
+ }
179
+ }
180
+
181
+ :deep(.el-tree-node__content) {
182
+ height: 22px;
183
+ }
184
+ }
185
+
186
+ :deep(.el-checkbox__input) {
187
+ &.is-indeterminate,
188
+ &.is-checked {
189
+ .el-checkbox__inner {
190
+ background-color: $app-primary-color;
191
+ border-color: $app-primary-color;
192
+ }
193
+ }
194
+ }
195
+
196
+ :deep(
197
+ .el-tree-node__children
198
+ .el-tree-node__children
199
+ .el-tree-node__content
200
+ > label.el-checkbox) {
201
+ display: none;
202
+ }
203
+
204
+ :deep(.el-checkbox__label) {
205
+ padding-left: 5px;
206
+ color: $app-primary-color !important;
207
+ font-size: 12px;
208
+ font-weight: 500;
209
+ letter-spacing: 0px;
210
+ line-height: 14px;
211
+ }
212
+
213
+ .activeItem {
214
+ background-color: #bbb !important;
215
+ }
216
+
217
+ .region-tree-node {
218
+ flex: 1;
219
+ color: $app-primary-color !important;
220
+ display: flex;
221
+ font-size: 12px;
222
+ line-height: 14px;
223
+ padding-left: 0px;
224
+ background-color: #fff;
225
+ width: 100%;
226
+ }
227
+
228
+ .hoverItem {
229
+ background-color: #eee !important;
230
+ }
231
+ </style>
@@ -1,7 +1,7 @@
1
- // The Vue build version to load with the `import` command
2
- // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
- import FlatmapVuer from './FlatmapVuer.vue'
4
- import MultiFlatmapVuer from './MultiFlatmapVuer.vue'
5
- import Tooltip from './Tooltip.vue'
6
-
7
- export { FlatmapVuer, MultiFlatmapVuer, Tooltip}
1
+ // The Vue build version to load with the `import` command
2
+ // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
+ import FlatmapVuer from './FlatmapVuer.vue'
4
+ import MultiFlatmapVuer from './MultiFlatmapVuer.vue'
5
+ import Tooltip from './Tooltip.vue'
6
+
7
+ export { FlatmapVuer, MultiFlatmapVuer, Tooltip}
@@ -1,106 +1,106 @@
1
- <template>
2
- <div>
3
- <el-row>
4
- <el-col :span="12">
5
- <div class="title-display-text">{{ title }}</div>
6
- </el-col>
7
- </el-row>
8
- <div class="legends-group">
9
- <el-row
10
- v-for="item in lists"
11
- :key="item[identifierKey]"
12
- :label="item[identifierKey]"
13
- >
14
- <div class="legends-container">
15
- <div
16
- class="legends-visual"
17
- :style="{ background: item[colourKey] }"
18
- ></div>
19
- <div class="label">
20
- {{ capitalise(item[identifierKey]) }}
21
- </div>
22
- </div>
23
- </el-row>
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <script>
29
- /* eslint-disable no-alert, no-console */
30
- import Vue from 'vue'
31
- import { ElCol as Col, ElRow as Row } from 'element-plus'
32
- Vue.use(Col)
33
- Vue.use(Row)
34
-
35
- export default {
36
- name: 'DynamicLegends',
37
- props: {
38
- identifierKey: {
39
- type: String,
40
- default: 'id',
41
- },
42
- colourKey: {
43
- type: String,
44
- default: 'colour',
45
- },
46
- title: {
47
- type: String,
48
- default: '',
49
- },
50
- lists: {
51
- type: Array,
52
- default: function () {
53
- return []
54
- },
55
- },
56
- },
57
- methods: {
58
- capitalise: function (label) {
59
- return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
60
- },
61
- },
62
- }
63
- </script>
64
-
65
- <style lang="scss" scoped>
66
- @use 'element-plus/theme-chalk/src/row';
67
-
68
- .legends-visual {
69
- margin: 2px;
70
- width: 11px;
71
- margin-right: 5px;
72
- display: inline-block;
73
- }
74
-
75
- .title-display-text {
76
- width: 59px;
77
- height: 20px;
78
- color: rgb(48, 49, 51);
79
- font-size: 14px;
80
- font-weight: normal;
81
- line-height: 20px;
82
- margin-left: 8px;
83
- }
84
-
85
- .label {
86
- padding-left: 35px;
87
- color: $app-primary-color;
88
- font-size: 12px;
89
- font-weight: 500;
90
- letter-spacing: 0px;
91
- line-height: 14px;
92
- }
93
-
94
- .legends-container {
95
- display: flex;
96
- cursor: pointer;
97
- }
98
-
99
- .legends-group {
100
- width: 224;
101
- border: 1px solid rgb(144, 147, 153);
102
- border-radius: 4px;
103
- background: #ffffff;
104
- padding: 18px;
105
- }
106
- </style>
1
+ <template>
2
+ <div>
3
+ <el-row>
4
+ <el-col :span="12">
5
+ <div class="title-display-text">{{ title }}</div>
6
+ </el-col>
7
+ </el-row>
8
+ <div class="legends-group">
9
+ <el-row
10
+ v-for="item in lists"
11
+ :key="item[identifierKey]"
12
+ :label="item[identifierKey]"
13
+ >
14
+ <div class="legends-container">
15
+ <div
16
+ class="legends-visual"
17
+ :style="{ background: item[colourKey] }"
18
+ ></div>
19
+ <div class="label">
20
+ {{ capitalise(item[identifierKey]) }}
21
+ </div>
22
+ </div>
23
+ </el-row>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <script>
29
+ /* eslint-disable no-alert, no-console */
30
+ import Vue from 'vue'
31
+ import { ElCol as Col, ElRow as Row } from 'element-plus'
32
+ Vue.use(Col)
33
+ Vue.use(Row)
34
+
35
+ export default {
36
+ name: 'DynamicLegends',
37
+ props: {
38
+ identifierKey: {
39
+ type: String,
40
+ default: 'id',
41
+ },
42
+ colourKey: {
43
+ type: String,
44
+ default: 'colour',
45
+ },
46
+ title: {
47
+ type: String,
48
+ default: '',
49
+ },
50
+ lists: {
51
+ type: Array,
52
+ default: function () {
53
+ return []
54
+ },
55
+ },
56
+ },
57
+ methods: {
58
+ capitalise: function (label) {
59
+ return label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
60
+ },
61
+ },
62
+ }
63
+ </script>
64
+
65
+ <style lang="scss" scoped>
66
+ @use 'element-plus/theme-chalk/src/row';
67
+
68
+ .legends-visual {
69
+ margin: 2px;
70
+ width: 11px;
71
+ margin-right: 5px;
72
+ display: inline-block;
73
+ }
74
+
75
+ .title-display-text {
76
+ width: 59px;
77
+ height: 20px;
78
+ color: rgb(48, 49, 51);
79
+ font-size: 14px;
80
+ font-weight: normal;
81
+ line-height: 20px;
82
+ margin-left: 8px;
83
+ }
84
+
85
+ .label {
86
+ padding-left: 35px;
87
+ color: $app-primary-color;
88
+ font-size: 12px;
89
+ font-weight: 500;
90
+ letter-spacing: 0px;
91
+ line-height: 14px;
92
+ }
93
+
94
+ .legends-container {
95
+ display: flex;
96
+ cursor: pointer;
97
+ }
98
+
99
+ .legends-group {
100
+ width: 224;
101
+ border: 1px solid rgb(144, 147, 153);
102
+ border-radius: 4px;
103
+ background: #ffffff;
104
+ padding: 18px;
105
+ }
106
+ </style>