Refactoring: port wikidata preview boxes and wikidata item picker to Svelte, fix #2019, fix #797

This commit is contained in:
Pieter Vander Vennet 2024-07-11 16:59:10 +02:00
parent 3a2addbddc
commit d5430891bf
22 changed files with 580 additions and 507 deletions

View file

@ -289,6 +289,11 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
* group: expert
*/
postfixDistinguished?: string
/**
* Extra arguments to configure the input element
* group: hidden
*/
helperArgs: any
}
/**

View file

@ -69,6 +69,7 @@ export default class TagRenderingConfig {
readonly inline: boolean
readonly default?: string
readonly postfixDistinguished?: string
readonly args?: any
}
public readonly multiAnswer: boolean
@ -203,6 +204,7 @@ export default class TagRenderingConfig {
inline: json.freeform.inline ?? false,
default: json.freeform.default,
postfixDistinguished: json.freeform.postfixDistinguished?.trim(),
args: json.freeform.helperArgs
}
if (json.freeform["extraTags"] !== undefined) {
throw `Freeform.extraTags is defined. This should probably be 'freeform.addExtraTag' (at ${context})`