@abi-software/flatmapvuer 0.5.6 → 0.5.7-alpha

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