Themes: first version of circular economy theme
This commit is contained in:
parent
3acba29198
commit
592be68f09
20 changed files with 1917 additions and 11 deletions
|
@ -127,6 +127,7 @@ export default class Constants {
|
|||
"clock",
|
||||
"close",
|
||||
"crosshair",
|
||||
"gear",
|
||||
"help",
|
||||
"home",
|
||||
"invalid",
|
||||
|
|
|
@ -366,9 +366,17 @@ export default class TagRenderingConfig {
|
|||
throw `${ctx}: Invalid mapping: "if" is defined as an array. Use {"and": <your conditions>} or {"or": <your conditions>} instead`
|
||||
}
|
||||
|
||||
if (mapping.addExtraTags !== undefined && multiAnswer) {
|
||||
throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags; this is not allowed`
|
||||
if(mapping.addExtraTags !== undefined && !Array.isArray(mapping.addExtraTags)){
|
||||
throw `${ctx}.addExtraTags: expected a list, but got a ${typeof mapping.addExtraTags}`
|
||||
|
||||
}
|
||||
if (mapping.addExtraTags !== undefined && multiAnswer) {
|
||||
const usedKeys = mapping.addExtraTags?.flatMap(et => TagUtils.Tag(et).usedKeys())
|
||||
if(usedKeys.some(key => TagUtils.Tag(mapping.if).usedKeys().indexOf(key ) > 0)){
|
||||
throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags which also modifies one of the keys; this is not allowed`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let hideInAnswer: boolean | TagsFilter = false
|
||||
if (typeof mapping.hideInAnswer === "boolean") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue