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

@modular-forms/solid

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modular-forms/solid - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

28

dist/index.cjs.jsx

@@ -662,2 +662,3 @@ "use strict";

const {
keepResponse = false,
shouldActive = true,

@@ -669,2 +670,5 @@ shouldTouched = false,

(0, import_solid_js16.batch)(() => {
if (!keepResponse) {
form.internal.setResponse({});
}
form.internal.setSubmitCount((submitCount) => submitCount + 1);

@@ -968,6 +972,9 @@ form.internal.setSubmitted(true);

initialValues,
keepSubmitCount = resetSingleField,
keepSubmitted = resetSingleField,
keepResponse = false,
keepSubmitCount = false,
keepSubmitted = false,
keepValues = false,
keepDirtyValues = false,
keepItems = false,
keepDirtyItems = false,
keepErrors = false,

@@ -1013,4 +1020,4 @@ keepTouched = false,

const fieldArray = getFieldArray(form, name);
const keepDirtyValue = keepDirtyValues && fieldArray.getDirty();
if (!keepValues && !keepDirtyValue) {
const keepCurrentDirtyItems = keepDirtyItems && fieldArray.getDirty();
if (!keepItems && !keepCurrentDirtyItems) {
const initialItems = getInitialItems(form, name);

@@ -1023,3 +1030,3 @@ fieldArray.setInitialItems(initialItems);

}
if (!keepDirty && !keepValues && !keepDirtyValue) {
if (!keepDirty && !keepItems && !keepCurrentDirtyItems) {
fieldArray.setDirty(false);

@@ -1032,2 +1039,5 @@ }

if (resetEntireForm) {
if (!keepResponse) {
form.internal.setResponse({});
}
if (!keepValues) {

@@ -1287,3 +1297,9 @@ (_a = form.element) == null ? void 0 : _a.reset();

["of", "onSubmit", "children"],
["shouldActive", "shouldTouched", "shouldDirty", "shouldFocus"]
[
"keepResponse",
"shouldActive",
"shouldTouched",
"shouldDirty",
"shouldFocus"
]
);

@@ -1290,0 +1306,0 @@ return <form {...others} ref={props.of.internal.setElement} onSubmit={handleSubmit(local.of, local.onSubmit, options)} noValidate>{local.children}</form>;

@@ -248,2 +248,3 @@ import { JSX, Accessor, Setter } from 'solid-js';

onSubmit: (values: TFieldValues, event: Event) => void | Promise<void>;
keepResponse?: boolean;
shouldActive?: boolean;

@@ -354,2 +355,3 @@ shouldTouched?: boolean;

declare type SubmitOptions = Partial<{
keepResponse: boolean;
shouldActive: boolean;

@@ -457,2 +459,3 @@ shouldTouched: boolean;

initialValues: DeepPartial<TFieldValues>;
keepResponse: boolean;
keepSubmitCount: boolean;

@@ -462,2 +465,4 @@ keepSubmitted: boolean;

keepDirtyValues: boolean;
keepItems: boolean;
keepDirtyItems: boolean;
keepErrors: boolean;

@@ -464,0 +469,0 @@ keepTouched: boolean;

@@ -592,2 +592,3 @@ // src/components/Field.tsx

const {
keepResponse = false,
shouldActive = true,

@@ -599,2 +600,5 @@ shouldTouched = false,

batch7(() => {
if (!keepResponse) {
form.internal.setResponse({});
}
form.internal.setSubmitCount((submitCount) => submitCount + 1);

@@ -898,6 +902,9 @@ form.internal.setSubmitted(true);

initialValues,
keepSubmitCount = resetSingleField,
keepSubmitted = resetSingleField,
keepResponse = false,
keepSubmitCount = false,
keepSubmitted = false,
keepValues = false,
keepDirtyValues = false,
keepItems = false,
keepDirtyItems = false,
keepErrors = false,

@@ -943,4 +950,4 @@ keepTouched = false,

const fieldArray = getFieldArray(form, name);
const keepDirtyValue = keepDirtyValues && fieldArray.getDirty();
if (!keepValues && !keepDirtyValue) {
const keepCurrentDirtyItems = keepDirtyItems && fieldArray.getDirty();
if (!keepItems && !keepCurrentDirtyItems) {
const initialItems = getInitialItems(form, name);

@@ -953,3 +960,3 @@ fieldArray.setInitialItems(initialItems);

}
if (!keepDirty && !keepValues && !keepDirtyValue) {
if (!keepDirty && !keepItems && !keepCurrentDirtyItems) {
fieldArray.setDirty(false);

@@ -962,2 +969,5 @@ }

if (resetEntireForm) {
if (!keepResponse) {
form.internal.setResponse({});
}
if (!keepValues) {

@@ -1217,3 +1227,9 @@ (_a = form.element) == null ? void 0 : _a.reset();

["of", "onSubmit", "children"],
["shouldActive", "shouldTouched", "shouldDirty", "shouldFocus"]
[
"keepResponse",
"shouldActive",
"shouldTouched",
"shouldDirty",
"shouldFocus"
]
);

@@ -1220,0 +1236,0 @@ return <form {...others} ref={props.of.internal.setElement} onSubmit={handleSubmit(local.of, local.onSubmit, options)} noValidate>{local.children}</form>;

{
"name": "@modular-forms/solid",
"description": "The modular form library for SolidJS",
"version": "0.4.0",
"version": "0.5.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Fabian Hiller",

@@ -0,1 +1,3 @@

<img src="https://assets.solidjs.com/banner?project=Modular+Forms" alt="Modular Forms" /><br />
# Modular Forms

@@ -2,0 +4,0 @@

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