@abi-software/map-utilities 1.7.8-beta.0 → 1.7.8-beta.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/dist/map-utilities.js +9480 -9152
- package/dist/map-utilities.umd.cjs +58 -58
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Tooltip/CreateTooltipContent.vue +80 -34
- package/src/components.d.ts +1 -0
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<div>{{ dialogTitle }}</div>
|
|
5
5
|
</el-header>
|
|
6
6
|
<el-main class="slides-block">
|
|
7
|
-
<span class="create-text" v-if="createData.editingIndex === -1">
|
|
8
|
-
Primitives will be created in the
|
|
7
|
+
<span class="create-text" v-if="createData.editingIndex === -1 && targetRegion">
|
|
8
|
+
{{ `Primitives will be created in the ${targetRegion} region` }}
|
|
9
9
|
</span>
|
|
10
10
|
<el-row class="row" v-show="showPoint">
|
|
11
11
|
<el-col :offset="0" :span="8">
|
|
@@ -22,11 +22,21 @@
|
|
|
22
22
|
Region:
|
|
23
23
|
</el-col>
|
|
24
24
|
<el-col :offset="0" :span="16">
|
|
25
|
-
<el-
|
|
25
|
+
<el-autocomplete
|
|
26
|
+
class="autocomplete-box"
|
|
27
|
+
:fit-input-width="true"
|
|
26
28
|
v-model="region"
|
|
27
|
-
placeholder="
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
:placeholder="targetRegion"
|
|
30
|
+
:fetch-suggestions="fetchRegionSuggestions"
|
|
31
|
+
:teleported="true"
|
|
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>
|
|
30
40
|
</el-col>
|
|
31
41
|
</el-row>
|
|
32
42
|
<el-row class="row">
|
|
@@ -34,11 +44,21 @@
|
|
|
34
44
|
Group:
|
|
35
45
|
</el-col>
|
|
36
46
|
<el-col :offset="0" :span="16">
|
|
37
|
-
<el-
|
|
47
|
+
<el-autocomplete
|
|
48
|
+
class="autocomplete-box"
|
|
49
|
+
:fit-input-width="true"
|
|
38
50
|
v-model="group"
|
|
39
51
|
:placeholder="createData.shape"
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
:fetch-suggestions="fetchGroupSuggestions"
|
|
53
|
+
:teleported="true"
|
|
54
|
+
popper-class="autocomplete-popper"
|
|
55
|
+
>
|
|
56
|
+
<template #default="{ item }">
|
|
57
|
+
<div class="suggested-value">
|
|
58
|
+
{{ item.value }}
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</el-autocomplete>
|
|
42
62
|
</el-col>
|
|
43
63
|
</el-row>
|
|
44
64
|
<el-row>
|
|
@@ -67,8 +87,8 @@
|
|
|
67
87
|
|
|
68
88
|
<script>
|
|
69
89
|
/* eslint-disable no-alert, no-console */
|
|
70
|
-
|
|
71
90
|
import {
|
|
91
|
+
ElAutocomplete as Autocomplete,
|
|
72
92
|
ElButton as Button,
|
|
73
93
|
ElCol as Col,
|
|
74
94
|
ElContainer as Container,
|
|
@@ -84,6 +104,7 @@ import {
|
|
|
84
104
|
export default {
|
|
85
105
|
name: "CreateTooltipContent",
|
|
86
106
|
components: {
|
|
107
|
+
Autocomplete,
|
|
87
108
|
Button,
|
|
88
109
|
Col,
|
|
89
110
|
Container,
|
|
@@ -127,6 +148,12 @@ export default {
|
|
|
127
148
|
return `Create ${this.createData.shape}`;
|
|
128
149
|
}
|
|
129
150
|
},
|
|
151
|
+
targetRegion: function() {
|
|
152
|
+
if ('regionPrefix' in this.createData) {
|
|
153
|
+
return this.createData.regionPrefix;
|
|
154
|
+
}
|
|
155
|
+
return "";
|
|
156
|
+
},
|
|
130
157
|
},
|
|
131
158
|
data: function () {
|
|
132
159
|
return {
|
|
@@ -140,7 +167,7 @@ export default {
|
|
|
140
167
|
this.$emit(
|
|
141
168
|
"confirm-create",
|
|
142
169
|
{
|
|
143
|
-
region:
|
|
170
|
+
region: this.targetRegion + this.region,
|
|
144
171
|
group: this.group,
|
|
145
172
|
shape: this.createData.shape,
|
|
146
173
|
editingIndex: this.createData.editingIndex,
|
|
@@ -151,6 +178,14 @@ export default {
|
|
|
151
178
|
cancel: function () {
|
|
152
179
|
this.$emit("cancel-create");
|
|
153
180
|
},
|
|
181
|
+
fetchRegionSuggestions: function(term, cb) {
|
|
182
|
+
cb([]);
|
|
183
|
+
this.$emit("create-region-suggestions", {term, cb});
|
|
184
|
+
},
|
|
185
|
+
fetchGroupSuggestions: function(term, cb) {
|
|
186
|
+
cb([]);
|
|
187
|
+
this.$emit("create-group-suggestions", {term, cb, region: this.region});
|
|
188
|
+
},
|
|
154
189
|
},
|
|
155
190
|
};
|
|
156
191
|
</script>
|
|
@@ -165,21 +200,20 @@ export default {
|
|
|
165
200
|
font-size: 14px;
|
|
166
201
|
}
|
|
167
202
|
|
|
168
|
-
.row {
|
|
169
|
-
margin: 4px;
|
|
170
|
-
text-align: left;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
203
|
:deep(.create-text) {
|
|
174
204
|
max-width: 220px;
|
|
175
|
-
height:35px;
|
|
205
|
+
height: 35px;
|
|
176
206
|
font-size: 12px;
|
|
177
207
|
}
|
|
178
208
|
|
|
209
|
+
.row {
|
|
210
|
+
margin: 4px;
|
|
211
|
+
text-align: left;
|
|
212
|
+
}
|
|
179
213
|
|
|
180
214
|
.create-container {
|
|
181
|
-
width:
|
|
182
|
-
|
|
215
|
+
width: 320px;
|
|
216
|
+
|
|
183
217
|
height: auto;
|
|
184
218
|
border-radius: 4px;
|
|
185
219
|
border: solid 1px #d8dce6;
|
|
@@ -189,27 +223,39 @@ export default {
|
|
|
189
223
|
pointer-events: auto;
|
|
190
224
|
}
|
|
191
225
|
|
|
192
|
-
.
|
|
226
|
+
:deep(.autocomplete-box) {
|
|
227
|
+
position: relative;
|
|
193
228
|
font-size: 12px;
|
|
229
|
+
display: inline-flex;
|
|
230
|
+
width: var(--el-input-width);
|
|
231
|
+
line-height: var(--el-input-height);
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
vertical-align: middle;
|
|
234
|
+
.el-input__inner {
|
|
235
|
+
height: 24px;
|
|
236
|
+
}
|
|
194
237
|
}
|
|
195
238
|
|
|
196
|
-
.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
background-color: var(--white);
|
|
201
|
-
font-weight: 500;
|
|
202
|
-
color: rgb(48, 49, 51);
|
|
203
|
-
margin-left: 8px;
|
|
204
|
-
height: 24px;
|
|
239
|
+
.autocomplete-popper {
|
|
240
|
+
li {
|
|
241
|
+
line-height: normal;
|
|
242
|
+
padding: 7px;
|
|
205
243
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
244
|
+
.suggested-value {
|
|
245
|
+
font-family: "Asap", sans-serif;
|
|
246
|
+
text-align: left;
|
|
247
|
+
white-space: initial;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.el-input__inner {
|
|
251
|
+
font-size: 12px;
|
|
211
252
|
}
|
|
212
253
|
}
|
|
213
254
|
}
|
|
214
255
|
|
|
256
|
+
.value {
|
|
257
|
+
font-size: 12px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
215
261
|
</style>
|
package/src/components.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare module 'vue' {
|
|
|
14
14
|
CopyToClipboard: typeof import('./components/CopyToClipboard/CopyToClipboard.vue')['default']
|
|
15
15
|
CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default']
|
|
16
16
|
DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default']
|
|
17
|
+
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
|
17
18
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
18
19
|
ElCard: typeof import('element-plus/es')['ElCard']
|
|
19
20
|
ElCol: typeof import('element-plus/es')['ElCol']
|