Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
{
type: "ActionSet",
horizontalAlignment: "right",
actions: [
{
type: "Action.Submit",
id: "cancel",
title: "Cancel"
}
]
}
]
};
let template = new ACData.Template(templatePayload);
let context = new ACData.EvaluationContext();
context.$root = {
title: this.title,
message: message
};
let expandedCardPayload = template.expand(context);
let card = new Adaptive.AdaptiveCard();
card.hostConfig = defaultHostConfig;
card.onExecuteAction = (action: Adaptive.Action) => {
if (action.id == "cancel") {
this.close();
}
}
this.entry.onDownloaded = (sender: CatalogueEntry) => {
thumbnailHost.removeChild(spinner);
if (sender.cardPayloadDownloaded) {
let cardPayload = JSON.parse(sender.cardPayload);
if (sender.sampleData) {
let template = new ACData.Template(cardPayload);
let evaluationContext = new ACData.EvaluationContext();
evaluationContext.$root = JSON.parse(sender.sampleData);
cardPayload = template.expand(evaluationContext);
}
let card = new Adaptive.AdaptiveCard();
card.parse(cardPayload);
card.render();
card.renderedElement.style.width = "100%";
thumbnailHost.appendChild(card.renderedElement);
}
else {
let errorMessage = document.createElement("div");
},
{
type: "ActionSet",
horizontalAlignment: "right",
actions: [
{
type: "Action.Submit",
id: "cancel",
title: "Cancel"
}
]
}
]
};
let template = new ACData.Template(templatePayload);
let context = new ACData.EvaluationContext();
context.$root = {
title: this.title,
catalogue: catalogue
};
let expandedCardPayload = template.expand(context);
let card = new Adaptive.AdaptiveCard();
card.hostConfig = defaultHostConfig;
card.onExecuteAction = (action: Adaptive.Action) => {
if (action.id == "cancel") {
this.close();
}
else if (action instanceof Adaptive.SubmitAction) {