Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-views

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-views - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

5

lib/components/auto-form/auto-form.d.ts
/// <reference types="react" />
import * as React from 'react';
import { SchemaRepository } from "./schema-repo";
import { DisplayMode } from "./form-entry";
import { SchemaProperty } from "./schema-property";

@@ -12,6 +13,2 @@ export interface AutoFormProps extends React.HTMLAttributes<HTMLFormElement> {

}
export declare enum DisplayMode {
View = 0,
Edit = 1,
}
export declare function newSchemaRepository(): SchemaRepository;

@@ -18,0 +15,0 @@ export declare function fieldValueSelector(key: string): string;

@@ -25,7 +25,2 @@ "use strict";

var jsonschema_1 = require("jsonschema");
var DisplayMode;
(function (DisplayMode) {
DisplayMode[DisplayMode["View"] = 0] = "View";
DisplayMode[DisplayMode["Edit"] = 1] = "Edit";
})(DisplayMode = exports.DisplayMode || (exports.DisplayMode = {}));
function newSchemaRepository() {

@@ -32,0 +27,0 @@ return new schema_repo_1.SchemaRepository();

/// <reference types="react" />
import * as React from 'react';
import { DisplayMode } from "./auto-form";
export declare enum DisplayMode {
View = 0,
Edit = 1,
}
export interface EntryEventTarget extends EventTarget {

@@ -14,3 +17,3 @@ value: any;

title: string;
displayMode: DisplayMode;
displayMode?: DisplayMode;
type: string;

@@ -22,4 +25,7 @@ value?: any;

export declare class Entry extends React.Component<EntryProps, {}> {
static defaultProps: {
displayMode: DisplayMode;
};
private onChange;
render(): JSX.Element;
}

10

lib/components/auto-form/form-entry.js

@@ -23,2 +23,7 @@ "use strict";

var auto_form_1 = require("./auto-form");
var DisplayMode;
(function (DisplayMode) {
DisplayMode[DisplayMode["View"] = 0] = "View";
DisplayMode[DisplayMode["Edit"] = 1] = "Edit";
})(DisplayMode = exports.DisplayMode || (exports.DisplayMode = {}));
function entrySelector(key) {

@@ -55,3 +60,3 @@ return "entry_value_" + key;

var comp;
if (this.props.displayMode == auto_form_1.DisplayMode.Edit) {
if (this.props.displayMode == DisplayMode.Edit) {
comp = React.createElement("input", __assign({}, childProps, { type: this.props.type, onChange: this.onChange }));

@@ -67,2 +72,5 @@ }

};
Entry.defaultProps = {
displayMode: DisplayMode.View,
};
return Entry;

@@ -69,0 +77,0 @@ }(React.Component));

{
"name": "auto-views",
"version": "0.0.20",
"version": "0.0.21",
"description": "Common, fully-tested, strictly-typed, Wix-styled, auto views library",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc