Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2023-09-21 02:32:15 +02:00
commit 8d1ae657fc
28 changed files with 693 additions and 196 deletions

View file

@ -1155,19 +1155,24 @@ export default class SpecialVisualizations {
name: "class",
doc: "CSS-classes to add to the element",
},
{
name: "download",
doc: "If set, this link will act as a download-button. The contents of `href` will be offered for download; this parameter will act as the proposed filename",
},
],
constr(
state: SpecialVisualizationState,
tagSource: UIEventSource<Record<string, string>>,
args: string[]
): BaseUIElement {
const [text, href, classnames] = args
const [text, href, classnames, download] = args
return new VariableUiElement(
tagSource.map((tags) =>
new Link(
Utils.SubstituteKeys(text, tags),
Utils.SubstituteKeys(href, tags),
true
download === undefined,
Utils.SubstituteKeys(download, tags)
).SetClass(classnames)
)
)