@abi-software/map-utilities 1.7.8-beta.2 → 1.7.8-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-utilities",
3
- "version": "1.7.8-beta.2",
3
+ "version": "1.7.8-beta.3",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,7 +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 && targetRegion">
7
+ <span class="create-text"
8
+ v-if="creating && targetRegion">
8
9
  {{ `Primitives will be created in the ${targetRegion} region` }}
9
10
  </span>
10
11
  <el-row class="row" v-show="showPoint">
@@ -46,7 +47,7 @@
46
47
  <el-col :offset="0" :span="16">
47
48
  <el-autocomplete
48
49
  class="autocomplete-box"
49
- :disabled="createData.editingIndex > -1"
50
+ :disabled="createData.editingIndex > -1 || createData.toBeDeleted"
50
51
  :fit-input-width="true"
51
52
  v-model="group"
52
53
  :placeholder="createData.shape"
@@ -173,15 +174,25 @@ export default {
173
174
  return "Edit";
174
175
  } else if (this.createData.renaming) {
175
176
  return "Rename";
177
+ } else if (this.createData.toBeDeleted) {
178
+ return "Delete";
176
179
  }
177
180
  return "Confirm";
178
181
  },
182
+ creating: function() {
183
+ if (this.createData.editingIndex > -1 ||
184
+ this.createData.renaming ||
185
+ this.createData.toBeDeleted) {
186
+ return false;
187
+ }
188
+ return true;
189
+ },
179
190
  dialogTitle: function() {
180
- if (this.createData.editingIndex > -1) {
181
- return `Edit ${this.createData.shape}`;
182
- } else {
183
- return `Create ${this.createData.shape}`;
191
+ const mode = this.confirmText;
192
+ if (this.createData.toBeDeleted || this.createData.renaming) {
193
+ return mode;
184
194
  }
195
+ return `${mode} ${this.createData.shape}`;
185
196
  },
186
197
  targetRegion: function() {
187
198
  if ('regionPrefix' in this.createData) {
@@ -207,6 +218,7 @@ export default {
207
218
  shape: this.createData.shape,
208
219
  editingIndex: this.createData.editingIndex,
209
220
  renaming: this.createData.renaming,
221
+ deleting: this.createData.toBeDeleted,
210
222
  }
211
223
  );
212
224
  this.group = this.createData.shape;