ang-jsoneditor
Version:
[](https://travis-ci.org/mariohmol/ang-jsoneditor)
60 lines (59 loc) • 2.19 kB
TypeScript
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { IError, JsonEditorMode, JsonEditorOptions, JsonEditorTreeNode } from './jsoneditoroptions';
import * as i0 from "@angular/core";
export declare class JsonEditorComponent implements ControlValueAccessor, OnInit, OnDestroy {
jsonEditorContainer: ElementRef;
options: JsonEditorOptions;
change: EventEmitter<any>;
jsonChange: EventEmitter<any>;
debug: boolean;
optionsChanged: boolean;
disabled: boolean;
isFocused: boolean;
id: string;
private _data;
private editor;
constructor();
set data(value: Object);
ngOnInit(): void;
ngOnDestroy(): void;
/**
* ngModel
* ControlValueAccessor
*/
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState(isDisabled: boolean): void;
onChange: () => void;
onChangeJSON: () => void;
/**
* JSON EDITOR FUNCTIONS
*/
collapseAll(): void;
expandAll(): void;
focus(): void;
get(): JSON;
getMode(): JsonEditorMode;
getName(): string;
getText(): string;
set(json: JSON): void;
setMode(mode: JsonEditorMode): void;
setName(name: string): void;
setSelection(start: any, end: any): void;
getSelection(): any;
getValidateSchema(): any;
setSchema(schema: any, schemaRefs: any): void;
search(query: string): void;
setOptions(newOptions: JsonEditorOptions): void;
update(json: JSON): void;
destroy(): void;
getEditor(): any;
isValidJson(): boolean;
private onTouched;
private onChangeModel;
static ɵfac: i0.ɵɵFactoryDeclaration<JsonEditorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<JsonEditorComponent, "json-editor", never, { "options": { "alias": "options"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "change": "change"; "jsonChange": "jsonChange"; }, never, never, true, never>;
}
export { JsonEditorOptions, JsonEditorMode, JsonEditorTreeNode, IError };