angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
60 lines (59 loc) • 1.96 kB
TypeScript
import { AfterViewInit, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { FrameworkLibraryService } from '../frameworks/framework-library.service';
export declare class PlaygroundComponent implements OnInit, AfterViewInit {
private frameworkLibrary;
private route;
private router;
private http;
exampleJsonObject: {
'first_name': string;
'last_name': string;
'age': number;
'is_company': boolean;
'address': {
'street_1': string;
'street_2': any;
'city': string;
'state': string;
'zip_code': string;
};
'phone_numbers': {
'number': string;
'type': string;
}[];
'notes': string;
};
private examples;
private selectedSet;
private selectedExample;
private selectedFramework;
private formActive;
private aceHeight;
private jsonFormSchema;
private jsonFormValid;
private jsonFormErrorMessage;
private jsonFormObject;
private liveFormData;
private formValidationErrors;
private formIsValid;
private submittedFormData;
private aceEditorOptions;
constructor(frameworkLibrary: FrameworkLibraryService, route: ActivatedRoute, router: Router, http: Http);
ngOnInit(): void;
ngAfterViewInit(): void;
onSubmit(data: any): void;
readonly prettySubmittedFormData: string;
onChanges(data: any): void;
readonly prettyLiveFormData: string;
isValid(data: any): void;
validationErrors(data: any): void;
readonly prettyValidationErrors: string;
private resizeAceEditor();
private loadSelectedSet(selectedSet?);
private loadSelectedExample(selectedSet?, selectedExample?);
private loadSelectedFramework(selectedFramework);
private generateForm(newFormString);
}