auto-views
Advanced tools
Comparing version 0.0.15 to 0.0.16
/// <reference types="react" /> | ||
import * as React from 'react'; | ||
import { SchemaProperty, SchemaRepository } from "./schema-repo"; | ||
import { SchemaRepository } from "./schema-repo"; | ||
import { SchemaProperty } from "./schema-property"; | ||
export interface AutoFormProps extends React.HTMLAttributes<HTMLFormElement> { | ||
@@ -25,2 +26,2 @@ repo: SchemaRepository; | ||
} | ||
export declare function makeFormEntry(formData: any, displayMode: DisplayMode, onEntryChange: (key: string, e: React.FormEvent<HTMLDivElement>) => void): (property: SchemaProperty, key: string) => JSX.Element; | ||
export declare function makeFormEntry(formData: any, displayMode: DisplayMode, onEntryChange?: (key: string, e: React.FormEvent<HTMLDivElement>) => void): (property: SchemaProperty, key: string) => JSX.Element; |
@@ -80,3 +80,3 @@ "use strict"; | ||
return function (property, key) { | ||
return React.createElement(form_entry_1.Entry, { "data-automation-id": form_entry_1.entrySelector(key), entryKey: key, title: property.title, displayMode: displayMode, type: property.type, value: formData[key], onChange: function (e) { return onEntryChange(key, e); } }); | ||
return React.createElement(form_entry_1.Entry, { "data-automation-id": form_entry_1.entrySelector(key), entryKey: key, title: property.title, displayMode: displayMode, type: property.type, value: formData[key], onChange: function (e) { return onEntryChange && onEntryChange(key, e); }, valid: property.isValid(formData[key]) }); | ||
}; | ||
@@ -83,0 +83,0 @@ } |
/// <reference types="react" /> | ||
import { Validator } from 'jsonschema'; | ||
export interface SchemaProperty { | ||
title: string; | ||
type: string; | ||
} | ||
import { SchemaProperty } from "./schema-property"; | ||
export interface AutoFormSchema { | ||
@@ -8,0 +5,0 @@ id: string; |
{ | ||
"name": "auto-views", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Common, fully-tested, strictly-typed, Wix-styled, auto views library", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -1,8 +0,6 @@ | ||
import {Validator} from 'jsonschema'; | ||
import {Validator, Schema} from 'jsonschema'; | ||
import {SchemaProperty} from "./schema-property"; | ||
export interface SchemaProperty { | ||
title: string; | ||
type: string; | ||
} | ||
export interface AutoFormSchema { | ||
@@ -9,0 +7,0 @@ id:string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53103
41
692