@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
66 lines (65 loc) • 1.63 kB
TypeScript
export declare type FormData = any;
export interface DataSchema extends SchemaObjectProperty {
/**
* Collections of properties.
*/
properties: SchemaProperty[];
}
export declare enum SchemaPrimitiveType {
/**
* Default format: a single line text box.
*/
String = 0,
/**
* Default format: a single line text box to input the number.
*/
Number = 1,
/**
* Default format: a checkbox.
*/
Boolean = 2,
/**
* Default format: a file uploading control.
*/
File = 3,
/**
* Default format: no specific UI control. Default format is used to render all the child properties.
*/
Object = 4,
/**
* Default format: TBD.
*/
Array = 5
}
export interface SchemaProperty {
type?: SchemaPrimitiveType;
format?: string;
name?: string;
label?: string;
defaultValue?: any;
description?: string;
required?: boolean;
options?: any;
hideCondition?: string;
readonlyCondition?: string;
disabledCondition?: string;
customValidation?: string;
customAsyncValidation?: {
handler: string;
pendingMessage: string;
debounceTime: number;
};
}
export interface SchemaObjectProperty extends SchemaProperty {
properties: SchemaProperty[];
emptyByDefault?: boolean;
}
export interface SchemaArrayProperty extends SchemaProperty {
item: SchemaProperty;
}
export declare class SchemaFieldContext {
isEditorMode: boolean;
formData: any;
formController: any;
parentData: any;
}