Upgrade gulp
This commit is contained in:
Родитель
59802a7cfe
Коммит
b1fee80583
|
@ -0,0 +1,12 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
title: string;
|
||||
level: 'info' | 'warning' | 'error' | 'success';
|
||||
theme: 'default' | 'emphasis';
|
||||
}
|
||||
export declare class Banner extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private readonly backgroundColor;
|
||||
private readonly color;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,10 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
remains: number;
|
||||
theme: 'default' | 'emphasis';
|
||||
marginTop?: number;
|
||||
}
|
||||
export declare class CountDown extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,34 @@
|
|||
import React from 'react';
|
||||
import { ImageStyle, StyleProp, ViewStyle } from 'react-native';
|
||||
interface IProps {
|
||||
url: string;
|
||||
flex?: number;
|
||||
resizeMode?: 'stretch' | 'repeat' | 'repeatHorizontally' | 'repeatVertically';
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
paddingTop?: number;
|
||||
paddingBottom?: number;
|
||||
paddingLeft?: number;
|
||||
paddingRight?: number;
|
||||
containerStyle?: StyleProp<ViewStyle>;
|
||||
imageStyle?: StyleProp<ImageStyle>;
|
||||
onLoad?: (data: any) => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
interface IState {
|
||||
containerRatio: number;
|
||||
imgRatio: number;
|
||||
}
|
||||
export declare class ImageBackground extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps);
|
||||
componentDidMount(): void;
|
||||
render(): JSX.Element;
|
||||
private onLoad;
|
||||
private onError;
|
||||
private onLayout;
|
||||
private fetchImageSize;
|
||||
private readonly resizeMethod;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,39 @@
|
|||
import * as React from 'react';
|
||||
import { ImageStyle, LayoutChangeEvent, StyleProp } from 'react-native';
|
||||
interface IProps {
|
||||
url: string;
|
||||
alt?: string;
|
||||
flex?: number;
|
||||
alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
||||
width?: number;
|
||||
height?: number;
|
||||
mode?: 'avatar' | 'default';
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
paddingTop?: number;
|
||||
paddingBottom?: number;
|
||||
paddingLeft?: number;
|
||||
paddingRight?: number;
|
||||
style?: StyleProp<ImageStyle>;
|
||||
onPress?: () => void;
|
||||
onLayout?: (event: LayoutChangeEvent) => void;
|
||||
onLoad?: (data: any) => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
interface IState {
|
||||
loaded: boolean;
|
||||
}
|
||||
export declare class ImageBlock extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps);
|
||||
render(): JSX.Element;
|
||||
private renderTouchableBlock;
|
||||
private renderNonTouchableBlock;
|
||||
private renderPlaceholder;
|
||||
private renderImage;
|
||||
private onError;
|
||||
private onLoad;
|
||||
private readonly borderRadius;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,19 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
index: number;
|
||||
title: string;
|
||||
focused: boolean;
|
||||
theme: 'default' | 'emphasis';
|
||||
accessibilityLabel: string;
|
||||
onPress: (index: number) => void;
|
||||
}
|
||||
export declare class Label extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private onPress;
|
||||
private readonly fontSize;
|
||||
private readonly fontWeight;
|
||||
private readonly paddingVertical;
|
||||
private readonly color;
|
||||
private readonly backgroundColor;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
interface IProps {
|
||||
height?: number;
|
||||
noMargin?: boolean;
|
||||
}
|
||||
export declare class SeparateLine extends React.PureComponent<IProps> {
|
||||
render(): JSX.Element;
|
||||
private readonly margin;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
import { StyleProp, ViewStyle } from 'react-native';
|
||||
interface IProps {
|
||||
url: string;
|
||||
alt?: string;
|
||||
style?: StyleProp<ViewStyle>;
|
||||
width?: number;
|
||||
height?: number;
|
||||
}
|
||||
export declare class Svg extends React.Component<IProps> {
|
||||
constructor(props: IProps);
|
||||
render(): JSX.Element;
|
||||
private readonly html;
|
||||
private readonly src;
|
||||
private readonly alt;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
remains: number;
|
||||
theme: 'default' | 'emphasis';
|
||||
marginTop?: number;
|
||||
}
|
||||
export declare class Timer extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private readonly timeString;
|
||||
private readonly sec;
|
||||
private readonly min;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,23 @@
|
|||
import * as React from 'react';
|
||||
import { AccessibilityRole, LayoutChangeEvent } from 'react-native';
|
||||
interface IProps {
|
||||
testId?: string;
|
||||
disabled?: boolean;
|
||||
style?: object;
|
||||
accessibilityLabel?: string;
|
||||
accessibilityRole?: AccessibilityRole;
|
||||
hitSlop?: object;
|
||||
activeOpacity?: number;
|
||||
onPress: (data: any) => void;
|
||||
onLongPress?: (data: any) => void;
|
||||
onLayout?: (event: LayoutChangeEvent) => void;
|
||||
}
|
||||
export declare class Touchable extends React.Component<IProps> {
|
||||
private testId;
|
||||
constructor(props: IProps);
|
||||
componentDidMount(): void;
|
||||
componentWillUnmount(): void;
|
||||
render(): JSX.Element;
|
||||
private onPress;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,10 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
hasSpacing: boolean;
|
||||
}
|
||||
export declare class ButtonGroup extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private readonly topStyles;
|
||||
private readonly flexDirection;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
import { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';
|
||||
interface IProps {
|
||||
flex?: number;
|
||||
fit?: 'content' | 'container';
|
||||
theme?: 'default' | 'emphasis';
|
||||
backgroundImageUrl?: string;
|
||||
onLayout?: (event: LayoutChangeEvent) => void;
|
||||
style?: StyleProp<ViewStyle>;
|
||||
}
|
||||
export declare class Card extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private renderCardContent;
|
||||
private readonly contentFlex;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,15 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
show: boolean;
|
||||
onShow: () => void;
|
||||
onBackgroundPress?: () => void;
|
||||
onRequestClose?: () => void;
|
||||
}
|
||||
export declare class ModalBox extends React.Component<IProps> {
|
||||
constructor(props: IProps);
|
||||
render(): JSX.Element;
|
||||
private onBackgroundPress;
|
||||
private onRequestClose;
|
||||
private onShow;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,61 @@
|
|||
import * as React from 'react';
|
||||
import { StyleProp, ViewStyle } from 'react-native';
|
||||
export interface IButtonProps {
|
||||
title: string;
|
||||
icon?: {
|
||||
url: string;
|
||||
type: 'img';
|
||||
width?: number;
|
||||
height?: number;
|
||||
position?: 'left' | 'top' | 'right' | 'bottom';
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
} | {
|
||||
url: string;
|
||||
type: 'symbol';
|
||||
fontFamily?: string;
|
||||
color?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
position?: 'left' | 'top' | 'right' | 'bottom';
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
};
|
||||
onPress: () => void;
|
||||
accessibilityLabel?: string;
|
||||
disabled?: boolean;
|
||||
color?: string;
|
||||
backgroundColor?: string;
|
||||
fontFamily?: string;
|
||||
fontSize?: number;
|
||||
fontWeight?: 'normal' | 'bold' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
textHorizontalAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
||||
textVerticalAlign?: 'flex-start' | 'flex-end' | 'center';
|
||||
wrap?: 'wrap' | 'nowrap';
|
||||
borderColor?: string;
|
||||
borderRadius?: number;
|
||||
borderWidth?: number;
|
||||
flex?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
paddingTop?: number;
|
||||
paddingBottom?: number;
|
||||
paddingLeft?: number;
|
||||
paddingRight?: number;
|
||||
style?: StyleProp<ViewStyle>;
|
||||
}
|
||||
export declare class Button extends React.Component<IButtonProps> {
|
||||
constructor(props: IButtonProps);
|
||||
render(): JSX.Element;
|
||||
private renderIcon;
|
||||
private renderTitle;
|
||||
private readonly layoutDirection;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T> {
|
||||
title: string;
|
||||
value: T;
|
||||
checked: boolean;
|
||||
theme: 'default' | 'emphasis';
|
||||
onClick: (value: T) => void;
|
||||
}
|
||||
export declare class Checkbox<T> extends React.Component<IProps<T>> {
|
||||
render(): JSX.Element;
|
||||
private onClick;
|
||||
private readonly color;
|
||||
private readonly radioColor;
|
||||
private readonly radioIcon;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,21 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> {
|
||||
choices: T[];
|
||||
selected: V[];
|
||||
onChoose: (value: V) => void;
|
||||
theme: 'default' | 'emphasis';
|
||||
}
|
||||
export declare class CheckList<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> extends React.Component<IProps<T, V>> {
|
||||
render(): JSX.Element;
|
||||
private renderCheckItem;
|
||||
private extractKey;
|
||||
private isValueSelected;
|
||||
private onChoose;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T> {
|
||||
title: string;
|
||||
value: T;
|
||||
selected: boolean;
|
||||
onChoose: (value: T) => void;
|
||||
}
|
||||
export declare class Choice<T> extends React.Component<IProps<T>> {
|
||||
render(): JSX.Element;
|
||||
private onChoose;
|
||||
private readonly lineHeight;
|
||||
private readonly fontSize;
|
||||
private readonly color;
|
||||
private readonly backgroundColor;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,26 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> {
|
||||
choices: T[];
|
||||
selected: V[];
|
||||
show: boolean;
|
||||
onChoose: (value: V) => void;
|
||||
onClose: () => void;
|
||||
}
|
||||
export declare class ChoicePanel<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> extends React.Component<IProps<T, V>> {
|
||||
private panel;
|
||||
render(): JSX.Element;
|
||||
private renderChoice;
|
||||
private renderSeparator;
|
||||
private extractKey;
|
||||
private isValueSelected;
|
||||
private onChoose;
|
||||
private onClose;
|
||||
private onShow;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
avatar: string;
|
||||
mainInfo: string;
|
||||
subInfo: string;
|
||||
hiddenFields: any;
|
||||
theme: 'default' | 'emphasis';
|
||||
onSelect?: (data: any) => void;
|
||||
}
|
||||
export declare class Contact extends React.Component<IProps> {
|
||||
render(): JSX.Element;
|
||||
private renderTouchableBlock;
|
||||
private renderNonTouchableBlock;
|
||||
private renderContent;
|
||||
private onPress;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,22 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
value: string;
|
||||
show: boolean;
|
||||
onValueChange: (value: string) => void;
|
||||
onSave: () => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
export declare class DatePanel extends React.Component<IProps> {
|
||||
private panel;
|
||||
componentDidUpdate(prevProps: IProps): void;
|
||||
render(): JSX.Element;
|
||||
private renderCancelButton;
|
||||
private renderSaveButton;
|
||||
private showPickerAndroid;
|
||||
private onCancel;
|
||||
private onSave;
|
||||
private onShow;
|
||||
private onDateChange;
|
||||
private readonly show;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,46 @@
|
|||
import * as React from 'react';
|
||||
import { KeyboardTypeOptions, ReturnKeyTypeOptions, StyleProp, TextStyle } from 'react-native';
|
||||
interface IProps {
|
||||
placeholder: string;
|
||||
value: string;
|
||||
keyboardType?: KeyboardTypeOptions;
|
||||
returnKeyType?: ReturnKeyTypeOptions;
|
||||
numberOfLines?: number;
|
||||
theme?: 'default' | 'emphasis';
|
||||
flex?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
style?: StyleProp<TextStyle>;
|
||||
onValueChange?: (input: string) => void;
|
||||
onFocus?: () => void;
|
||||
onBlur?: () => void;
|
||||
validateInput?: (input: string) => boolean;
|
||||
}
|
||||
interface IState {
|
||||
focused: boolean;
|
||||
}
|
||||
export declare class InputBox extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps);
|
||||
render(): JSX.Element;
|
||||
private onValueChange;
|
||||
private onBlur;
|
||||
private onFocus;
|
||||
private validateInput;
|
||||
private readonly isMultiLine;
|
||||
private readonly lineHeight;
|
||||
private readonly fontSize;
|
||||
private readonly fontWeight;
|
||||
private readonly paddingVertical;
|
||||
private readonly paddingHorizontal;
|
||||
private readonly numberOfLine;
|
||||
private readonly height;
|
||||
private readonly color;
|
||||
private readonly backgroundColor;
|
||||
private readonly borderColor;
|
||||
private readonly placeholderColor;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,61 @@
|
|||
import * as React from 'react';
|
||||
import { KeyboardTypeOptions, ReturnKeyTypeOptions, StyleProp, TextStyle } from 'react-native';
|
||||
interface IProps {
|
||||
placeholder: string;
|
||||
value: string;
|
||||
labels: Array<{
|
||||
title: string;
|
||||
}>;
|
||||
suggestionView: JSX.Element;
|
||||
focused: boolean;
|
||||
keyboardType?: KeyboardTypeOptions;
|
||||
returnKeyType?: ReturnKeyTypeOptions;
|
||||
numberOfLines?: number;
|
||||
theme?: 'default' | 'emphasis';
|
||||
flex?: number;
|
||||
width?: number;
|
||||
marginTop?: number;
|
||||
marginBottom?: number;
|
||||
marginLeft?: number;
|
||||
marginRight?: number;
|
||||
style?: StyleProp<TextStyle>;
|
||||
onRequestSuggestion?: (input: string) => void;
|
||||
onFocus?: () => void;
|
||||
onBlur?: () => void;
|
||||
onLabelRemove?: (index: number) => void;
|
||||
validateInput?: (input: string) => boolean;
|
||||
}
|
||||
interface IState {
|
||||
focused: boolean;
|
||||
labelFocusIndex: number;
|
||||
}
|
||||
export declare class LabelInput extends React.Component<IProps, IState> {
|
||||
private inputBox;
|
||||
constructor(props: IProps);
|
||||
componentDidUpdate(prevProps: IProps, prevState: IState): void;
|
||||
render(): JSX.Element;
|
||||
private renderInputArea;
|
||||
private renderLabels;
|
||||
private renderInputBox;
|
||||
private renderSuggestions;
|
||||
private onValueChange;
|
||||
private onLabelPress;
|
||||
private onKeyPress;
|
||||
private onSubmitEditing;
|
||||
private onBlur;
|
||||
private onFocus;
|
||||
private validateInput;
|
||||
private readonly labelLength;
|
||||
private readonly isMultiLine;
|
||||
private readonly fontSize;
|
||||
private readonly fontWeight;
|
||||
private readonly lineHeight;
|
||||
private readonly height;
|
||||
private readonly paddingVertical;
|
||||
private readonly paddingHorizontal;
|
||||
private readonly color;
|
||||
private readonly backgroundColor;
|
||||
private readonly borderColor;
|
||||
private readonly placeholderColor;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T> {
|
||||
title: string;
|
||||
value: T;
|
||||
checked: boolean;
|
||||
theme: 'default' | 'emphasis';
|
||||
onClick: (value: T) => void;
|
||||
}
|
||||
export declare class RadioBox<T> extends React.Component<IProps<T>> {
|
||||
render(): JSX.Element;
|
||||
private onClick;
|
||||
private readonly color;
|
||||
private readonly radioColor;
|
||||
private readonly radioIcon;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,21 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> {
|
||||
choices: T[];
|
||||
selected: V;
|
||||
onChoose: (value: V) => void;
|
||||
theme: 'default' | 'emphasis';
|
||||
}
|
||||
export declare class RadioList<T extends {
|
||||
title: string;
|
||||
value: V;
|
||||
}, V> extends React.Component<IProps<T, V>> {
|
||||
render(): JSX.Element;
|
||||
private renderCheckItem;
|
||||
private extractKey;
|
||||
private isValueSelected;
|
||||
private onChoose;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,23 @@
|
|||
import * as React from 'react';
|
||||
interface IProps {
|
||||
value: string;
|
||||
show: boolean;
|
||||
onValueChange: (value: string) => void;
|
||||
onSave: () => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
export declare class TimePanel extends React.Component<IProps> {
|
||||
private panel;
|
||||
componentDidUpdate(prevProps: IProps): void;
|
||||
render(): JSX.Element;
|
||||
private renderCancelButton;
|
||||
private renderSaveButton;
|
||||
private showPickerAndroid;
|
||||
private onCancel;
|
||||
private onSave;
|
||||
private onShow;
|
||||
private onTimeChangeIos;
|
||||
private onTimeChange;
|
||||
private readonly show;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
interface IProps<T> {
|
||||
title: string;
|
||||
value: T;
|
||||
checked: boolean;
|
||||
marginTop?: number;
|
||||
theme: 'default' | 'emphasis';
|
||||
onClick: (value: T) => void;
|
||||
}
|
||||
export declare class Toggle<T> extends React.Component<IProps<T>> {
|
||||
render(): JSX.Element;
|
||||
private onClick;
|
||||
private readonly color;
|
||||
private readonly switchOffColor;
|
||||
private readonly switchOnColor;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,11 @@
|
|||
import { HostConfig } from './Types';
|
||||
export declare class ConfigManager {
|
||||
private defaultConfig;
|
||||
private static sharedInstance;
|
||||
private constructor();
|
||||
static getInstance(): ConfigManager;
|
||||
static loadConfig(): HostConfig;
|
||||
static parseConfig(json: any): HostConfig;
|
||||
getDefaultConfig(): HostConfig;
|
||||
getConfig(override?: any): HostConfig;
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
export declare class SpacingConfig {
|
||||
default: number;
|
||||
small: number;
|
||||
medium: number;
|
||||
large: number;
|
||||
extraLarge: number;
|
||||
padding: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: SpacingConfig[]): SpacingConfig;
|
||||
}
|
||||
export declare class SeparatorConfig {
|
||||
thickness: number;
|
||||
color: string;
|
||||
spacing: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: SeparatorConfig[]): SeparatorConfig;
|
||||
}
|
||||
export declare class FontSizeConfig {
|
||||
default: number;
|
||||
small: number;
|
||||
medium: number;
|
||||
large: number;
|
||||
extraLarge: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: FontSizeConfig[]): FontSizeConfig;
|
||||
}
|
||||
export declare class FontWeightConfig {
|
||||
default: 'normal' | 'bold' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
lighter: 'normal' | 'bold' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
bolder: 'normal' | 'bold' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
constructor(json?: any);
|
||||
combine(...args: FontWeightConfig[]): FontWeightConfig;
|
||||
}
|
||||
export declare class ColorConfig {
|
||||
default: string;
|
||||
subtle: string;
|
||||
constructor(json?: any);
|
||||
combine(...args: ColorConfig[]): ColorConfig;
|
||||
}
|
||||
export declare class ColorSetConfig {
|
||||
default: ColorConfig;
|
||||
dark: ColorConfig;
|
||||
light: ColorConfig;
|
||||
accent: ColorConfig;
|
||||
attention: ColorConfig;
|
||||
good: ColorConfig;
|
||||
warning: ColorConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: ColorSetConfig[]): ColorSetConfig;
|
||||
}
|
||||
export declare class ThemeConfig {
|
||||
background: string;
|
||||
foreground: ColorSetConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: ThemeConfig[]): ThemeConfig;
|
||||
}
|
||||
export declare class ContainerConfig {
|
||||
default: ThemeConfig;
|
||||
emphasis: ThemeConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: ContainerConfig[]): ContainerConfig;
|
||||
}
|
||||
export declare class ImageSizeConfig {
|
||||
small: number;
|
||||
medium: number;
|
||||
large: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: ImageSizeConfig[]): ImageSizeConfig;
|
||||
}
|
||||
export declare class ShowCardActionConfig {
|
||||
mode: 'Inline' | 'Popup' | 'InlineEdgeToEdge';
|
||||
margin: number;
|
||||
style: 'default' | 'emphasis';
|
||||
constructor(json?: any);
|
||||
combine(...args: ShowCardActionConfig[]): ShowCardActionConfig;
|
||||
}
|
||||
export declare class ActionConfig {
|
||||
capacity: number;
|
||||
actionSetSpacing: 'default' | 'small' | 'medium' | 'large' | 'extraLarge' | 'padding';
|
||||
actionSpacing: number;
|
||||
showCard: ShowCardActionConfig;
|
||||
cardExpanding: boolean;
|
||||
direction: 'horizontal' | 'vertically';
|
||||
align: 'left' | 'right' | 'center' | 'stretch';
|
||||
iconPosition: 'LeftOfTitle' | 'AboveTitle';
|
||||
iconSize: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: ActionConfig[]): ActionConfig;
|
||||
}
|
||||
export declare class CardConfig {
|
||||
allowCustomStyle: boolean;
|
||||
constructor(json?: any);
|
||||
combine(...args: CardConfig[]): CardConfig;
|
||||
}
|
||||
export declare class ImageSetConfig {
|
||||
imageSize: 'small' | 'medium' | 'large' | 'auto' | 'stretch';
|
||||
maxImageHeight: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: ImageSetConfig[]): ImageSetConfig;
|
||||
}
|
||||
export declare class FactValueConfig {
|
||||
size: 'default' | 'small' | 'medium' | 'large' | 'extraLarge';
|
||||
color: 'default' | 'accent' | 'attention' | 'good' | 'warning';
|
||||
isSubtle: boolean;
|
||||
weight: 'default' | 'lighter' | 'bolder';
|
||||
wrap: boolean;
|
||||
constructor(json?: any);
|
||||
combine(...args: FactValueConfig[]): FactValueConfig;
|
||||
}
|
||||
export declare class FactTitleConfig {
|
||||
size: 'default' | 'small' | 'medium' | 'large' | 'extraLarge';
|
||||
color: 'default' | 'accent' | 'attention' | 'good' | 'warning';
|
||||
isSubtle: boolean;
|
||||
weight: 'default' | 'lighter' | 'bolder';
|
||||
wrap: boolean;
|
||||
maxWidth: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: FactTitleConfig[]): FactTitleConfig;
|
||||
}
|
||||
export declare class FactSetConfig {
|
||||
title: FactTitleConfig;
|
||||
value: FactValueConfig;
|
||||
margin: number;
|
||||
constructor(json?: any);
|
||||
combine(...args: FactSetConfig[]): FactSetConfig;
|
||||
}
|
||||
export declare class InputThemeConfig {
|
||||
color: string;
|
||||
focusColor: string;
|
||||
backgroundColor: string;
|
||||
focusBackgroundColor: string;
|
||||
borderColor: string;
|
||||
focusBorderColor: string;
|
||||
constructor(json?: any);
|
||||
combine(...args: InputThemeConfig[]): InputThemeConfig;
|
||||
}
|
||||
export declare class InputConfig {
|
||||
default: InputThemeConfig;
|
||||
emphasis: InputThemeConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: InputConfig[]): InputConfig;
|
||||
}
|
||||
export declare class CheckboxColorConfig {
|
||||
checked: string;
|
||||
unchecked: string;
|
||||
constructor(json?: any);
|
||||
combine(...args: CheckboxColorConfig[]): CheckboxColorConfig;
|
||||
}
|
||||
export declare class CheckboxTitleConfig {
|
||||
color: string;
|
||||
constructor(json?: any);
|
||||
combine(...args: CheckboxTitleConfig[]): CheckboxTitleConfig;
|
||||
}
|
||||
export declare class CheckboxThemeConfig {
|
||||
title: CheckboxTitleConfig;
|
||||
box: CheckboxColorConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: CheckboxThemeConfig[]): CheckboxThemeConfig;
|
||||
}
|
||||
export declare class CheckboxConfig {
|
||||
default: CheckboxThemeConfig;
|
||||
emphasis: CheckboxThemeConfig;
|
||||
constructor(json?: any);
|
||||
combine(...args: CheckboxConfig[]): CheckboxConfig;
|
||||
}
|
||||
export declare class MediaConfig {
|
||||
defaultPosterUrl: string;
|
||||
playButtonUrl: string;
|
||||
constructor(json?: any);
|
||||
combine(...args: MediaConfig[]): MediaConfig;
|
||||
}
|
||||
export declare class HostConfig {
|
||||
spacing: SpacingConfig;
|
||||
separator: SeparatorConfig;
|
||||
supportInteractive: boolean;
|
||||
fontFamily: string;
|
||||
fontSize: FontSizeConfig;
|
||||
fontWeight: FontWeightConfig;
|
||||
container: ContainerConfig;
|
||||
imageSize: ImageSizeConfig;
|
||||
action: ActionConfig;
|
||||
card: CardConfig;
|
||||
imageSet: ImageSetConfig;
|
||||
factSet: FactSetConfig;
|
||||
media: MediaConfig;
|
||||
input: InputConfig;
|
||||
checkbox: CheckboxConfig;
|
||||
mode: 'release' | 'debug';
|
||||
constructor(json?: any);
|
||||
combine(...args: HostConfig[]): HostConfig;
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
import { CardModel } from '../Models/Cards/Card';
|
||||
import { TreeNode } from '../Shared/Types';
|
||||
import { FormStore } from './FormStore';
|
||||
import { SchemaStore } from './SchemaStore';
|
||||
export declare class CardContext extends TreeNode<CardContext> {
|
||||
private onError?;
|
||||
private onInfo?;
|
||||
private onWarning?;
|
||||
private onFocus?;
|
||||
private onBlur?;
|
||||
private onOpenUrlAction?;
|
||||
private onShowCardAction?;
|
||||
private onSubmitAction?;
|
||||
private onCallbackAction?;
|
||||
private onSelectAction?;
|
||||
readonly form: FormStore;
|
||||
readonly schemas: SchemaStore;
|
||||
readonly children: CardContext[];
|
||||
fit: 'content' | 'background';
|
||||
private constructor();
|
||||
static createInstance(parent?: CardContext): CardContext;
|
||||
registerErrorHandler(handler: (error: any) => void): void;
|
||||
registerInfoHandler(handler: (info: any) => void): void;
|
||||
registerWarningHandler(handler: (warning: any) => void): void;
|
||||
registerFocusHandler(handler: () => void): void;
|
||||
registerBlurHandler(handler: () => void): void;
|
||||
registerOpenUrlActionHandler(handler: (url: string, method: string, data: any) => Promise<any>): void;
|
||||
registerShowCardActionHandler(handler: (card: CardModel) => Promise<any>): void;
|
||||
registerSubmitActionHandler(handler: (data: any) => Promise<any>): void;
|
||||
registerCallbackActionHandler(handler: (url: string, parameters: {
|
||||
[key: string]: string;
|
||||
}) => Promise<any>): void;
|
||||
registerSelectActionHandler(handler: (data: any) => Promise<any>): void;
|
||||
private findRequiredContext;
|
||||
readonly errorHandler: (error: any) => void;
|
||||
readonly infoHandler: (info: any) => void;
|
||||
readonly warningHandler: (warning: any) => void;
|
||||
readonly focusHandler: () => void;
|
||||
readonly blurHandler: () => void;
|
||||
readonly openUrlActionHandler: (url: string, method: string, data: any) => Promise<any>;
|
||||
readonly showCardActionHandler: (card: CardModel) => Promise<any>;
|
||||
readonly submitActionHandler: (data: any) => Promise<any>;
|
||||
readonly callbackActionHandler: (url: string, parameters: {
|
||||
[key: string]: string;
|
||||
}) => Promise<any>;
|
||||
readonly selectActionHandler: (data: any) => Promise<any>;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
export interface FormField {
|
||||
id: string;
|
||||
value: string;
|
||||
isValid: boolean;
|
||||
}
|
||||
export declare class FormStore {
|
||||
fields: {
|
||||
[id: string]: FormField;
|
||||
};
|
||||
listeners: {
|
||||
[id: string]: Array<(field: FormField) => void>;
|
||||
};
|
||||
private constructor();
|
||||
static createInstance(): FormStore;
|
||||
write(field: FormField): void;
|
||||
read(id: string): FormField;
|
||||
read(id: string[]): FormField[];
|
||||
read(): FormField[];
|
||||
isValid(): boolean;
|
||||
isValid(id: string): boolean;
|
||||
registerListener(id: string, listener: (field: FormField) => void): void;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { HostConfig } from '../Config/Types';
|
||||
export declare class HostContext {
|
||||
private config;
|
||||
private static sharedInstance;
|
||||
private constructor();
|
||||
static getInstance(): HostContext;
|
||||
applyConfig(config: any): void;
|
||||
getConfig(): HostConfig;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import { AbstractModel } from '../Models/Abstract/AbstractModel';
|
||||
import { SchemaElement } from '../Schemas/SchemaValidator';
|
||||
export declare class SchemaStore {
|
||||
private schemas;
|
||||
private constructor();
|
||||
static createInstance(): SchemaStore;
|
||||
read(type: string): SchemaElement<AbstractModel>;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { SchemaResult } from '../../Schemas/SchemaValidator';
|
||||
import { TreeNode } from '../../Shared/Types';
|
||||
export declare abstract class AbstractModel extends TreeNode<AbstractModel> {
|
||||
readonly type: string;
|
||||
readonly rawData: any;
|
||||
context: CardContext;
|
||||
protected schemaCheckResult: SchemaResult;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
protected outputSchemaMessage(): void;
|
||||
protected shallowCheckSchema(json: any): SchemaResult;
|
||||
protected deepCheckSchema(): SchemaResult;
|
||||
readonly isSchemaCheckPassed: boolean;
|
||||
readonly children: AbstractModel[];
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
import { AbstractModel } from './AbstractModel';
|
||||
export declare abstract class ActionModel extends AbstractModel {
|
||||
abstract onAction(onSuccess: (data: any) => void, onError: (error: any) => void): void;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from './AbstractModel';
|
||||
export declare class ContentModel extends AbstractModel {
|
||||
id: string;
|
||||
spacing: 'none' | 'default' | 'small' | 'medium' | 'large' | 'extraLarge' | 'padding';
|
||||
separator: boolean;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { FormField } from '../../Contexts/FormStore';
|
||||
import { AbstractModel } from './AbstractModel';
|
||||
import { ContentModel } from './ContentModel';
|
||||
export declare abstract class InputModel extends ContentModel {
|
||||
id: string;
|
||||
value: string;
|
||||
input: string;
|
||||
placeholder: string;
|
||||
onStoreUpdate: (value: string) => void;
|
||||
abstract isValueValid: (value?: string) => boolean;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onInput: (value: string) => void;
|
||||
storeListener: (field: FormField) => void;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { OpenUrlActionModel } from '../Actions/OpenUrlAction';
|
||||
import { SubmitActionModel } from '../Actions/SubmitAction';
|
||||
import { AbstractModel } from './AbstractModel';
|
||||
import { ContentModel } from './ContentModel';
|
||||
export declare abstract class ScopeModel extends ContentModel {
|
||||
selectAction: OpenUrlActionModel | SubmitActionModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
export declare class CallbackActionModel extends ActionModel {
|
||||
url: string;
|
||||
parameters: {
|
||||
[key: string]: string;
|
||||
};
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onAction: (onSuccess: (data: any) => void, onError: (error: any) => void) => void;
|
||||
private readonly params;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
export declare class OpenUrlActionModel extends ActionModel {
|
||||
title: string;
|
||||
method: 'GET' | 'POST';
|
||||
data: any;
|
||||
url: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onAction: (onSuccess: (data: any) => void, onError: (error: any) => void) => void;
|
||||
private populateFormData;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
export declare class SelectActionModel extends ActionModel {
|
||||
mainTitle: string;
|
||||
subTitle: string;
|
||||
data: any;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onAction: (onSuccess: (data: any) => void, onError: (error: any) => void) => void;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
import { CardModel } from '../Cards/Card';
|
||||
export declare class ShowCardActionModel extends ActionModel {
|
||||
title: string;
|
||||
card: CardModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onAction: (onSuccess: (data: any) => void, onError: (error: any) => void) => void;
|
||||
readonly children: CardModel[];
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
export declare class SubmitActionModel extends ActionModel {
|
||||
title: string;
|
||||
data: any;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onAction: (onSuccess: (data: any) => void, onError: (error: any) => void) => void;
|
||||
private populateFormData;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
export declare class BackgroundImageModel extends AbstractModel {
|
||||
type: 'BackgroundImage';
|
||||
url: string;
|
||||
mode: 'stretch' | 'repeatHorizontally' | 'repeatVertically' | 'repeat';
|
||||
horizontalAlignment: 'left' | 'center' | 'right';
|
||||
verticalAlignment: 'top' | 'center' | 'bottom';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ScopeModel } from '../Abstract/ScopeModel';
|
||||
export declare class ImageModel extends ScopeModel {
|
||||
url: string;
|
||||
alt: string;
|
||||
horizontalAlignment: 'left' | 'center' | 'right';
|
||||
size: 'small' | 'medium' | 'large' | 'auto' | 'stretch';
|
||||
style: 'person' | 'default';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: (import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel)[];
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
export declare class TextBlockModel extends ContentModel {
|
||||
text: string;
|
||||
color?: 'default' | 'dark' | 'light' | 'accent' | 'good' | 'warning' | 'attention';
|
||||
horizontalAlignment?: 'left' | 'center' | 'right';
|
||||
isSubtle?: boolean;
|
||||
maxLines?: number;
|
||||
size?: 'default' | 'small' | 'medium' | 'large' | 'extraLarge';
|
||||
weight?: 'default' | 'lighter' | 'bolder';
|
||||
wrap?: boolean;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
import { OpenUrlActionModel } from '../Actions/OpenUrlAction';
|
||||
import { ShowCardActionModel } from '../Actions/ShowCardAction';
|
||||
import { SubmitActionModel } from '../Actions/SubmitAction';
|
||||
export declare class CardModel extends ContentModel {
|
||||
body: ContentModel[];
|
||||
actions: Array<OpenUrlActionModel | SubmitActionModel | ShowCardActionModel>;
|
||||
backgroundImage: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: (ContentModel | OpenUrlActionModel | ShowCardActionModel | SubmitActionModel)[];
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
import { ScopeModel } from '../Abstract/ScopeModel';
|
||||
import { BackgroundImageModel } from '../CardElements/BackgroundImage';
|
||||
export declare class ColumnModel extends ScopeModel {
|
||||
items: ContentModel[];
|
||||
width: 'auto' | 'stretch' | number;
|
||||
height: 'auto' | 'stretch';
|
||||
verticalContentAlignment: 'top' | 'center' | 'bottom';
|
||||
style: 'default' | 'emphasis';
|
||||
backgroundImage: BackgroundImageModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[];
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ScopeModel } from '../Abstract/ScopeModel';
|
||||
import { ColumnModel } from './Column';
|
||||
export declare class ColumnSetModel extends ScopeModel {
|
||||
columns: ColumnModel[];
|
||||
height: 'auto' | 'stretch';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: (import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | ColumnModel)[];
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
import { ScopeModel } from '../Abstract/ScopeModel';
|
||||
import { BackgroundImageModel } from '../CardElements/BackgroundImage';
|
||||
export declare class ContainerModel extends ScopeModel {
|
||||
items: ContentModel[];
|
||||
height: 'auto' | 'stretch';
|
||||
verticalContentAlignment: 'top' | 'center' | 'bottom';
|
||||
style: 'default' | 'emphasis';
|
||||
backgroundImage: BackgroundImageModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[];
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
export declare class FactModel extends AbstractModel {
|
||||
title: string;
|
||||
value: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
import { FactModel } from './Fact';
|
||||
export declare class FactSetModel extends ContentModel {
|
||||
facts: FactModel[];
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: FactModel[];
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
import { ImageModel } from '../CardElements/Image';
|
||||
export declare class ImageSetModel extends ContentModel {
|
||||
images: ImageModel[];
|
||||
imageSize: 'auto' | 'stretch' | 'small' | 'medium' | 'large';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
readonly children: ImageModel[];
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
export declare class CounterModel extends ContentModel {
|
||||
value: number;
|
||||
format: 'Timer' | 'CountDown';
|
||||
delay: number;
|
||||
callback: ActionModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onFinished: () => void;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ActionModel } from '../Abstract/ActionModel';
|
||||
export declare class ActionModelFactory {
|
||||
static create(json: any, parent: AbstractModel, context: CardContext): ActionModel;
|
||||
static createSet(json: any, parent: AbstractModel, context: CardContext): ActionModel[];
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ContentModel } from '../Abstract/ContentModel';
|
||||
export declare class ContentModelFactory {
|
||||
static create(json: any, parent: AbstractModel, context: CardContext): ContentModel;
|
||||
static createSet(json: any, parent: AbstractModel, context: CardContext): Array<ContentModel>;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { ChoiceSetModel } from './ChoiceSet';
|
||||
export declare class ChoiceInputModel extends AbstractModel {
|
||||
title: string;
|
||||
value: string;
|
||||
parent: ChoiceSetModel;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onSelect: () => void;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { FormField } from '../../Contexts/FormStore';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
import { ChoiceInputModel } from './ChoiceInput';
|
||||
export declare class ChoiceSetModel extends InputModel {
|
||||
choices: ChoiceInputModel[];
|
||||
selected: string;
|
||||
isMultiSelect: boolean;
|
||||
style: 'compact' | 'expanded';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
onInput: (value: string) => void;
|
||||
storeListener: (field: FormField) => void;
|
||||
isValueValid: (value?: string) => boolean;
|
||||
composeSelected: (values: string[]) => string;
|
||||
parseSelected: () => string[];
|
||||
readonly children: ChoiceInputModel[];
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
export declare class DateInputModel extends InputModel {
|
||||
max: string;
|
||||
min: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
export declare class NumberInputModel extends InputModel {
|
||||
max: number;
|
||||
min: number;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { FormField } from '../../Contexts/FormStore';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
import { CallbackActionModel } from '../Actions/CallbackAction';
|
||||
import { CardModel } from '../Cards/Card';
|
||||
export declare class PeoplePickerModel extends InputModel {
|
||||
private suggestionContext;
|
||||
suggestionCard: CardModel;
|
||||
callback: CallbackActionModel;
|
||||
selected: string;
|
||||
onSuggestionReady: (card: CardModel) => void;
|
||||
onSelect: () => void;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
onInput: (value: string) => void;
|
||||
onBlur: () => void;
|
||||
onRemoveContact: (address: string) => void;
|
||||
onSuggestionSelect: (data: any) => Promise<any>;
|
||||
storeListener: (field: FormField) => void;
|
||||
private onCallbackResponse;
|
||||
private tryExtractContactFromInput;
|
||||
readonly children: CallbackActionModel[];
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
export declare class TextInputModel extends InputModel {
|
||||
isMultiline: boolean;
|
||||
maxLength: number;
|
||||
style: 'text' | 'tel' | 'url' | 'email';
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
export declare class TimeInputModel extends InputModel {
|
||||
max: string;
|
||||
min: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import { CardContext } from '../../Contexts/CardContext';
|
||||
import { AbstractModel } from '../Abstract/AbstractModel';
|
||||
import { InputModel } from '../Abstract/InputModel';
|
||||
export declare class ToggleInputModel extends InputModel {
|
||||
title: string;
|
||||
valueOff: string;
|
||||
valueOn: string;
|
||||
constructor(json: any, parent: AbstractModel, context: CardContext);
|
||||
isValueValid: (value?: string) => boolean;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { CallbackActionModel } from '../../Models/Actions/CallbackAction';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class CallbackActionSchema extends SchemaElement<CallbackActionModel> {
|
||||
readonly rules: SchemaRule<CallbackActionModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'url': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'parameters': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
import { OpenUrlActionModel } from '../../Models/Actions/OpenUrlAction';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class OpenUrlActionSchema extends SchemaElement<OpenUrlActionModel> {
|
||||
readonly rules: SchemaRule<OpenUrlActionModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'url': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'-ms-method': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'-ms-data': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import { SelectActionModel } from '../../Models/Actions/SelectAction';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class SelectActionSchema extends SchemaElement<SelectActionModel> {
|
||||
rules?: SchemaRule<SelectActionModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'selectedTextTitle': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'selectedTextSubTitle': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'data': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { ShowCardActionModel } from '../../Models/Actions/ShowCardAction';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ShowCardActionSchema extends SchemaElement<ShowCardActionModel> {
|
||||
readonly rules: SchemaRule<ShowCardActionModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'card': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { SubmitActionModel } from '../../Models/Actions/SubmitAction';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class SubmitActionSchema extends SchemaElement<SubmitActionModel> {
|
||||
readonly rules: SchemaRule<SubmitActionModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'data': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import { BackgroundImageModel } from '../../Models/CardElements/BackgroundImage';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class BackgroundImageSchema extends SchemaElement<BackgroundImageModel> {
|
||||
rules: SchemaRule<BackgroundImageModel>[];
|
||||
protected propsSchemas: {
|
||||
'horizontalAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'verticalAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'mode': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'url': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import { ImageModel } from '../../Models/CardElements/Image';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ImageSchema extends SchemaElement<ImageModel> {
|
||||
rules: SchemaRule<ImageModel>[];
|
||||
protected propsSchemas: {
|
||||
'altText': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'horizontalAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'selectAction': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'size': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'style': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'url': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
import { TextBlockModel } from '../../Models/CardElements/TextBlock';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class TextBlockSchema extends SchemaElement<TextBlockModel> {
|
||||
rules: SchemaRule<TextBlockModel>[];
|
||||
protected propsSchemas: {
|
||||
'color': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'horizontalAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'isSubtle': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
'maxLines': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'size': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'text': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'weight': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'wrap': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
import { CardModel } from '../../Models/Cards/Card';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class CardSchema extends SchemaElement<CardModel> {
|
||||
rules: SchemaRule<CardModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'actions': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'body': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'version': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'fallbackText': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'backgroundImage': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'speak': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'lang': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
import { ColumnModel } from '../../Models/Containers/Column';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ColumnSchema extends SchemaElement<ColumnModel> {
|
||||
rules: SchemaRule<ColumnModel>[];
|
||||
protected propsSchemas: {
|
||||
'items': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'selectAction': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'style': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'width': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'height': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'verticalContentAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'backgroundImage': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
import { ColumnSetModel } from '../../Models/Containers/ColumnSet';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ColumnSetSchema extends SchemaElement<ColumnSetModel> {
|
||||
rules: SchemaRule<ColumnSetModel>[];
|
||||
protected propsSchemas: {
|
||||
'columns': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'selectAction': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'height': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
import { ContainerModel } from '../../Models/Containers/Container';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ContainerSchema extends SchemaElement<ContainerModel> {
|
||||
rules: SchemaRule<ContainerModel>[];
|
||||
protected propsSchemas: {
|
||||
'items': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'selectAction': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'style': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'height': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'verticalContentAlignment': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'backgroundImage': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { FactModel } from '../../Models/Containers/Fact';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class FactSchema extends SchemaElement<FactModel> {
|
||||
rules: SchemaRule<FactModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
import { FactSetModel } from '../../Models/Containers/FactSet';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class FactSetSchema extends SchemaElement<FactSetModel> {
|
||||
rules: SchemaRule<FactSetModel>[];
|
||||
protected propsSchemas: {
|
||||
'facts': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
import { ImageSetModel } from '../../Models/Containers/ImageSet';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ImageSetSchema extends SchemaElement<ImageSetModel> {
|
||||
rules: SchemaRule<ImageSetModel>[];
|
||||
protected propsSchemas: {
|
||||
'images': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'imageSize': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
import { CounterModel } from '../../Models/Customs/Microsoft.Counter';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class CounterSchema extends SchemaElement<CounterModel> {
|
||||
rules: SchemaRule<CounterModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'format': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'delay': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'callback': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { ChoiceInputModel } from '../../Models/Inputs/ChoiceInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ChoiceInputSchema extends SchemaElement<ChoiceInputModel> {
|
||||
rules: SchemaRule<ChoiceInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import { ChoiceSetModel } from '../../Models/Inputs/ChoiceSet';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ChoiceSetSchema extends SchemaElement<ChoiceSetModel> {
|
||||
rules: SchemaRule<ChoiceSetModel>[];
|
||||
protected propsSchemas: {
|
||||
'choices': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'isMultiSelect': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
'style': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
import { DateInputModel } from '../../Models/Inputs/DateInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class DateInputSchema extends SchemaElement<DateInputModel> {
|
||||
rules: SchemaRule<DateInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'max': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'min': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'placeholder': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
import { NumberInputModel } from '../../Models/Inputs/NumberInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class NumberInputSchema extends SchemaElement<NumberInputModel> {
|
||||
rules: SchemaRule<NumberInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'max': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'min': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'placeholder': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
import { PeoplePickerModel } from '../../Models/Inputs/PeoplePicker';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class PeoplePickerSchema extends SchemaElement<PeoplePickerModel> {
|
||||
rules: SchemaRule<PeoplePickerModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'placeholder': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'callback': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import { TextInputModel } from '../../Models/Inputs/TextInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class TextInputSchema extends SchemaElement<TextInputModel> {
|
||||
rules: SchemaRule<TextInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'isMultiline': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
'placeholder': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'style': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
import { TimeInputModel } from '../../Models/Inputs/TimeInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class TimeInputSchema extends SchemaElement<TimeInputModel> {
|
||||
rules: SchemaRule<TimeInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'max': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'min': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'placeholder': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
import { ToggleInputModel } from '../../Models/Inputs/ToggleInput';
|
||||
import { SchemaElement, SchemaRule } from '../SchemaValidator';
|
||||
export declare class ToggleInputSchema extends SchemaElement<ToggleInputModel> {
|
||||
rules: SchemaRule<ToggleInputModel>[];
|
||||
protected propsSchemas: {
|
||||
'id': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'title': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'type': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'value': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'valueOff': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'valueOn': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
};
|
||||
'spacing': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: string[];
|
||||
};
|
||||
'separator': {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts: boolean[];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
export declare type SchemaRule<T> = (value: T) => SchemaResult;
|
||||
export interface SchemaProperty<T> {
|
||||
name: string;
|
||||
isRequired: boolean;
|
||||
accepts?: T[];
|
||||
rules?: SchemaRule<T>[];
|
||||
}
|
||||
export declare abstract class SchemaElement<T> {
|
||||
protected abstract propsSchemas: {
|
||||
[type: string]: SchemaProperty<any>;
|
||||
};
|
||||
abstract readonly rules?: SchemaRule<T>[];
|
||||
readonly requiredProps: SchemaProperty<any>[];
|
||||
readonly props: SchemaProperty<any>[];
|
||||
}
|
||||
export declare class SchemaMessage {
|
||||
readonly level: 'Info' | 'Warning' | 'Error';
|
||||
readonly message: string;
|
||||
constructor(level: 'Info' | 'Warning' | 'Error', message: string);
|
||||
}
|
||||
export declare class SchemaResult {
|
||||
isValid: boolean;
|
||||
messages: SchemaMessage[];
|
||||
constructor(isValid: boolean, ...messages: SchemaMessage[]);
|
||||
combine: (current: SchemaResult) => this;
|
||||
}
|
||||
export declare class SchemaValidator {
|
||||
static shallowCheckElements<T>(json: any, schema: SchemaElement<T>): SchemaResult;
|
||||
static deepCheckElement<T>(model: T, schema: SchemaElement<T>): SchemaResult;
|
||||
static checkProp<T>(value: T, schema: SchemaProperty<T>): SchemaResult;
|
||||
private static checkRules;
|
||||
private static isValuePresent;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export declare class Guid {
|
||||
static newGuid(): string;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export declare class Language {
|
||||
static readonly codes: string[];
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
export interface ITreeNode<T> {
|
||||
parent: T;
|
||||
ancestors: T[];
|
||||
ancestorsAndSelf: T[];
|
||||
children: T[];
|
||||
descends: T[];
|
||||
descendsAndSelf: T[];
|
||||
}
|
||||
export declare abstract class TreeNode<T extends TreeNode<T>> implements ITreeNode<T> {
|
||||
parent: T;
|
||||
constructor(parent: T);
|
||||
readonly ancestors: T[];
|
||||
readonly ancestorsAndSelf: T[];
|
||||
abstract readonly children: T[];
|
||||
readonly descends: T[];
|
||||
readonly descendsAndSelf: T[];
|
||||
}
|
||||
export interface ValidationResult {
|
||||
isValid: boolean;
|
||||
message: string;
|
||||
}
|
||||
export interface Dimension {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export declare enum ActionType {
|
||||
OpenUrl = "Action.OpenUrl",
|
||||
Select = "Action.Select",
|
||||
Submit = "Action.Submit",
|
||||
ShowCard = "Action.ShowCard",
|
||||
Callback = "Action.Callback"
|
||||
}
|
||||
export declare enum ContentType {
|
||||
Column = "Column",
|
||||
ColumnSet = "ColumnSet",
|
||||
Container = "Container",
|
||||
Counter = "Microsoft.Counter",
|
||||
FactSet = "FactSet",
|
||||
Image = "Image",
|
||||
ImageSet = "ImageSet",
|
||||
TextBlock = "TextBlock",
|
||||
TextInput = "Input.Text",
|
||||
NumberInput = "Input.Number",
|
||||
DateInput = "Input.Date",
|
||||
TimeInput = "Input.Time",
|
||||
ToggleInput = "Input.Toggle",
|
||||
ChoiceSetInput = "Input.ChoiceSet",
|
||||
PeoplePicker = "Input.PeoplePicker",
|
||||
AdaptiveCard = "AdaptiveCard"
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
export declare class StyleManager {
|
||||
static getSpacing(spacing: 'small' | 'default' | 'medium' | 'large' | 'extraLarge' | 'padding' | 'none'): number;
|
||||
static getFontSize(size: 'small' | 'default' | 'medium' | 'large' | 'extraLarge'): number;
|
||||
static getFontWeight(weight: 'lighter' | 'default' | 'bolder'): "normal" | "bold" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
||||
static getTextAlign(align: 'left' | 'center' | 'right'): "left" | "center" | "right";
|
||||
static getHorizontalAlign(align: 'left' | 'center' | 'right'): "center" | "flex-start" | "flex-end";
|
||||
static getWrap(wrap: boolean): "wrap" | "nowrap";
|
||||
static getImageSize(size: 'small' | 'medium' | 'large' | 'auto' | 'stretch' | number): number | "auto" | "stretch";
|
||||
static getColor(color: 'default' | 'dark' | 'light' | 'accent' | 'good' | 'warning' | 'attention', theme: 'default' | 'emphasis', isSubtle: boolean): string;
|
||||
static getBackgroundColor(theme: 'default' | 'emphasis'): string;
|
||||
static getFactTitleColor(theme: 'default' | 'emphasis'): string;
|
||||
static getFactValueColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputFocusColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputBackgroundColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputFocusBackgroundColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputBorderColor(theme: 'default' | 'emphasis'): string;
|
||||
static getInputFocusBorderColor(theme: 'default' | 'emphasis'): string;
|
||||
static getCheckboxTitleColor(theme: 'default' | 'emphasis'): string;
|
||||
static getCheckboxBoxColor(theme: 'default' | 'emphasis', focused: boolean): string;
|
||||
static readonly inSetImageSize: "small" | "medium" | "large" | "auto" | "stretch";
|
||||
static readonly inSetImageMaxHeight: number;
|
||||
static readonly factSetSpacing: number;
|
||||
static readonly factTitleFontSize: number;
|
||||
static readonly factTitleFontWeight: "normal" | "bold" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
||||
static readonly factTitleWrap: "wrap" | "nowrap";
|
||||
static readonly factValueFontSize: number;
|
||||
static readonly factValueFontWeight: "normal" | "bold" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
||||
static readonly factValueWrap: "wrap" | "nowrap";
|
||||
static readonly fontFamily: string;
|
||||
static readonly separatorThickness: number;
|
||||
static readonly separatorColor: string;
|
||||
static readonly separatorSpacing: number;
|
||||
static readonly maxActions: number;
|
||||
static readonly actionSetSpacing: number;
|
||||
static readonly actionSpacing: number;
|
||||
static readonly actionDirection: "horizontal" | "vertically";
|
||||
static readonly actionAlignment: "left" | "center" | "right" | "stretch";
|
||||
static readonly subCardSpacing: number;
|
||||
static readonly subCardTheme: "default" | "emphasis";
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
export declare class AccessibilityUtils {
|
||||
static focusComponent(component: React.Component): void;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export declare class EmailUtils {
|
||||
static isEmail(address: string): boolean;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { Dimension } from '../Shared/Types';
|
||||
export declare class ImageUtils {
|
||||
static fetchSize(url: string, size: 'auto' | 'stretch' | 'small' | 'medium' | 'large', contract: Dimension, onSize: (size: Dimension) => void, onError: (error: any) => void): void;
|
||||
static fetchSizeFromConfig(size: 'auto' | 'stretch' | 'small' | 'medium' | 'large', contract: Dimension, onSize: (size: Dimension) => void): void;
|
||||
static fetchSizeFromImage(url: string, size: 'auto' | 'stretch' | 'small' | 'medium' | 'large', contract: Dimension, onSize: (size: Dimension) => void, onError: (error: any) => void): void;
|
||||
static fitContract(size: Dimension, contract: Dimension): Dimension;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
export declare class NumberUtils {
|
||||
static isInRange<T extends number | Date>(value: T, min: T, max: T): boolean;
|
||||
static isNumberStrict(value: string): boolean;
|
||||
static isNumber(value: string): boolean;
|
||||
static isSymbol(value: string): boolean;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
export declare class StringUtils {
|
||||
static prettifyString(valueString: string, fix: string, length: number, position: 'pre' | 'post'): string;
|
||||
static normalize(str: string): string;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
export declare class TimeUtils {
|
||||
static getFileTime(): number;
|
||||
static isDate(value: string): boolean;
|
||||
static isTime(value: string): boolean;
|
||||
static extractDate(value: string): Date;
|
||||
static extractTime(value: string): Date;
|
||||
static getDateString(date: Date): string;
|
||||
static getTimeString(date: Date): string;
|
||||
static composeTimeString(hour: number, minute: number): string;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
export declare class UrlUtils {
|
||||
static isRemoteUrl(url: string): boolean;
|
||||
static isEncodedData(url: string): boolean;
|
||||
static isSvgXml(url: string): boolean;
|
||||
static isDeepLink(url: string): boolean;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
import * as React from 'react';
|
||||
import { OpenUrlActionModel } from '../../Models/Actions/OpenUrlAction';
|
||||
import { ShowCardActionModel } from '../../Models/Actions/ShowCardAction';
|
||||
import { SubmitActionModel } from '../../Models/Actions/SubmitAction';
|
||||
interface IProps {
|
||||
index: number;
|
||||
model: OpenUrlActionModel | ShowCardActionModel | SubmitActionModel;
|
||||
theme: 'default' | 'emphasis';
|
||||
}
|
||||
interface IState {
|
||||
disabled: boolean;
|
||||
}
|
||||
export declare class ActionView extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps);
|
||||
render(): JSX.Element;
|
||||
private onPress;
|
||||
private readonly isOneTimeAction;
|
||||
private readonly leftBorderWidth;
|
||||
private readonly spacing;
|
||||
private readonly title;
|
||||
}
|
||||
export {};
|
|
@ -0,0 +1,13 @@
|
|||
import * as React from 'react';
|
||||
import { BackgroundImageModel } from '../../Models/CardElements/BackgroundImage';
|
||||
interface IProps {
|
||||
model: BackgroundImageModel;
|
||||
theme: 'emphasis' | 'default';
|
||||
}
|
||||
export declare class BackgroundImageView extends React.Component<IProps> {
|
||||
componentDidMount(): void;
|
||||
render(): JSX.Element;
|
||||
private onImageLoad;
|
||||
private onError;
|
||||
}
|
||||
export {};
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче