How to use the adaptivecards.HostConfig function in adaptivecards

To help you get started, we’ve selected a few adaptivecards examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / kik.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig({
            spacing: {
                small: 3,
                default: 8,
                medium: 20,
                large: 30,
                extraLarge: 40,
                padding: 10
            },
            separator: {
                lineThickness: 1,
                lineColor: "#EEEEEE"
            },
            supportsInteractivity: false,
            fontFamily: "Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;",
            fontSizes: {
                small: 12,
github microsoft / BotFramework-WebChat / src / Store.ts View on Github external
export const adaptiveCards: Reducer = (
    state: AdaptiveCardsState = {
        hostConfig: null
    },
    action: AdaptiveCardsAction
) => {
    switch (action.type) {
        case 'Set_AdaptiveCardsHostConfig':
            return {
                ...state,
                hostConfig: action.payload && (action.payload instanceof HostConfig ? action.payload : new HostConfig(action.payload))
            };

        default:
            return state;
    }
};
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / slack.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig({
            spacing: {
                small: 3,
                default: 8,
                medium: 20,
                large: 30,
                extraLarge: 40,
                padding: 10
            },
            separator: {
                lineThickness: 1,
                lineColor: "#EEEEEE"
            },
            supportsInteractivity: false,
            fontFamily: "Lato, Segoe UI, sans-serif",
            fontSizes: {
                small: 12,
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / toast.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig(windowsNotificationConfiguration);
    }
}
github microsoft / BotFramework-Emulator / packages / custom-botframework-webchat / built / AdaptiveCardContainer.js View on Github external
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const react_dom_1 = require("react-dom");
const react_redux_1 = require("react-redux");
const adaptivecards_1 = require("adaptivecards");
const Chat_1 = require("./Chat");
const adaptivecardsHostConfig = require("../adaptivecards-hostconfig.json");
const defaultHostConfig = new adaptivecards_1.HostConfig(adaptivecardsHostConfig);
function cardWithoutHttpActions(card) {
    if (!card.actions)
        return card;
    const actions = [];
    card.actions.forEach((action) => {
        //filter out http action buttons
        if (action.type === 'Action.Http')
            return;
        if (action.type === 'Action.ShowCard') {
            const showCardAction = action;
            showCardAction.card = cardWithoutHttpActions(showCardAction.card);
        }
        actions.push(action);
    });
    return Object.assign({}, card, { actions });
}
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / facebook.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig({
            spacing: {
                small: 3,
                default: 8,
                medium: 20,
                large: 30,
                extraLarge: 40,
                padding: 10
            },
            separator: {
                lineThickness: 1,
                lineColor: "#EEEEEE"
            },
            supportsInteractivity: false,
            fontFamily: "Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;",
            fontSizes: {
                small: 12,
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / skype.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig(skypeConfiguration);
    }
}
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / cortana.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig(cortanaConfiguration);
    }
}
github microsoft / ConversationLearner-UI / src / components / modals / AdaptiveCardViewer / AdaptiveCardViewer.tsx View on Github external
getAdaptiveCardHostConfig(): any {
        return new AdaptiveCards.HostConfig(adaptiveCardHostConfig)
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-visualizer / src / containers / timeline.ts View on Github external
public getHostConfig(): HostConfig {
        return new HostConfig({
            spacing: {
                small: 4,
                default: 12,
                medium: 20,
                large: 30,
                extraLarge: 40,
                padding: 15
            },
            separator: {
                lineThickness: 1,
                lineColor: "#EEEEEE"
            },
            supportsInteractivity: false,
            fontFamily: "Segoe UI",
            fontSizes: {
                small: 12,