How to use the adaptivecards.getStringValue 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-fabric / src / components / inputs / InputTimeFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        super.parse(json, errors);
        this.value = this.defaultValue;
        this.placeholder = AC.getStringValue(json.placeholder);
        this.min = AC.getStringValue(json.min);
        this.max = AC.getStringValue(json.max);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputTextFabric.tsx View on Github external
public parse = (json: any, errors?: any) => {
        this.value = json.value;
        this.id = AC.getStringValue(json.id);
        this.isMultiline = AC.getBoolValue(json.isMultiline, false);
        this.maxLength = Shared.getIntValue(json.maxLength);
        this.placeholder = AC.getStringValue(json.placeholder);
        this.label = AC.getStringValue(json.label);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / components / inputs / InputTimeFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        super.parse(json, errors);
        this.value = this.defaultValue;
        this.placeholder = AC.getStringValue(json.placeholder);
        this.min = AC.getStringValue(json.min);
        this.max = AC.getStringValue(json.max);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputTextFabric.tsx View on Github external
public parse = (json: any, errors?: any) => {
        this.value = json.value;
        this.id = AC.getStringValue(json.id);
        this.isMultiline = AC.getBoolValue(json.isMultiline, false);
        this.maxLength = Shared.getIntValue(json.maxLength);
        this.placeholder = AC.getStringValue(json.placeholder);
        this.label = AC.getStringValue(json.label);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / components / inputs / InputTimeFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        super.parse(json, errors);
        this.value = this.defaultValue;
        this.placeholder = AC.getStringValue(json.placeholder);
        this.min = AC.getStringValue(json.min);
        this.max = AC.getStringValue(json.max);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputDateFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        this.id = AC.getStringValue(json.id);
        this.placeholder = AC.getStringValue(json.placeholder);
        this.parseDates(json, errors);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-designer / src / catalogue.ts View on Github external
export function parseCatalogue(input: any): CatalogueEntry[] {
    let entries: any[] = null;

    if (Array.isArray(input)) {
        entries = input;
    }
    else {
        entries = Array.isArray(input["entries"]) ? input["entried"] : null;
    }

    let result: CatalogueEntry[] = [];

    if (entries != null) {
        for (let entry of entries) {
            if (typeof entry === "object") {
                let displayName = Adaptive.getStringValue(entry["displayName"]);
                let cardPayloadUrl = Adaptive.getStringValue(entry["cardPayloadUrl"]);

                if (!Adaptive.isNullOrEmpty(displayName) && !Adaptive.isNullOrEmpty(cardPayloadUrl)) {

                    result.push(
                        new CatalogueEntry(
                            displayName,
                            cardPayloadUrl,
                            Adaptive.getStringValue(entry["dataSampleUrl"])));
                }
            }
        }
    }

    return result;
}
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputToggleFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        this.id = AC.getStringValue(json.id);
        this.value = json.value;
        this.valueOn = AC.getStringValue(json.valueOn);
        this.valueOff = AC.getStringValue(json.valueOff);
        this.title = AC.getStringValue(json.title);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputChoiceSetFabric.tsx View on Github external
public parse = (json: any, errors?: AC.IValidationError[]) => {
        this.id = json.id ? AC.getStringValue(json.id) : null;
        this.value = json.value;
        this.selectedValues = this.defaultValueToArray(this.value);
        this.choices = json.choices;
        this.isMultiSelect = AC.getBoolValue(json.isMultiSelect, false);
        this.title = AC.getStringValue(json.title);
        this.style = AC.getStringValue(json.style);
    }
github microsoft / AdaptiveCards / source / nodejs / adaptivecards-fabric / src / Components / Inputs / InputDateFabric.tsx View on Github external
private parseDates = (json: any, errors?: AC.IValidationError[]) => {
        const dateString = AC.getStringValue(json.value);
        this.value = dateString;
        this.date = dateString ? this.getDate(dateString) : new Date();
        this.minDate = json.min ? this.getDate(AC.getStringValue(json.min)) : undefined;
        this.maxDate = json.max ? this.getDate(AC.getStringValue(json.max)) : undefined;
    }