Merge develop

This commit is contained in:
Pieter Vander Vennet 2021-07-29 10:39:16 +02:00
commit 1571fa478b
42 changed files with 927 additions and 461 deletions

View file

@ -43,6 +43,8 @@ export default class LayoutConfig {
public readonly enableBackgroundLayerSelection: boolean;
public readonly enableShowAllQuestions: boolean;
public readonly enableExportButton: boolean;
public readonly enablePdfDownload: boolean;
public readonly customCss?: string;
/*
How long is the cache valid, in seconds?
@ -153,7 +155,8 @@ export default class LayoutConfig {
this.enableAddNewPoints = json.enableAddNewPoints ?? true;
this.enableBackgroundLayerSelection = json.enableBackgroundLayerSelection ?? true;
this.enableShowAllQuestions = json.enableShowAllQuestions ?? false;
this.enableExportButton = json.enableExportButton ?? false;
this.enableExportButton = json.enableDownload ?? false;
this.enablePdfDownload = json.enablePdfDownload ?? false;
this.customCss = json.customCss;
this.cacheTimeout = json.cacheTimout ?? (60 * 24 * 60 * 60)
@ -176,7 +179,7 @@ export default class LayoutConfig {
return
}
} else {
console.log("Layer ", layer," not kown, try one of", Array.from(AllKnownLayers.sharedLayers.keys()).join(", "))
console.log("Layer ", layer, " not kown, try one of", Array.from(AllKnownLayers.sharedLayers.keys()).join(", "))
throw `Unknown builtin layer ${layer} at ${context}.layers[${i}]`;
}
}

View file

@ -336,5 +336,7 @@ export interface LayoutConfigJson {
enableGeolocation?: boolean;
enableBackgroundLayerSelection?: boolean;
enableShowAllQuestions?: boolean;
enableExportButton?: boolean;
enableDownload?: boolean;
enablePdfDownload?: boolean;
}

View file

@ -87,6 +87,10 @@ export default class TagRenderingConfig {
if (this.freeform.key === undefined || this.freeform.key === "") {
throw `Freeform.key is undefined or the empty string - this is not allowed; either fill out something or remove the freeform block alltogether. Error in ${context}`
}
if(json.freeform["args"] !== undefined){
throw `Freeform.args is defined. This should probably be 'freeform.helperArgs' (at ${context})`
}
if (ValidatedTextField.AllTypes[this.freeform.type] === undefined) {