New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uniforms

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uniforms - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

10

es5/AutoForm.d.ts

@@ -6,3 +6,3 @@ /// <reference types="react" />

export declare type AutoFormProps<Model> = ValidatedQuickFormProps<Model> & {
onChangeModel?(model: DeepPartial<Model>): void;
onChangeModel?: (model: DeepPartial<Model>) => void;
};

@@ -45,3 +45,3 @@ export declare type AutoFormState<Model> = ValidatedQuickFormState<Model> & {

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -127,3 +127,3 @@ onReset(): void;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -207,3 +207,3 @@ onReset(): void;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -276,3 +276,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model_1>): DeepPartial<Model_1>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -279,0 +279,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model_2>): DeepPartial<Model_2>;

@@ -11,3 +11,3 @@ "use strict";

function Auto(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
var AutoForm = /** @class */ (function (_super) {

@@ -14,0 +14,0 @@ tslib_1.__extends(AutoForm, _super);

@@ -14,4 +14,4 @@ import { Component, SyntheticEvent } from 'react';

noValidate: boolean;
onChange?(key: string, value: any): void;
onSubmit(model: DeepPartial<Model>): void | Promise<any>;
onChange?: (key: string, value: any) => void;
onSubmit: (model: DeepPartial<Model>) => void | Promise<any>;
placeholder?: boolean;

@@ -18,0 +18,0 @@ readOnly?: boolean;

@@ -17,3 +17,3 @@ "use strict";

var _this = _super.call(this, props) || this;
// @ts-ignore: State may be bigger, but it'll be covered by the subclasses.
// @ts-expect-error: State may be bigger, but it'll be covered by the subclasses.
_this.state = {

@@ -86,5 +86,9 @@ changed: false,

BaseForm.prototype.getContextOnChange = function () {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
return this.onChange;
};
BaseForm.prototype.getContextOnSubmit = function () {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
return this.onSubmit;

@@ -112,3 +116,6 @@ };

]);
return tslib_1.__assign(tslib_1.__assign({}, props), { onSubmit: this.onSubmit, key: "reset-" + this.state.resetCount });
return tslib_1.__assign(tslib_1.__assign({}, props), {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
onSubmit: this.onSubmit, key: "reset-" + this.state.resetCount });
};

@@ -159,3 +166,5 @@ BaseForm.prototype.onChange = function (key, value) {

BaseForm.prototype.onReset = function () {
// @ts-ignore
// @ts-expect-error
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
this.setState(this.__reset);

@@ -162,0 +171,0 @@ };

@@ -15,3 +15,3 @@ "use strict";

var anyFlowingPropertySet = some_1.default(context.state,
// @ts-ignore: `props` has no index signature.
// @ts-expect-error: `props` has no index signature.
function (_, key) { return props[key] !== null && props[key] !== undefined; });

@@ -24,3 +24,3 @@ if (!anyFlowingPropertySet && !hasChainName) {

nextContext.state = mapValues_1.default(nextContext.state, function (value, key) {
// @ts-ignore: `props` has no index signature.
// @ts-expect-error: `props` has no index signature.
return props[key] !== null && props[key] !== undefined ? !!props[key] : value;

@@ -27,0 +27,0 @@ });

@@ -12,3 +12,3 @@ import { ComponentType } from 'react';

export declare function createAutoField(defaultComponentDetector: ComponentDetector): {
(rawProps: AutoFieldProps): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
(rawProps: AutoFieldProps): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
componentDetectorContext: import("react").Context<ComponentDetector>;

@@ -15,0 +15,0 @@ defaultComponentDetector: ComponentDetector;

@@ -40,3 +40,3 @@ import React, { ComponentType } from 'react';

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: React.SyntheticEvent<Element, Event> | undefined) => any;

@@ -111,3 +111,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: React.SyntheticEvent<Element, Event> | undefined) => any;

@@ -114,0 +114,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

@@ -8,3 +8,3 @@ "use strict";

function Quick(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
var QuickForm = /** @class */ (function (_super) {

@@ -11,0 +11,0 @@ tslib_1.__extends(QuickForm, _super);

@@ -12,5 +12,5 @@ import { HTMLProps, ReactNode, SyntheticEvent } from 'react';

name: string[];
onChange(key: string, value?: any): void;
onSubmit(event?: SyntheticEvent): any | Promise<any>;
randomId(): string;
onChange: (key: string, value: any) => void;
onSubmit: (event?: SyntheticEvent) => any | Promise<any>;
randomId: () => string;
schema: Bridge;

@@ -44,3 +44,3 @@ state: {

name: string;
onChange(value?: Value | null, name?: string): void;
onChange: OnChange<Value | undefined>;
placeholder: string;

@@ -51,2 +51,6 @@ readOnly: boolean;

};
declare type OnChange<Value> = {
(value: Value): void;
(value: any, name: string): void;
};
export declare type HTMLFieldProps<Value, Element, Extension = object> = FieldProps<Value, HTMLProps<Element>, Extension>;

@@ -79,1 +83,2 @@ export declare type ModelTransformMode = 'form' | 'submit' | 'validate';

}
export {};

@@ -5,3 +5,3 @@ import { SyntheticEvent } from 'react';

export declare type ValidatedFormProps<Model> = BaseFormProps<Model> & {
onValidate(model: DeepPartial<Model>, error: any): any;
onValidate: (model: DeepPartial<Model>, error: any) => any;
validate: ValidateMode;

@@ -14,3 +14,3 @@ validator?: any;

validating: boolean;
validator(model: DeepPartial<Model>): any;
validator: (model: DeepPartial<Model>) => any;
};

@@ -48,3 +48,3 @@ export declare function Validated<Base extends typeof BaseForm>(Base: Base): {

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: SyntheticEvent<Element, Event> | undefined) => any;

@@ -120,3 +120,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model>): DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: SyntheticEvent<Element, Event> | undefined) => any;

@@ -123,0 +123,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model>): DeepPartial<Model>;

@@ -13,3 +13,3 @@ "use strict";

function Validated(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
var ValidatedForm = /** @class */ (function (_super) {

@@ -16,0 +16,0 @@ tslib_1.__extends(ValidatedForm, _super);

@@ -38,3 +38,3 @@ /// <reference types="react" />

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -107,3 +107,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -110,0 +110,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model_1>): import("./types").DeepPartial<Model_1>;

@@ -6,3 +6,3 @@ /// <reference types="react" />

export declare type AutoFormProps<Model> = ValidatedQuickFormProps<Model> & {
onChangeModel?(model: DeepPartial<Model>): void;
onChangeModel?: (model: DeepPartial<Model>) => void;
};

@@ -45,3 +45,3 @@ export declare type AutoFormState<Model> = ValidatedQuickFormState<Model> & {

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -127,3 +127,3 @@ onReset(): void;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -207,3 +207,3 @@ onReset(): void;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -276,3 +276,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model_1>): DeepPartial<Model_1>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -279,0 +279,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model_2>): DeepPartial<Model_2>;

@@ -7,3 +7,3 @@ import clone from 'lodash/clone';

export function Auto(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
class AutoForm extends Base {

@@ -10,0 +10,0 @@ constructor(props) {

@@ -14,4 +14,4 @@ import { Component, SyntheticEvent } from 'react';

noValidate: boolean;
onChange?(key: string, value: any): void;
onSubmit(model: DeepPartial<Model>): void | Promise<any>;
onChange?: (key: string, value: any) => void;
onSubmit: (model: DeepPartial<Model>) => void | Promise<any>;
placeholder?: boolean;

@@ -18,0 +18,0 @@ readOnly?: boolean;

@@ -12,3 +12,3 @@ import clone from 'lodash/clone';

super(props);
// @ts-ignore: State may be bigger, but it'll be covered by the subclasses.
// @ts-expect-error: State may be bigger, but it'll be covered by the subclasses.
this.state = {

@@ -77,5 +77,9 @@ changed: false,

getContextOnChange() {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
return this.onChange;
}
getContextOnSubmit() {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
return this.onSubmit;

@@ -102,3 +106,6 @@ }

]);
return Object.assign(Object.assign({}, props), { onSubmit: this.onSubmit, key: `reset-${this.state.resetCount}` });
return Object.assign(Object.assign({}, props), {
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
onSubmit: this.onSubmit, key: `reset-${this.state.resetCount}` });
}

@@ -147,3 +154,5 @@ onChange(key, value) {

onReset() {
// @ts-ignore
// @ts-expect-error
// It's bound in constructor.
// eslint-disable-next-line @typescript-eslint/unbound-method
this.setState(this.__reset);

@@ -150,0 +159,0 @@ }

@@ -11,3 +11,3 @@ import mapValues from 'lodash/mapValues';

const anyFlowingPropertySet = some(context.state,
// @ts-ignore: `props` has no index signature.
// @ts-expect-error: `props` has no index signature.
(_, key) => props[key] !== null && props[key] !== undefined);

@@ -20,3 +20,3 @@ if (!anyFlowingPropertySet && !hasChainName) {

nextContext.state = mapValues(nextContext.state, (value, key) =>
// @ts-ignore: `props` has no index signature.
// @ts-expect-error: `props` has no index signature.
props[key] !== null && props[key] !== undefined ? !!props[key] : value);

@@ -23,0 +23,0 @@ }

@@ -12,3 +12,3 @@ import { ComponentType } from 'react';

export declare function createAutoField(defaultComponentDetector: ComponentDetector): {
(rawProps: AutoFieldProps): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
(rawProps: AutoFieldProps): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
componentDetectorContext: import("react").Context<ComponentDetector>;

@@ -15,0 +15,0 @@ defaultComponentDetector: ComponentDetector;

@@ -40,3 +40,3 @@ import React, { ComponentType } from 'react';

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: React.SyntheticEvent<Element, Event> | undefined) => any;

@@ -111,3 +111,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: React.SyntheticEvent<Element, Event> | undefined) => any;

@@ -114,0 +114,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

@@ -5,3 +5,3 @@ import { __rest } from "tslib";

export function Quick(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
class QuickForm extends Base {

@@ -8,0 +8,0 @@ getNativeFormProps() {

@@ -12,5 +12,5 @@ import { HTMLProps, ReactNode, SyntheticEvent } from 'react';

name: string[];
onChange(key: string, value?: any): void;
onSubmit(event?: SyntheticEvent): any | Promise<any>;
randomId(): string;
onChange: (key: string, value: any) => void;
onSubmit: (event?: SyntheticEvent) => any | Promise<any>;
randomId: () => string;
schema: Bridge;

@@ -44,3 +44,3 @@ state: {

name: string;
onChange(value?: Value | null, name?: string): void;
onChange: OnChange<Value | undefined>;
placeholder: string;

@@ -51,2 +51,6 @@ readOnly: boolean;

};
declare type OnChange<Value> = {
(value: Value): void;
(value: any, name: string): void;
};
export declare type HTMLFieldProps<Value, Element, Extension = object> = FieldProps<Value, HTMLProps<Element>, Extension>;

@@ -79,1 +83,2 @@ export declare type ModelTransformMode = 'form' | 'submit' | 'validate';

}
export {};

@@ -5,3 +5,3 @@ import { SyntheticEvent } from 'react';

export declare type ValidatedFormProps<Model> = BaseFormProps<Model> & {
onValidate(model: DeepPartial<Model>, error: any): any;
onValidate: (model: DeepPartial<Model>, error: any) => any;
validate: ValidateMode;

@@ -14,3 +14,3 @@ validator?: any;

validating: boolean;
validator(model: DeepPartial<Model>): any;
validator: (model: DeepPartial<Model>) => any;
};

@@ -48,3 +48,3 @@ export declare function Validated<Base extends typeof BaseForm>(Base: Base): {

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: SyntheticEvent<Element, Event> | undefined) => any;

@@ -120,3 +120,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model>): DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: SyntheticEvent<Element, Event> | undefined) => any;

@@ -123,0 +123,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: DeepPartial<Model>): DeepPartial<Model>;

@@ -9,3 +9,3 @@ import clone from 'lodash/clone';

export function Validated(Base) {
// @ts-ignore: Mixin class problem.
// @ts-expect-error: Mixin class problem.
class ValidatedForm extends Base {

@@ -12,0 +12,0 @@ constructor(props) {

@@ -38,3 +38,3 @@ /// <reference types="react" />

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -107,3 +107,3 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model>): import("./types").DeepPartial<Model>;

getContextSchema(): import("./Bridge").Bridge;
getContextOnChange(): (key: string, value?: any) => void;
getContextOnChange(): (key: string, value: any) => void;
getContextOnSubmit(): (event?: import("react").SyntheticEvent<Element, Event> | undefined) => any;

@@ -110,0 +110,0 @@ getModel(mode?: "form" | "submit" | "validate" | undefined, model?: import("./types").DeepPartial<Model_1>): import("./types").DeepPartial<Model_1>;

{
"name": "uniforms",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",

@@ -43,3 +43,3 @@ "main": "es5/index.js",

},
"gitHead": "6f2948cdbd9493a665e1344b455d517606a610e2"
"gitHead": "66e40d860b8f01ae024c257a6f60f6599d2615f0"
}

@@ -15,5 +15,5 @@ import { HTMLProps, ReactNode, SyntheticEvent } from 'react';

name: string[];
onChange(key: string, value?: any): void;
onSubmit(event?: SyntheticEvent): any | Promise<any>;
randomId(): string;
onChange: (key: string, value: any) => void;
onSubmit: (event?: SyntheticEvent) => any | Promise<any>;
randomId: () => string;
schema: Bridge;

@@ -54,3 +54,3 @@ state: {

name: string;
onChange(value?: Value | null, name?: string): void;
onChange: OnChange<Value | undefined>;
placeholder: string;

@@ -62,2 +62,7 @@ readOnly: boolean;

type OnChange<Value> = {
(value: Value): void;
(value: any, name: string): void;
};
export type HTMLFieldProps<Value, Element, Extension = object> = FieldProps<

@@ -64,0 +69,0 @@ Value,

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

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