(schema)
| 157 | } |
| 158 | |
| 159 | addMapping(schema) { |
| 160 | const id = this.assignId(schema); |
| 161 | const schemaCount = this.getSchemaCount(schema); |
| 162 | |
| 163 | const newMapping = { |
| 164 | id, |
| 165 | altLabel: schemaCount |
| 166 | ? `${schema.label} ${schemaCount + 1}` |
| 167 | : schema.label, |
| 168 | color: this.assignColor(), |
| 169 | schema, |
| 170 | keys: [], |
| 171 | properties: {}, |
| 172 | }; |
| 173 | this.mappingItems.set(id, newMapping); |
| 174 | return this; |
| 175 | } |
| 176 | |
| 177 | removeMapping(idToRemove) { |
| 178 | this.mappingItems.delete(idToRemove); |
no test coverage detected