223 lines
6.8 KiB
TypeScript
223 lines
6.8 KiB
TypeScript
import * as Enums from "./enums";
|
|
import * as Shared from "./shared";
|
|
export interface IValidationError {
|
|
error: Enums.ValidationError;
|
|
message: string;
|
|
}
|
|
export declare class ColorDefinition {
|
|
default: string;
|
|
subtle: string;
|
|
constructor(defaultColor?: string, subtleColor?: string);
|
|
parse(obj?: any): void;
|
|
}
|
|
export declare class TextColorDefinition extends ColorDefinition {
|
|
readonly highlightColors: ColorDefinition;
|
|
parse(obj?: any): void;
|
|
}
|
|
export declare class AdaptiveCardConfig {
|
|
allowCustomStyle: boolean;
|
|
constructor(obj?: any);
|
|
}
|
|
export declare class ImageSetConfig {
|
|
imageSize: Enums.Size;
|
|
maxImageHeight: number;
|
|
constructor(obj?: any);
|
|
toJSON(): {
|
|
imageSize: string;
|
|
maxImageHeight: number;
|
|
};
|
|
}
|
|
export declare class MediaConfig {
|
|
defaultPoster: string;
|
|
allowInlinePlayback: boolean;
|
|
constructor(obj?: any);
|
|
toJSON(): {
|
|
defaultPoster: string;
|
|
allowInlinePlayback: boolean;
|
|
};
|
|
}
|
|
export declare class FactTextDefinition {
|
|
size: Enums.TextSize;
|
|
color: Enums.TextColor;
|
|
isSubtle: boolean;
|
|
weight: Enums.TextWeight;
|
|
wrap: boolean;
|
|
constructor(obj?: any);
|
|
getDefaultWeight(): Enums.TextWeight;
|
|
toJSON(): any;
|
|
}
|
|
export declare class FactTitleDefinition extends FactTextDefinition {
|
|
maxWidth?: number;
|
|
weight: Enums.TextWeight;
|
|
constructor(obj?: any);
|
|
getDefaultWeight(): Enums.TextWeight;
|
|
}
|
|
export declare class FactSetConfig {
|
|
readonly title: FactTitleDefinition;
|
|
readonly value: FactTextDefinition;
|
|
spacing: number;
|
|
constructor(obj?: any);
|
|
}
|
|
export declare class ShowCardActionConfig {
|
|
actionMode: Enums.ShowCardActionMode;
|
|
inlineTopMargin: number;
|
|
style?: string;
|
|
constructor(obj?: any);
|
|
toJSON(): {
|
|
actionMode: string;
|
|
inlineTopMargin: number;
|
|
style: string;
|
|
};
|
|
}
|
|
export declare class ActionsConfig {
|
|
maxActions: number;
|
|
spacing: Enums.Spacing;
|
|
buttonSpacing: number;
|
|
readonly showCard: ShowCardActionConfig;
|
|
preExpandSingleShowCardAction?: boolean;
|
|
actionsOrientation: Enums.Orientation;
|
|
actionAlignment: Enums.ActionAlignment;
|
|
iconPlacement: Enums.ActionIconPlacement;
|
|
allowTitleToWrap: boolean;
|
|
iconSize: number;
|
|
constructor(obj?: any);
|
|
toJSON(): {
|
|
maxActions: number;
|
|
spacing: string;
|
|
buttonSpacing: number;
|
|
showCard: ShowCardActionConfig;
|
|
preExpandSingleShowCardAction: boolean;
|
|
actionsOrientation: string;
|
|
actionAlignment: string;
|
|
};
|
|
}
|
|
export declare class ColorSetDefinition {
|
|
private parseSingleColor;
|
|
default: TextColorDefinition;
|
|
dark: TextColorDefinition;
|
|
light: TextColorDefinition;
|
|
accent: TextColorDefinition;
|
|
good: TextColorDefinition;
|
|
warning: TextColorDefinition;
|
|
attention: TextColorDefinition;
|
|
constructor(obj?: any);
|
|
parse(obj: any): void;
|
|
}
|
|
export declare class ContainerStyleDefinition {
|
|
backgroundColor?: string;
|
|
readonly foregroundColors: ColorSetDefinition;
|
|
highlightBackgroundColor?: string;
|
|
highlightForegroundColor?: string;
|
|
parse(obj: any): void;
|
|
constructor(obj?: any);
|
|
readonly isBuiltIn: boolean;
|
|
}
|
|
export interface ILineHeightDefinitions {
|
|
small: number;
|
|
medium: number;
|
|
default: number;
|
|
large: number;
|
|
extraLarge: number;
|
|
}
|
|
export declare class ContainerStyleSet {
|
|
private _allStyles;
|
|
constructor(obj?: any);
|
|
toJSON(): any;
|
|
getStyleByName(name: string, defaultValue?: ContainerStyleDefinition): ContainerStyleDefinition;
|
|
readonly default: ContainerStyleDefinition;
|
|
readonly emphasis: ContainerStyleDefinition;
|
|
}
|
|
export declare class Version {
|
|
private _versionString;
|
|
private _major;
|
|
private _minor;
|
|
private _isValid;
|
|
private _label;
|
|
constructor(major?: number, minor?: number, label?: string);
|
|
static parse(versionString: string, errors?: Array<IValidationError>): Version;
|
|
toString(): string;
|
|
compareTo(otherVersion: Version): number;
|
|
readonly label: string;
|
|
readonly major: number;
|
|
readonly minor: number;
|
|
readonly isValid: boolean;
|
|
}
|
|
export declare type HostCapabilityVersion = Version | "*";
|
|
export declare type HostCapabilityMap = {
|
|
[key: string]: HostCapabilityVersion;
|
|
};
|
|
export declare class HostCapabilities {
|
|
private setCapability;
|
|
capabilities: HostCapabilityMap;
|
|
parse(json: any, errors?: Array<IValidationError>): void;
|
|
hasCapability(name: string, version: HostCapabilityVersion): boolean;
|
|
areAllMet(hostCapabilities: HostCapabilities): boolean;
|
|
}
|
|
export interface IFontSizeDefinitions {
|
|
small: number;
|
|
default: number;
|
|
medium: number;
|
|
large: number;
|
|
extraLarge: number;
|
|
}
|
|
export interface IFontWeightDefinitions {
|
|
lighter: number;
|
|
default: number;
|
|
bolder: number;
|
|
}
|
|
export declare class FontTypeDefinition {
|
|
static readonly monospace: FontTypeDefinition;
|
|
fontFamily?: string;
|
|
fontSizes: IFontSizeDefinitions;
|
|
fontWeights: IFontWeightDefinitions;
|
|
constructor(fontFamily?: string);
|
|
parse(obj?: any): void;
|
|
}
|
|
export declare class FontTypeSet {
|
|
default: FontTypeDefinition;
|
|
monospace: FontTypeDefinition;
|
|
constructor(obj?: any);
|
|
getStyleDefinition(style: Enums.FontType): FontTypeDefinition;
|
|
}
|
|
export declare class HostConfig {
|
|
readonly hostCapabilities: HostCapabilities;
|
|
private _legacyFontType;
|
|
choiceSetInputValueSeparator: string;
|
|
supportsInteractivity: boolean;
|
|
lineHeights?: ILineHeightDefinitions;
|
|
fontTypes: FontTypeSet;
|
|
readonly spacing: {
|
|
small: number;
|
|
default: number;
|
|
medium: number;
|
|
large: number;
|
|
extraLarge: number;
|
|
padding: number;
|
|
};
|
|
readonly separator: {
|
|
lineThickness: number;
|
|
lineColor: string;
|
|
};
|
|
readonly imageSizes: {
|
|
small: number;
|
|
medium: number;
|
|
large: number;
|
|
};
|
|
readonly containerStyles: ContainerStyleSet;
|
|
readonly actions: ActionsConfig;
|
|
readonly adaptiveCard: AdaptiveCardConfig;
|
|
readonly imageSet: ImageSetConfig;
|
|
readonly media: MediaConfig;
|
|
readonly factSet: FactSetConfig;
|
|
cssClassNamePrefix: string;
|
|
alwaysAllowBleed: boolean;
|
|
constructor(obj?: any);
|
|
getFontTypeDefinition(style?: Enums.FontType): FontTypeDefinition;
|
|
getEffectiveSpacing(spacing: Enums.Spacing): number;
|
|
paddingDefinitionToSpacingDefinition(paddingDefinition: Shared.PaddingDefinition): Shared.SpacingDefinition;
|
|
makeCssClassNames(...classNames: string[]): string[];
|
|
makeCssClassName(...classNames: string[]): string;
|
|
fontFamily: string;
|
|
readonly fontSizes: IFontSizeDefinitions;
|
|
readonly fontWeights: IFontWeightDefinitions;
|
|
}
|