@abi-software/map-utilities 1.7.8-beta.2 → 1.7.8-demo.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/dist/map-utilities.js +10029 -9951
- package/dist/map-utilities.umd.cjs +60 -58
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CompetencyQueries/CompetencyQueries.js +51 -0
- package/src/components/ConnectivityList/ConnectivityList.vue +151 -151
- package/src/components/ConnectivityList/ConnectivityListNew.vue +580 -0
- package/src/components/Tooltip/CreateTooltipContent.vue +38 -139
- package/src/components/index.js +4 -0
- package/src/components/utilities.js +8 -0
- package/src/components.d.ts +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container class="create-container">
|
|
3
3
|
<el-header height="30px" class="header">
|
|
4
|
-
<div>{{
|
|
4
|
+
<div>Create {{ createData.shape }}</div>
|
|
5
5
|
</el-header>
|
|
6
6
|
<el-main class="slides-block">
|
|
7
|
-
<span class="create-text"
|
|
8
|
-
|
|
7
|
+
<span class="create-text">
|
|
8
|
+
Primitives will be created in the __annotation region
|
|
9
9
|
</span>
|
|
10
10
|
<el-row class="row" v-show="showPoint">
|
|
11
11
|
<el-col :offset="0" :span="8">
|
|
@@ -22,21 +22,11 @@
|
|
|
22
22
|
Region:
|
|
23
23
|
</el-col>
|
|
24
24
|
<el-col :offset="0" :span="16">
|
|
25
|
-
<el-
|
|
26
|
-
class="autocomplete-box"
|
|
27
|
-
:fit-input-width="true"
|
|
25
|
+
<el-input
|
|
28
26
|
v-model="region"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
popper-class="autocomplete-popper"
|
|
33
|
-
>
|
|
34
|
-
<template #default="{ item }">
|
|
35
|
-
<div class="suggested-value">
|
|
36
|
-
{{ item.value }}
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
</el-autocomplete>
|
|
27
|
+
placeholder="__annotation"
|
|
28
|
+
size="small"
|
|
29
|
+
/>
|
|
40
30
|
</el-col>
|
|
41
31
|
</el-row>
|
|
42
32
|
<el-row class="row">
|
|
@@ -44,36 +34,19 @@
|
|
|
44
34
|
Group:
|
|
45
35
|
</el-col>
|
|
46
36
|
<el-col :offset="0" :span="16">
|
|
47
|
-
<el-
|
|
48
|
-
class="autocomplete-box"
|
|
49
|
-
:disabled="createData.editingIndex > -1"
|
|
50
|
-
:fit-input-width="true"
|
|
37
|
+
<el-input
|
|
51
38
|
v-model="group"
|
|
52
39
|
:placeholder="createData.shape"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
popper-class="autocomplete-popper"
|
|
56
|
-
>
|
|
57
|
-
<template #default="{ item }">
|
|
58
|
-
<div class="suggested-value">
|
|
59
|
-
{{ item.value }}
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
62
|
-
</el-autocomplete>
|
|
40
|
+
size="small"
|
|
41
|
+
/>
|
|
63
42
|
</el-col>
|
|
64
43
|
</el-row>
|
|
65
|
-
<el-row v-if="!canBeConfirmed" class="row">
|
|
66
|
-
<div class="warning-message">
|
|
67
|
-
Group must be enterd before this action can be confirmed.
|
|
68
|
-
</div>
|
|
69
|
-
</el-row>
|
|
70
44
|
<el-row>
|
|
71
45
|
<el-col :offset="0" :span="12">
|
|
72
46
|
<el-button
|
|
73
47
|
type="primary"
|
|
74
48
|
plain
|
|
75
49
|
@click="confirm"
|
|
76
|
-
:disabled="!canBeConfirmed"
|
|
77
50
|
>
|
|
78
51
|
{{ confirmText }}
|
|
79
52
|
</el-button>
|
|
@@ -94,8 +67,8 @@
|
|
|
94
67
|
|
|
95
68
|
<script>
|
|
96
69
|
/* eslint-disable no-alert, no-console */
|
|
70
|
+
|
|
97
71
|
import {
|
|
98
|
-
ElAutocomplete as Autocomplete,
|
|
99
72
|
ElButton as Button,
|
|
100
73
|
ElCol as Col,
|
|
101
74
|
ElContainer as Container,
|
|
@@ -111,7 +84,6 @@ import {
|
|
|
111
84
|
export default {
|
|
112
85
|
name: "CreateTooltipContent",
|
|
113
86
|
components: {
|
|
114
|
-
Autocomplete,
|
|
115
87
|
Button,
|
|
116
88
|
Col,
|
|
117
89
|
Container,
|
|
@@ -122,73 +94,26 @@ export default {
|
|
|
122
94
|
props: {
|
|
123
95
|
createData: {
|
|
124
96
|
type: Object,
|
|
125
|
-
default:{
|
|
126
|
-
drawingBox: false,
|
|
127
|
-
renaming: false,
|
|
128
|
-
toBeConfirmed: false,
|
|
129
|
-
points: [],
|
|
130
|
-
tempGroupName: undefined,
|
|
131
|
-
shape: "",
|
|
132
|
-
x: 0,
|
|
133
|
-
y: 0,
|
|
134
|
-
editingIndex: -1,
|
|
135
|
-
faceIndex: -1,
|
|
136
|
-
toBeDeleted: false,
|
|
137
|
-
regionPrefix: "__annotation"
|
|
138
|
-
},
|
|
139
97
|
},
|
|
140
98
|
},
|
|
141
99
|
watch: {
|
|
142
100
|
"createData.shape": {
|
|
143
101
|
handler: function (newValue, oldValue) {
|
|
144
|
-
this.group =
|
|
102
|
+
this.group = newValue;
|
|
145
103
|
if (oldValue !== undefined) {
|
|
146
104
|
this.$emit("cancel-create");
|
|
147
105
|
}
|
|
148
106
|
},
|
|
149
107
|
immediate: true,
|
|
150
108
|
},
|
|
151
|
-
"createData.tempGroupName": {
|
|
152
|
-
handler: function (newValue) {
|
|
153
|
-
this.group = newValue ? newValue : "";
|
|
154
|
-
},
|
|
155
|
-
immediate: true,
|
|
156
|
-
},
|
|
157
109
|
},
|
|
158
110
|
computed: {
|
|
159
|
-
canBeConfirmed: function() {
|
|
160
|
-
if (this.createData.editingIndex > -1) {
|
|
161
|
-
return true;
|
|
162
|
-
} else if (this.group) {
|
|
163
|
-
if (!this.renaming) {
|
|
164
|
-
return true;
|
|
165
|
-
} else if (this.group !== this.createData.tempGroupName) {
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
return false;
|
|
170
|
-
},
|
|
171
111
|
confirmText: function () {
|
|
172
112
|
if (this.createData.editingIndex > -1) {
|
|
173
113
|
return "Edit";
|
|
174
|
-
} else if (this.createData.renaming) {
|
|
175
|
-
return "Rename";
|
|
176
114
|
}
|
|
177
115
|
return "Confirm";
|
|
178
116
|
},
|
|
179
|
-
dialogTitle: function() {
|
|
180
|
-
if (this.createData.editingIndex > -1) {
|
|
181
|
-
return `Edit ${this.createData.shape}`;
|
|
182
|
-
} else {
|
|
183
|
-
return `Create ${this.createData.shape}`;
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
targetRegion: function() {
|
|
187
|
-
if ('regionPrefix' in this.createData) {
|
|
188
|
-
return this.createData.regionPrefix;
|
|
189
|
-
}
|
|
190
|
-
return "";
|
|
191
|
-
},
|
|
192
117
|
},
|
|
193
118
|
data: function () {
|
|
194
119
|
return {
|
|
@@ -200,13 +125,12 @@ export default {
|
|
|
200
125
|
methods: {
|
|
201
126
|
confirm: function () {
|
|
202
127
|
this.$emit(
|
|
203
|
-
"confirm-create",
|
|
204
|
-
{
|
|
205
|
-
region:
|
|
128
|
+
"confirm-create",
|
|
129
|
+
{
|
|
130
|
+
region: "__annotation/" + this.region,
|
|
206
131
|
group: this.group,
|
|
207
132
|
shape: this.createData.shape,
|
|
208
133
|
editingIndex: this.createData.editingIndex,
|
|
209
|
-
renaming: this.createData.renaming,
|
|
210
134
|
}
|
|
211
135
|
);
|
|
212
136
|
this.group = this.createData.shape;
|
|
@@ -214,14 +138,6 @@ export default {
|
|
|
214
138
|
cancel: function () {
|
|
215
139
|
this.$emit("cancel-create");
|
|
216
140
|
},
|
|
217
|
-
fetchRegionSuggestions: function(term, cb) {
|
|
218
|
-
cb([]);
|
|
219
|
-
this.$emit("create-region-suggestions", {term, cb});
|
|
220
|
-
},
|
|
221
|
-
fetchGroupSuggestions: function(term, cb) {
|
|
222
|
-
cb([]);
|
|
223
|
-
this.$emit("create-group-suggestions", {term, cb, region: this.region});
|
|
224
|
-
},
|
|
225
141
|
},
|
|
226
142
|
};
|
|
227
143
|
</script>
|
|
@@ -236,20 +152,20 @@ export default {
|
|
|
236
152
|
font-size: 14px;
|
|
237
153
|
}
|
|
238
154
|
|
|
155
|
+
.row {
|
|
156
|
+
margin: 4px;
|
|
157
|
+
text-align: left;
|
|
158
|
+
}
|
|
159
|
+
|
|
239
160
|
:deep(.create-text) {
|
|
240
161
|
max-width: 220px;
|
|
241
|
-
height:
|
|
162
|
+
height:35px;
|
|
242
163
|
font-size: 12px;
|
|
243
164
|
}
|
|
244
165
|
|
|
245
|
-
.row {
|
|
246
|
-
margin: 4px;
|
|
247
|
-
text-align: left;
|
|
248
|
-
}
|
|
249
166
|
|
|
250
167
|
.create-container {
|
|
251
|
-
width:
|
|
252
|
-
|
|
168
|
+
width: 100%;
|
|
253
169
|
height: auto;
|
|
254
170
|
border-radius: 4px;
|
|
255
171
|
border: solid 1px #d8dce6;
|
|
@@ -259,44 +175,27 @@ export default {
|
|
|
259
175
|
pointer-events: auto;
|
|
260
176
|
}
|
|
261
177
|
|
|
262
|
-
|
|
263
|
-
position: relative;
|
|
178
|
+
.value {
|
|
264
179
|
font-size: 12px;
|
|
265
|
-
display: inline-flex;
|
|
266
|
-
width: var(--el-input-width);
|
|
267
|
-
line-height: var(--el-input-height);
|
|
268
|
-
box-sizing: border-box;
|
|
269
|
-
vertical-align: middle;
|
|
270
|
-
.el-input__inner {
|
|
271
|
-
height: 24px;
|
|
272
|
-
}
|
|
273
180
|
}
|
|
274
181
|
|
|
275
|
-
.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
182
|
+
.input-box {
|
|
183
|
+
width: 42px;
|
|
184
|
+
border-radius: 4px;
|
|
185
|
+
border: 1px solid rgb(144, 147, 153);
|
|
186
|
+
background-color: var(--white);
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
color: rgb(48, 49, 51);
|
|
189
|
+
margin-left: 8px;
|
|
190
|
+
height: 24px;
|
|
191
|
+
|
|
192
|
+
&.number-input {
|
|
193
|
+
width: 42px;
|
|
194
|
+
:deep(.el-input__wrapper) {
|
|
195
|
+
padding-left: 0px;
|
|
196
|
+
padding-right: 0px;
|
|
288
197
|
}
|
|
289
198
|
}
|
|
290
199
|
}
|
|
291
200
|
|
|
292
|
-
.warning-message {
|
|
293
|
-
font-size: 10px;
|
|
294
|
-
color: #FF8400;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.value {
|
|
298
|
-
font-size: 12px;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
201
|
</style>
|
package/src/components/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import AnnotationPopup from "./Tooltip/AnnotationPopup.vue";
|
|
|
2
2
|
import CreateTooltipContent from "./Tooltip/CreateTooltipContent.vue";
|
|
3
3
|
import ConnectivityGraph from "./ConnectivityGraph/ConnectivityGraph.vue";
|
|
4
4
|
import ConnectivityList from "./ConnectivityList/ConnectivityList.vue";
|
|
5
|
+
import ConnectivityListNew from "./ConnectivityList/ConnectivityListNew.vue";
|
|
5
6
|
import CopyToClipboard from "./CopyToClipboard/CopyToClipboard.vue";
|
|
6
7
|
import DrawToolbar from "./DrawToolbar/DrawToolbar.vue";
|
|
7
8
|
import HelpModeDialog from "./HelpModeDialog/HelpModeDialog.vue";
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
queryPathsByDestination,
|
|
17
18
|
queryPathsByRoute,
|
|
18
19
|
queryForwardBackwardConnections,
|
|
20
|
+
querySingleConnectivityList,
|
|
19
21
|
} from "./CompetencyQueries/CompetencyQueries.js";
|
|
20
22
|
import {
|
|
21
23
|
filterOrigins,
|
|
@@ -37,6 +39,7 @@ export {
|
|
|
37
39
|
CreateTooltipContent,
|
|
38
40
|
ConnectivityGraph,
|
|
39
41
|
ConnectivityList,
|
|
42
|
+
ConnectivityListNew,
|
|
40
43
|
CopyToClipboard,
|
|
41
44
|
DrawToolbar,
|
|
42
45
|
HelpModeDialog,
|
|
@@ -50,6 +53,7 @@ export {
|
|
|
50
53
|
queryPathsByDestination,
|
|
51
54
|
queryPathsByRoute,
|
|
52
55
|
queryForwardBackwardConnections,
|
|
56
|
+
querySingleConnectivityList,
|
|
53
57
|
filterOrigins,
|
|
54
58
|
filterDestinations,
|
|
55
59
|
filterViaLocations,
|
|
@@ -54,9 +54,17 @@ const delay = (ms) => {
|
|
|
54
54
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
const removeDuplicates = function (arrayOfAnything) {
|
|
58
|
+
if (!arrayOfAnything) return []
|
|
59
|
+
return [...new Set(arrayOfAnything.map((e) => JSON.stringify(e)))].map((e) =>
|
|
60
|
+
JSON.parse(e)
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
export {
|
|
58
65
|
capitalise,
|
|
59
66
|
titleCase,
|
|
60
67
|
xmlToJSON,
|
|
61
68
|
delay,
|
|
69
|
+
removeDuplicates,
|
|
62
70
|
};
|
package/src/components.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ declare module 'vue' {
|
|
|
11
11
|
ConnectionDialog: typeof import('./components/DrawToolbar/ConnectionDialog.vue')['default']
|
|
12
12
|
ConnectivityGraph: typeof import('./components/ConnectivityGraph/ConnectivityGraph.vue')['default']
|
|
13
13
|
ConnectivityList: typeof import('./components/ConnectivityList/ConnectivityList.vue')['default']
|
|
14
|
+
ConnectivityListNew: typeof import('./components/ConnectivityList/ConnectivityListNew.vue')['default']
|
|
14
15
|
CopyToClipboard: typeof import('./components/CopyToClipboard/CopyToClipboard.vue')['default']
|
|
15
16
|
CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default']
|
|
16
17
|
DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default']
|
|
17
|
-
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
|
18
18
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
19
19
|
ElCard: typeof import('element-plus/es')['ElCard']
|
|
20
20
|
ElCol: typeof import('element-plus/es')['ElCol']
|