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

@tinacms/forms

Package Overview
Dependencies
Maintainers
11
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinacms/forms - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1-alpha.0

11

build/field.d.ts

@@ -19,3 +19,6 @@ /**

/// <reference types="react" />
export interface Field {
export declare type AnyField = Field & {
[key: string]: any;
};
export interface Field<F extends Field = AnyField> {
name: string;

@@ -25,7 +28,7 @@ label?: string;

component: React.FC<any> | string | null;
parse?: (value: any, name: string, field: Field) => any;
format?: (value: any, name: string, field: Field) => any;
parse?: (value: any, name: string, field: F) => any;
format?: (value: any, name: string, field: F) => any;
validate?(value: any, allValues: any, meta: any, field: Field): string | object | undefined;
defaultValue?: any;
fields?: Field[];
fields?: F[];
}

@@ -20,7 +20,7 @@ /**

import { Plugin } from '@tinacms/core';
import { Field } from './field';
export interface FormOptions<S> extends Config<S> {
import { Field, AnyField } from './field';
export interface FormOptions<S, F extends Field = AnyField> extends Config<S> {
id: any;
label: string;
fields: Field[];
fields: F[];
__type?: string;

@@ -31,3 +31,3 @@ reset?(): void;

}
export declare class Form<S = any> implements Plugin {
export declare class Form<S = any, F extends Field = AnyField> implements Plugin {
private _reset;

@@ -37,6 +37,6 @@ __type: string;

label: string;
fields: Field[];
fields: F[];
finalForm: FormApi<S>;
actions: any[];
constructor({ id, label, fields, actions, reset, loadInitialValues, ...options }: FormOptions<S>);
constructor({ id, label, fields, actions, reset, loadInitialValues, ...options }: FormOptions<S, F>);
/**

@@ -68,3 +68,3 @@ * A unique identifier for Forms.

*/
updateFields(fields: Field[]): void;
updateFields(fields: F[]): void;
/**

@@ -71,0 +71,0 @@ * Subscribes to changes to the form. The subscriber will only be called when

@@ -6,2 +6,13 @@ # Change Log

## [0.4.1-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/forms@0.4.0...@tinacms/forms@0.4.1-alpha.0) (2020-04-14)
### Bug Fixes
* forms are more flexible with the shape of Fields ([90d8b0c](https://github.com/tinacms/tinacms/commit/90d8b0c))
# [0.4.0](https://github.com/tinacms/tinacms/compare/@tinacms/forms@0.3.0...@tinacms/forms@0.4.0) (2020-04-06)

@@ -8,0 +19,0 @@

{
"name": "@tinacms/forms",
"version": "0.4.0",
"version": "0.4.1-alpha.0",
"main": "build/index.js",

@@ -41,3 +41,3 @@ "types": "build/index.d.ts",

},
"gitHead": "4d74125e00320233a6a0ad1bb9282e801c5229e0"
"gitHead": "1b64eb2e2236e7df68827b806413b2fe990f8332"
}
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