@lehnihon/bit-form 2.1.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/angular/index.cjs +1 -1
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +29 -17
- package/dist/angular/index.d.ts +29 -17
- package/dist/angular/index.js +1 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/bus-B3pGaiFZ.d.cts +255 -0
- package/dist/bus-B3pGaiFZ.d.ts +255 -0
- package/dist/chunk-442A4FTZ.cjs +2 -0
- package/dist/chunk-442A4FTZ.cjs.map +1 -0
- package/dist/chunk-6FJEE6O3.js +133 -0
- package/dist/chunk-6FJEE6O3.js.map +1 -0
- package/dist/chunk-FOV24ACZ.js +2 -0
- package/dist/chunk-FOV24ACZ.js.map +1 -0
- package/dist/chunk-YWXX6XRV.cjs +133 -0
- package/dist/chunk-YWXX6XRV.cjs.map +1 -0
- package/dist/devtools/bridge.cjs +1 -1
- package/dist/devtools/bridge.js +1 -1
- package/dist/devtools/index.cjs +1 -1
- package/dist/devtools/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1 -1
- package/dist/public-types-CtYuIAMP.d.cts +99 -0
- package/dist/public-types-Lq3eLstW.d.ts +99 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +5 -5
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.cjs.map +1 -1
- package/dist/react-native/index.d.cts +10 -12
- package/dist/react-native/index.d.ts +10 -12
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/resolvers/joi.d.cts +1 -1
- package/dist/resolvers/joi.d.ts +1 -1
- package/dist/resolvers/yup.d.cts +1 -1
- package/dist/resolvers/yup.d.ts +1 -1
- package/dist/resolvers/zod.d.cts +1 -1
- package/dist/resolvers/zod.d.ts +1 -1
- package/dist/{use-bit-watch-hA0AqCkC.d.ts → use-bit-persist-CWzGfovL.d.cts} +27 -19
- package/dist/{use-bit-watch-BRekIj2W.d.cts → use-bit-persist-hxJaKG2S.d.ts} +27 -19
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +45 -33
- package/dist/vue/index.d.ts +45 -33
- package/dist/vue/index.js +1 -1
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/bus-vCbulIYH.d.cts +0 -141
- package/dist/bus-vCbulIYH.d.ts +0 -141
- package/dist/chunk-2QNUW6ZN.cjs +0 -133
- package/dist/chunk-2QNUW6ZN.cjs.map +0 -1
- package/dist/chunk-F6LJWWEW.js +0 -2
- package/dist/chunk-F6LJWWEW.js.map +0 -1
- package/dist/chunk-LPRLSFPT.cjs +0 -2
- package/dist/chunk-LPRLSFPT.cjs.map +0 -1
- package/dist/chunk-N6IA7HQL.js +0 -133
- package/dist/chunk-N6IA7HQL.js.map +0 -1
- package/dist/public-types-ChP5j3xc.d.ts +0 -69
- package/dist/public-types-Nv__uZTR.d.cts +0 -69
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { B as BitConfig, q as ValidatorFn, a as BitMask, g as BitFieldDefinition, s as DevToolsOptions, l as BitState, j as BitPath, k as BitPathValue, e as BitErrors, S as ScopeStatus } from './bus-vCbulIYH.js';
|
|
2
|
-
|
|
3
|
-
interface BitFrameworkConfig<T extends object = any> extends BitConfig<T> {
|
|
4
|
-
initialValues: T;
|
|
5
|
-
resolver?: ValidatorFn<T>;
|
|
6
|
-
validationDelay: number;
|
|
7
|
-
enableHistory: boolean;
|
|
8
|
-
historyLimit: number;
|
|
9
|
-
masks?: Record<string, BitMask>;
|
|
10
|
-
fields?: Record<string, BitFieldDefinition<T>>;
|
|
11
|
-
devTools?: boolean | DevToolsOptions;
|
|
12
|
-
}
|
|
13
|
-
interface BitPublicStore<T extends object = any> {
|
|
14
|
-
getConfig(): Readonly<BitFrameworkConfig<T>>;
|
|
15
|
-
getState(): Readonly<BitState<T>>;
|
|
16
|
-
subscribe(listener: () => void): () => void;
|
|
17
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
18
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
19
|
-
setValues(values: T): void;
|
|
20
|
-
setError(path: string, message: string | undefined): void;
|
|
21
|
-
setErrors(errors: BitErrors<T>): void;
|
|
22
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
23
|
-
validate(options?: {
|
|
24
|
-
scope?: string;
|
|
25
|
-
scopeFields?: string[];
|
|
26
|
-
}): Promise<boolean>;
|
|
27
|
-
reset(): void;
|
|
28
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
29
|
-
registerMask(name: string, mask: BitMask): void;
|
|
30
|
-
getDirtyValues(): Partial<T>;
|
|
31
|
-
cleanup(): void;
|
|
32
|
-
}
|
|
33
|
-
interface BitFrameworkStore<T extends object = any> extends BitPublicStore<T> {
|
|
34
|
-
config: BitFrameworkConfig<T>;
|
|
35
|
-
registerField(path: string, config: BitFieldDefinition<T>): void;
|
|
36
|
-
unregisterField(path: string): void;
|
|
37
|
-
unregisterPrefix?(prefix: string): void;
|
|
38
|
-
isHidden(path: any): boolean;
|
|
39
|
-
isRequired(path: any): boolean;
|
|
40
|
-
isFieldDirty(path: string): boolean;
|
|
41
|
-
isFieldValidating(path: string): boolean;
|
|
42
|
-
watch(path: any, callback: (value: any) => void): () => void;
|
|
43
|
-
pushItem(path: any, value: any): void;
|
|
44
|
-
prependItem(path: any, value: any): void;
|
|
45
|
-
insertItem(path: any, index: number, value: any): void;
|
|
46
|
-
removeItem(path: any, index: number): void;
|
|
47
|
-
moveItem(path: any, from: number, to: number): void;
|
|
48
|
-
swapItems(path: any, indexA: number, indexB: number): void;
|
|
49
|
-
getHistoryMetadata(): {
|
|
50
|
-
canUndo: boolean;
|
|
51
|
-
canRedo: boolean;
|
|
52
|
-
historyIndex: number;
|
|
53
|
-
historySize: number;
|
|
54
|
-
};
|
|
55
|
-
undo(): void;
|
|
56
|
-
redo(): void;
|
|
57
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
58
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
59
|
-
markFieldsTouched(paths: string[]): void;
|
|
60
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
61
|
-
beginFieldValidation(path: string): void;
|
|
62
|
-
endFieldValidation(path: string): void;
|
|
63
|
-
setFieldAsyncError(path: string, message: string): Promise<void>;
|
|
64
|
-
clearFieldAsyncError(path: string): Promise<void>;
|
|
65
|
-
resolveMask(path: string): BitMask | undefined;
|
|
66
|
-
getScopeFields(scopeName: string): string[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type { BitPublicStore as B, BitFrameworkConfig as a, BitFrameworkStore as b };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { B as BitConfig, q as ValidatorFn, a as BitMask, g as BitFieldDefinition, s as DevToolsOptions, l as BitState, j as BitPath, k as BitPathValue, e as BitErrors, S as ScopeStatus } from './bus-vCbulIYH.cjs';
|
|
2
|
-
|
|
3
|
-
interface BitFrameworkConfig<T extends object = any> extends BitConfig<T> {
|
|
4
|
-
initialValues: T;
|
|
5
|
-
resolver?: ValidatorFn<T>;
|
|
6
|
-
validationDelay: number;
|
|
7
|
-
enableHistory: boolean;
|
|
8
|
-
historyLimit: number;
|
|
9
|
-
masks?: Record<string, BitMask>;
|
|
10
|
-
fields?: Record<string, BitFieldDefinition<T>>;
|
|
11
|
-
devTools?: boolean | DevToolsOptions;
|
|
12
|
-
}
|
|
13
|
-
interface BitPublicStore<T extends object = any> {
|
|
14
|
-
getConfig(): Readonly<BitFrameworkConfig<T>>;
|
|
15
|
-
getState(): Readonly<BitState<T>>;
|
|
16
|
-
subscribe(listener: () => void): () => void;
|
|
17
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
18
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
19
|
-
setValues(values: T): void;
|
|
20
|
-
setError(path: string, message: string | undefined): void;
|
|
21
|
-
setErrors(errors: BitErrors<T>): void;
|
|
22
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
23
|
-
validate(options?: {
|
|
24
|
-
scope?: string;
|
|
25
|
-
scopeFields?: string[];
|
|
26
|
-
}): Promise<boolean>;
|
|
27
|
-
reset(): void;
|
|
28
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
29
|
-
registerMask(name: string, mask: BitMask): void;
|
|
30
|
-
getDirtyValues(): Partial<T>;
|
|
31
|
-
cleanup(): void;
|
|
32
|
-
}
|
|
33
|
-
interface BitFrameworkStore<T extends object = any> extends BitPublicStore<T> {
|
|
34
|
-
config: BitFrameworkConfig<T>;
|
|
35
|
-
registerField(path: string, config: BitFieldDefinition<T>): void;
|
|
36
|
-
unregisterField(path: string): void;
|
|
37
|
-
unregisterPrefix?(prefix: string): void;
|
|
38
|
-
isHidden(path: any): boolean;
|
|
39
|
-
isRequired(path: any): boolean;
|
|
40
|
-
isFieldDirty(path: string): boolean;
|
|
41
|
-
isFieldValidating(path: string): boolean;
|
|
42
|
-
watch(path: any, callback: (value: any) => void): () => void;
|
|
43
|
-
pushItem(path: any, value: any): void;
|
|
44
|
-
prependItem(path: any, value: any): void;
|
|
45
|
-
insertItem(path: any, index: number, value: any): void;
|
|
46
|
-
removeItem(path: any, index: number): void;
|
|
47
|
-
moveItem(path: any, from: number, to: number): void;
|
|
48
|
-
swapItems(path: any, indexA: number, indexB: number): void;
|
|
49
|
-
getHistoryMetadata(): {
|
|
50
|
-
canUndo: boolean;
|
|
51
|
-
canRedo: boolean;
|
|
52
|
-
historyIndex: number;
|
|
53
|
-
historySize: number;
|
|
54
|
-
};
|
|
55
|
-
undo(): void;
|
|
56
|
-
redo(): void;
|
|
57
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
58
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
59
|
-
markFieldsTouched(paths: string[]): void;
|
|
60
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
61
|
-
beginFieldValidation(path: string): void;
|
|
62
|
-
endFieldValidation(path: string): void;
|
|
63
|
-
setFieldAsyncError(path: string, message: string): Promise<void>;
|
|
64
|
-
clearFieldAsyncError(path: string): Promise<void>;
|
|
65
|
-
resolveMask(path: string): BitMask | undefined;
|
|
66
|
-
getScopeFields(scopeName: string): string[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type { BitPublicStore as B, BitFrameworkConfig as a, BitFrameworkStore as b };
|