auto-views
Advanced tools
Comparing version
export declare class SchemaProperty { | ||
title: string; | ||
type: string; | ||
constructor(title: string, type: string); | ||
[key: string]: any; | ||
constructor(title: string, type: string, additionalProps?: any); | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var SchemaProperty = (function () { | ||
function SchemaProperty(title, type) { | ||
function SchemaProperty(title, type, additionalProps) { | ||
if (additionalProps === void 0) { additionalProps = {}; } | ||
this.title = title; | ||
this.type = type; | ||
for (var key in additionalProps) { | ||
if (additionalProps.hasOwnProperty(key)) { | ||
this[key] = additionalProps[key]; | ||
} | ||
} | ||
} | ||
@@ -8,0 +14,0 @@ return SchemaProperty; |
/// <reference types="react" /> | ||
import * as React from 'react'; | ||
import { Validator } from 'jsonschema'; | ||
@@ -3,0 +4,0 @@ import { SchemaProperty } from "./schema-property"; |
{ | ||
"name": "auto-views", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Common, fully-tested, strictly-typed, Wix-styled, auto views library", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -5,4 +5,11 @@ import {Validator, Schema} from 'jsonschema'; | ||
export class SchemaProperty { | ||
constructor(public title:string, public type: string){} | ||
[key:string]:any; | ||
constructor(public title:string, public type: string,additionalProps:any={}){ | ||
for (let key in additionalProps){ | ||
if (additionalProps.hasOwnProperty(key)){ | ||
this[key] = additionalProps[key]; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1,6 +0,5 @@ | ||
import {Validator, Schema} from 'jsonschema'; | ||
import * as React from 'react'; | ||
import {Validator} from 'jsonschema'; | ||
import {SchemaProperty} from "./schema-property"; | ||
export interface AutoFormSchema { | ||
@@ -7,0 +6,0 @@ id:string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
54544
1.51%708
2.31%