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

@mantine/form

Package Overview
Dependencies
Maintainers
1
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mantine/form - npm Package Compare versions

Comparing version

to
8.0.0-alpha.0

lib/paths.types.d.ts

3

lib/hooks/use-form-watch/use-form-watch.d.ts

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

import { FormFieldSubscriber, LooseKeys, Watch } from '../../types';
import { LooseKeys } from '../../paths.types';
import { FormFieldSubscriber, Watch } from '../../types';
import { $FormStatus } from '../use-form-status/use-form-status';

@@ -3,0 +4,0 @@ import { SetValuesSubscriberPayload } from '../use-form-values/use-form-values';

@@ -0,1 +1,2 @@

import type { FormPathValue, LooseKeys } from './paths.types';
import type { formRootRule } from './validate/validate-values';

@@ -31,3 +32,2 @@ export type GetInputPropsType = 'input' | 'checkbox';

export type FormValidateInput<Values> = FormRulesRecord<Values> | ((values: Values) => FormErrors);
export type LooseKeys<Values> = keyof Values | (string & {});
export type SetValues<Values> = React.Dispatch<React.SetStateAction<Partial<Values>>>;

@@ -56,4 +56,3 @@ export type SetInitialValues<Values> = (values: Values) => void;

export type GetInputProps<Values> = <Field extends LooseKeys<Values>>(path: Field, options?: GetInputPropsOptions) => GetInputPropsReturnType;
export type PathValue<T, P extends LooseKeys<T>> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : unknown : P extends keyof T ? T[P] : unknown;
export type SetFieldValue<Values> = <Field extends LooseKeys<Values>>(path: Field, value: PathValue<Values, Field> | ((prevValue: PathValue<Values, Field>) => PathValue<Values, Field>), options?: {
export type SetFieldValue<Values> = <Field extends LooseKeys<Values>>(path: Field, value: FormPathValue<Values, Field> | ((prevValue: FormPathValue<Values, Field>) => FormPathValue<Values, Field>), options?: {
forceUpdate: boolean;

@@ -70,3 +69,3 @@ }) => void;

export type SetFieldDirty<Values> = <Field extends LooseKeys<Values>>(path: Field, dirty: boolean, forceUpdate?: boolean) => void;
export type SetCalculatedFieldDirty<Values> = <Field extends LooseKeys<Values>>(path: Field, value: PathValue<Values, Field>) => void;
export type SetCalculatedFieldDirty<Values> = <Field extends LooseKeys<Values>>(path: Field, value: FormPathValue<Values, Field>) => void;
export type ReorderListItem<Values> = <Field extends LooseKeys<Values>>(path: Field, payload: ReorderPayload) => void;

@@ -84,4 +83,4 @@ export type InsertListItem<Values> = <Field extends LooseKeys<Values>>(path: Field, item: unknown, index?: number) => void;

export type FormFieldSubscriber<Values, Field extends LooseKeys<Values>> = (input: {
previousValue: PathValue<Values, Field>;
value: PathValue<Values, Field>;
previousValue: FormPathValue<Values, Field>;
value: FormPathValue<Values, Field>;
touched: boolean;

@@ -88,0 +87,0 @@ dirty: boolean;

{
"name": "@mantine/form",
"version": "7.17.0",
"version": "8.0.0-alpha.0",
"description": "Mantine form management library",

@@ -5,0 +5,0 @@ "homepage": "https://mantine.dev",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet