@lehnihon/bit-form 2.2.7 → 2.2.8
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 -6
- package/dist/angular/index.cjs +1 -1
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +10 -8
- package/dist/angular/index.d.ts +10 -8
- package/dist/angular/index.js +1 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/{array-controller-DtkmcnUr.d.ts → array-controller-B5bfXV1W.d.cts} +4 -4
- package/dist/{array-controller-C1A5VKYd.d.cts → array-controller-Cx-DMH7Y.d.ts} +4 -4
- package/dist/bus-B2VEKrPI.d.ts +19 -0
- package/dist/bus-ZLQeq4Vr.d.cts +19 -0
- package/dist/chunk-5NA2TFPG.js +1 -0
- package/dist/chunk-5NA2TFPG.js.map +1 -0
- package/dist/chunk-63OJBMKK.js +2 -0
- package/dist/chunk-63OJBMKK.js.map +1 -0
- package/dist/chunk-BSGJ3T5S.cjs +2 -0
- package/dist/chunk-BSGJ3T5S.cjs.map +1 -0
- package/dist/chunk-CPP7ELA5.js +2 -0
- package/dist/chunk-CPP7ELA5.js.map +1 -0
- package/dist/chunk-D7JQWF6V.cjs +2 -0
- package/dist/chunk-D7JQWF6V.cjs.map +1 -0
- package/dist/chunk-E2NZR44P.js +2 -0
- package/dist/chunk-E2NZR44P.js.map +1 -0
- package/dist/chunk-EQ55DKX2.js +2 -0
- package/dist/chunk-EQ55DKX2.js.map +1 -0
- package/dist/chunk-JC4R5WCC.js +2 -0
- package/dist/chunk-JC4R5WCC.js.map +1 -0
- package/dist/chunk-M6WBNHIT.cjs +2 -0
- package/dist/chunk-M6WBNHIT.cjs.map +1 -0
- package/dist/chunk-MFSQATNZ.cjs +2 -0
- package/dist/chunk-MFSQATNZ.cjs.map +1 -0
- package/dist/chunk-MFTWAFMG.cjs +2 -0
- package/dist/chunk-MFTWAFMG.cjs.map +1 -0
- package/dist/chunk-P2YWYBWG.cjs +2 -0
- package/dist/chunk-P2YWYBWG.cjs.map +1 -0
- package/dist/chunk-RD73EBSN.js +2 -0
- package/dist/chunk-RD73EBSN.js.map +1 -0
- package/dist/chunk-T2JRSWQU.cjs +2 -0
- package/dist/chunk-T2JRSWQU.cjs.map +1 -0
- package/dist/chunk-UQ3DSUWC.js +2 -0
- package/dist/chunk-UQ3DSUWC.js.map +1 -0
- package/dist/chunk-VZHG372Q.cjs +2 -0
- package/dist/chunk-VZHG372Q.cjs.map +1 -0
- package/dist/chunk-W2E5UIXT.js +2 -0
- package/dist/chunk-W2E5UIXT.js.map +1 -0
- package/dist/chunk-W5CLDRRE.cjs +1 -0
- package/dist/chunk-W5CLDRRE.cjs.map +1 -0
- package/dist/core/bindings.cjs +2 -0
- package/dist/core/bindings.cjs.map +1 -0
- package/dist/core/bindings.d.cts +81 -0
- package/dist/core/bindings.d.ts +81 -0
- package/dist/core/bindings.js +2 -0
- package/dist/core/bindings.js.map +1 -0
- package/dist/core/status.cjs +2 -0
- package/dist/core/status.cjs.map +1 -0
- package/dist/core/status.d.cts +44 -0
- package/dist/core/status.d.ts +44 -0
- package/dist/core/status.js +2 -0
- package/dist/core/status.js.map +1 -0
- package/dist/core/store.cjs +2 -0
- package/dist/core/store.cjs.map +1 -0
- package/dist/core/store.d.cts +84 -0
- package/dist/core/store.d.ts +84 -0
- package/dist/core/store.js +2 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/utils.cjs +2 -0
- package/dist/core/utils.cjs.map +1 -0
- package/dist/core/utils.d.cts +81 -0
- package/dist/core/utils.d.ts +81 -0
- package/dist/core/utils.js +2 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +14 -122
- package/dist/core.d.ts +14 -122
- package/dist/core.js +1 -1
- package/dist/devtools/bridge.cjs +1 -1
- package/dist/devtools/bridge.cjs.map +1 -1
- package/dist/devtools/bridge.d.cts +3 -2
- package/dist/devtools/bridge.d.ts +3 -2
- package/dist/devtools/bridge.js +1 -1
- package/dist/devtools/index.cjs +2 -2
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.d.cts +3 -2
- package/dist/devtools/index.d.ts +3 -2
- package/dist/devtools/index.js +1 -1
- package/dist/devtools/index.js.map +1 -1
- package/dist/{field-binding-X5TkvfUt.d.cts → field-binding-B_OX3bjp.d.cts} +1 -1
- package/dist/{field-binding-Bi1g-D8X.d.ts → field-binding-MX6jVQbT.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -85
- package/dist/index.d.ts +8 -85
- package/dist/index.js +1 -1
- package/dist/mask.d.cts +2 -2
- package/dist/mask.d.ts +2 -2
- package/dist/meta-types-Bzmm21TP.d.cts +18 -0
- package/dist/meta-types-Bzmm21TP.d.ts +18 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +11 -9
- package/dist/react/index.d.ts +11 -9
- 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 +9 -7
- package/dist/react-native/index.d.ts +9 -7
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/resolvers/index.cjs +1 -1
- package/dist/resolvers/index.cjs.map +1 -1
- package/dist/resolvers/index.d.cts +3 -2
- package/dist/resolvers/index.d.ts +3 -2
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/joi.d.cts +3 -2
- package/dist/resolvers/joi.d.ts +3 -2
- package/dist/resolvers/yup.d.cts +3 -2
- package/dist/resolvers/yup.d.ts +3 -2
- package/dist/resolvers/zod.d.cts +3 -2
- package/dist/resolvers/zod.d.ts +3 -2
- package/dist/store-api-types-D-ZHxzRy.d.cts +161 -0
- package/dist/store-api-types-DPi30jQF.d.ts +161 -0
- package/dist/{bus-DgilLszS.d.ts → types-CG5nYeRk.d.ts} +76 -45
- package/dist/{bus-rcUiufS7.d.cts → types-D6LhF5GC.d.cts} +76 -45
- package/dist/{types-CUXh7PqD.d.cts → types-D8DgIUhJ.d.cts} +1 -1
- package/dist/{types-CUXh7PqD.d.ts → types-D8DgIUhJ.d.ts} +1 -1
- package/dist/{upload-EXnJLq8k.d.cts → upload-C2mpfhp1.d.cts} +1 -1
- package/dist/{upload-EXnJLq8k.d.ts → upload-C2mpfhp1.d.ts} +1 -1
- package/dist/{use-bit-persist-CIKFwtdM.d.cts → use-bit-persist-BTwy8kvA.d.ts} +8 -6
- package/dist/{use-bit-persist-Bc06fmqZ.d.ts → use-bit-persist-C2LHNTVv.d.cts} +8 -6
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +6 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +9 -7
- package/dist/vue/index.d.ts +9 -7
- package/dist/vue/index.js +1 -1
- package/dist/vue/index.js.map +1 -1
- package/package.json +32 -10
- package/dist/chunk-DIEE6LUO.js +0 -2
- package/dist/chunk-DIEE6LUO.js.map +0 -1
- package/dist/chunk-FUUQB4DV.cjs +0 -2
- package/dist/chunk-FUUQB4DV.cjs.map +0 -1
- package/dist/chunk-KWLLYQOL.cjs +0 -2
- package/dist/chunk-KWLLYQOL.cjs.map +0 -1
- package/dist/chunk-LIYZPSWM.js +0 -2
- package/dist/chunk-LIYZPSWM.js.map +0 -1
- package/dist/chunk-QAL6J5GQ.cjs +0 -2
- package/dist/chunk-QAL6J5GQ.cjs.map +0 -1
- package/dist/chunk-SA47B5OP.js +0 -2
- package/dist/chunk-SA47B5OP.js.map +0 -1
- package/dist/store-api-types-9ipdute1.d.ts +0 -187
- package/dist/store-api-types-B6_bPoVI.d.cts +0 -187
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { f as BitState, e as BitPath, g as BitFieldState, b as BitPathValue, h as BitFieldDefinition, c as BitErrors, D as DeepPartial, B as BitArrayPath, a as BitArrayItem, i as BitPersistMetadata, S as ScopeStatus, j as BitConfig, k as ValidatorFn, l as DevToolsOptions, m as BitPersistResolvedConfig, n as BitIdFactory, o as BitPlugin, p as BitScheduler, q as BitFormGlobal } from './bus-DgilLszS.js';
|
|
2
|
-
import { B as BitMask } from './types-CUXh7PqD.js';
|
|
3
|
-
|
|
4
|
-
type BitSelector<T extends object, TSlice> = (state: Readonly<BitState<T>>) => TSlice;
|
|
5
|
-
type BitEqualityFn<TValue> = (previous: TValue, next: TValue) => boolean;
|
|
6
|
-
interface BitSelectorSubscriptionOptions<TValue> {
|
|
7
|
-
equalityFn?: BitEqualityFn<TValue>;
|
|
8
|
-
emitImmediately?: boolean;
|
|
9
|
-
paths?: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface BitValidationOptions {
|
|
13
|
-
scope?: string;
|
|
14
|
-
scopeFields?: string[];
|
|
15
|
-
}
|
|
16
|
-
interface BitHistoryMetadata {
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
canUndo: boolean;
|
|
19
|
-
canRedo: boolean;
|
|
20
|
-
historyIndex: number;
|
|
21
|
-
historySize: number;
|
|
22
|
-
}
|
|
23
|
-
interface BitFormMeta {
|
|
24
|
-
isValid: boolean;
|
|
25
|
-
isDirty: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface BitFrameworkConfig<T extends object = any> extends BitConfig<T> {
|
|
30
|
-
initialValues: T;
|
|
31
|
-
resolver?: ValidatorFn<T>;
|
|
32
|
-
validationDelay: number;
|
|
33
|
-
history: {
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
limit: number;
|
|
36
|
-
};
|
|
37
|
-
masks?: Record<string, BitMask>;
|
|
38
|
-
fields?: Record<string, BitFieldDefinition<T>>;
|
|
39
|
-
devTools?: boolean | DevToolsOptions;
|
|
40
|
-
persist: BitPersistResolvedConfig<T>;
|
|
41
|
-
idFactory: BitIdFactory;
|
|
42
|
-
plugins: BitPlugin<T>[];
|
|
43
|
-
scheduler?: BitScheduler;
|
|
44
|
-
subscriptionCacheSize?: number;
|
|
45
|
-
bus?: BitFormGlobal;
|
|
46
|
-
}
|
|
47
|
-
interface BitStoreQueryApi<T extends object = any> {
|
|
48
|
-
getConfig(): Readonly<BitFrameworkConfig<T>>;
|
|
49
|
-
getState(): Readonly<BitState<T>>;
|
|
50
|
-
isHidden<P extends BitPath<T>>(path: P): boolean;
|
|
51
|
-
isRequired<P extends BitPath<T>>(path: P): boolean;
|
|
52
|
-
isFieldDirty(path: string): boolean;
|
|
53
|
-
isFieldValidating(path: string): boolean;
|
|
54
|
-
getDirtyValues(): Partial<T>;
|
|
55
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
56
|
-
getHistoryMetadata(): BitHistoryMetadata;
|
|
57
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
58
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
59
|
-
}
|
|
60
|
-
interface BitStoreObserveApi<T extends object = any> {
|
|
61
|
-
subscribe(listener: () => void): () => void;
|
|
62
|
-
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
63
|
-
subscribeHistoryMeta(listener: (meta: BitHistoryMetadata) => void): () => void;
|
|
64
|
-
subscribeScopeStatus(scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
65
|
-
}
|
|
66
|
-
interface BitStoreWriteApi<T extends object = any> {
|
|
67
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
68
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
69
|
-
setValues(values: T | DeepPartial<T>, options?: {
|
|
70
|
-
partial?: boolean;
|
|
71
|
-
rebase?: boolean;
|
|
72
|
-
}): void;
|
|
73
|
-
setError(path: string, message: string | undefined): void;
|
|
74
|
-
setErrors(errors: BitErrors<T>): void;
|
|
75
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
76
|
-
validate(options?: BitValidationOptions): Promise<boolean>;
|
|
77
|
-
reset(): void;
|
|
78
|
-
transaction<TResult>(callback: () => TResult): TResult;
|
|
79
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
interface BitStorePersistFeatureApi {
|
|
82
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
83
|
-
restorePersisted(): Promise<boolean>;
|
|
84
|
-
forceSave(): Promise<void>;
|
|
85
|
-
clearPersisted(): Promise<void>;
|
|
86
|
-
}
|
|
87
|
-
interface BitStoreRegistrationFeatureApi<T extends object = any> {
|
|
88
|
-
cleanup(): void;
|
|
89
|
-
registerField(path: string, config: BitFieldDefinition<T>): void;
|
|
90
|
-
unregisterField(path: string): void;
|
|
91
|
-
}
|
|
92
|
-
interface BitStoreArrayFeatureApi<T extends object = any> {
|
|
93
|
-
pushItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
94
|
-
prependItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
95
|
-
insertItem<P extends BitArrayPath<T>>(path: P, index: number, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
96
|
-
removeItem<P extends BitArrayPath<T>>(path: P, index: number): void;
|
|
97
|
-
moveItem<P extends BitArrayPath<T>>(path: P, from: number, to: number): void;
|
|
98
|
-
swapItems<P extends BitArrayPath<T>>(path: P, indexA: number, indexB: number): void;
|
|
99
|
-
}
|
|
100
|
-
interface BitStoreHistoryFeatureApi {
|
|
101
|
-
undo(): void;
|
|
102
|
-
redo(): void;
|
|
103
|
-
}
|
|
104
|
-
interface BitFormMetaBindingApi<T extends object = any> {
|
|
105
|
-
getState(): Readonly<BitState<T>>;
|
|
106
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
107
|
-
}
|
|
108
|
-
interface BitFieldBindingApi<T extends object = any> {
|
|
109
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
110
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
111
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
112
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
113
|
-
resolveMask(path: string): BitMask | undefined;
|
|
114
|
-
unregisterField?(path: string): void;
|
|
115
|
-
}
|
|
116
|
-
interface BitArrayBindingApi<T extends object = any> extends Pick<BitFormBindingApi<T>, "getState" | "setField" | "subscribePath" | "pushItem" | "prependItem" | "insertItem" | "removeItem" | "moveItem" | "swapItems" | "createArrayItemId"> {
|
|
117
|
-
}
|
|
118
|
-
interface BitStoreFeatureApi<T extends object = any> extends BitStorePersistFeatureApi, BitStoreRegistrationFeatureApi<T>, BitStoreArrayFeatureApi<T>, BitStoreHistoryFeatureApi {
|
|
119
|
-
}
|
|
120
|
-
interface BitStoreApi<T extends object = any> extends BitStoreQueryApi<T>, BitStoreObserveApi<T>, BitStoreWriteApi<T>, BitStoreFeatureApi<T> {
|
|
121
|
-
}
|
|
122
|
-
interface BitStoreHooksApi<T extends object = any> extends BitStoreApi<T> {
|
|
123
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
124
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
125
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
126
|
-
subscribePath<P extends BitPath<T>>(path: P, listener: (value: BitPathValue<T, P>) => void, options?: BitSelectorSubscriptionOptions<BitPathValue<T, P>>): () => void;
|
|
127
|
-
subscribeSelector<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: BitSelectorSubscriptionOptions<TSlice>): () => void;
|
|
128
|
-
subscribeTracked<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: Omit<BitSelectorSubscriptionOptions<TSlice>, "paths">): () => void;
|
|
129
|
-
unregisterPrefix?(prefix: string): void;
|
|
130
|
-
markFieldsTouched(paths: string[]): void;
|
|
131
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
132
|
-
resolveMask(path: string): BitMask | undefined;
|
|
133
|
-
getScopeFields(scopeName: string): string[];
|
|
134
|
-
createArrayItemId(path: string, index?: number): string;
|
|
135
|
-
}
|
|
136
|
-
interface BitFormBindingApi<T extends object = any> {
|
|
137
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
138
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
139
|
-
getState(): Readonly<BitState<T>>;
|
|
140
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
141
|
-
subscribe(listener: () => void): () => void;
|
|
142
|
-
subscribePath<P extends BitPath<T>>(path: P, listener: (value: BitPathValue<T, P>) => void, options?: BitSelectorSubscriptionOptions<BitPathValue<T, P>>): () => void;
|
|
143
|
-
subscribeSelector<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: BitSelectorSubscriptionOptions<TSlice>): () => void;
|
|
144
|
-
subscribeTracked<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: Omit<BitSelectorSubscriptionOptions<TSlice>, "paths">): () => void;
|
|
145
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
146
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
147
|
-
registerField?(path: string, config: BitFieldDefinition<T>): void;
|
|
148
|
-
unregisterField?(path: string): void;
|
|
149
|
-
unregisterPrefix?(prefix: string): void;
|
|
150
|
-
markFieldsTouched(paths: string[]): void;
|
|
151
|
-
resolveMask(path: string): BitMask | undefined;
|
|
152
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
153
|
-
reset(): void;
|
|
154
|
-
validate(options?: BitValidationOptions): Promise<boolean>;
|
|
155
|
-
setError(path: string, message: string | undefined): void;
|
|
156
|
-
setErrors(errors: BitErrors<T>): void;
|
|
157
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
158
|
-
setValues(values: T | DeepPartial<T>, options?: {
|
|
159
|
-
partial?: boolean;
|
|
160
|
-
rebase?: boolean;
|
|
161
|
-
}): void;
|
|
162
|
-
transaction<TResult>(callback: () => TResult): TResult;
|
|
163
|
-
pushItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
164
|
-
prependItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
165
|
-
insertItem<P extends BitArrayPath<T>>(path: P, index: number, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
166
|
-
removeItem<P extends BitArrayPath<T>>(path: P, index: number): void;
|
|
167
|
-
moveItem<P extends BitArrayPath<T>>(path: P, from: number, to: number): void;
|
|
168
|
-
swapItems<P extends BitArrayPath<T>>(path: P, indexA: number, indexB: number): void;
|
|
169
|
-
undo(): void;
|
|
170
|
-
redo(): void;
|
|
171
|
-
getHistoryMetadata(): BitHistoryMetadata;
|
|
172
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
173
|
-
restorePersisted(): Promise<boolean>;
|
|
174
|
-
forceSave(): Promise<void>;
|
|
175
|
-
clearPersisted(): Promise<void>;
|
|
176
|
-
getDirtyValues(): Partial<T>;
|
|
177
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
178
|
-
getScopeFields(scopeName: string): string[];
|
|
179
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
180
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
181
|
-
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
182
|
-
subscribeHistoryMeta(listener: (meta: BitHistoryMetadata) => void): () => void;
|
|
183
|
-
subscribeScopeStatus(scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
184
|
-
createArrayItemId(path: string, index?: number): string;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export type { BitArrayBindingApi as B, BitStoreHooksApi as a, BitFormBindingApi as b, BitHistoryMetadata as c, BitValidationOptions as d, BitFormMetaBindingApi as e, BitFormMeta as f, BitFieldBindingApi as g, BitEqualityFn as h, BitFrameworkConfig as i, BitSelector as j, BitSelectorSubscriptionOptions as k, BitStoreApi as l, BitStoreArrayFeatureApi as m, BitStoreFeatureApi as n, BitStoreHistoryFeatureApi as o, BitStoreObserveApi as p, BitStorePersistFeatureApi as q, BitStoreQueryApi as r, BitStoreRegistrationFeatureApi as s, BitStoreWriteApi as t };
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { f as BitState, e as BitPath, g as BitFieldState, b as BitPathValue, h as BitFieldDefinition, c as BitErrors, D as DeepPartial, B as BitArrayPath, a as BitArrayItem, i as BitPersistMetadata, S as ScopeStatus, j as BitConfig, k as ValidatorFn, l as DevToolsOptions, m as BitPersistResolvedConfig, n as BitIdFactory, o as BitPlugin, p as BitScheduler, q as BitFormGlobal } from './bus-rcUiufS7.cjs';
|
|
2
|
-
import { B as BitMask } from './types-CUXh7PqD.cjs';
|
|
3
|
-
|
|
4
|
-
type BitSelector<T extends object, TSlice> = (state: Readonly<BitState<T>>) => TSlice;
|
|
5
|
-
type BitEqualityFn<TValue> = (previous: TValue, next: TValue) => boolean;
|
|
6
|
-
interface BitSelectorSubscriptionOptions<TValue> {
|
|
7
|
-
equalityFn?: BitEqualityFn<TValue>;
|
|
8
|
-
emitImmediately?: boolean;
|
|
9
|
-
paths?: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface BitValidationOptions {
|
|
13
|
-
scope?: string;
|
|
14
|
-
scopeFields?: string[];
|
|
15
|
-
}
|
|
16
|
-
interface BitHistoryMetadata {
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
canUndo: boolean;
|
|
19
|
-
canRedo: boolean;
|
|
20
|
-
historyIndex: number;
|
|
21
|
-
historySize: number;
|
|
22
|
-
}
|
|
23
|
-
interface BitFormMeta {
|
|
24
|
-
isValid: boolean;
|
|
25
|
-
isDirty: boolean;
|
|
26
|
-
isSubmitting: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface BitFrameworkConfig<T extends object = any> extends BitConfig<T> {
|
|
30
|
-
initialValues: T;
|
|
31
|
-
resolver?: ValidatorFn<T>;
|
|
32
|
-
validationDelay: number;
|
|
33
|
-
history: {
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
limit: number;
|
|
36
|
-
};
|
|
37
|
-
masks?: Record<string, BitMask>;
|
|
38
|
-
fields?: Record<string, BitFieldDefinition<T>>;
|
|
39
|
-
devTools?: boolean | DevToolsOptions;
|
|
40
|
-
persist: BitPersistResolvedConfig<T>;
|
|
41
|
-
idFactory: BitIdFactory;
|
|
42
|
-
plugins: BitPlugin<T>[];
|
|
43
|
-
scheduler?: BitScheduler;
|
|
44
|
-
subscriptionCacheSize?: number;
|
|
45
|
-
bus?: BitFormGlobal;
|
|
46
|
-
}
|
|
47
|
-
interface BitStoreQueryApi<T extends object = any> {
|
|
48
|
-
getConfig(): Readonly<BitFrameworkConfig<T>>;
|
|
49
|
-
getState(): Readonly<BitState<T>>;
|
|
50
|
-
isHidden<P extends BitPath<T>>(path: P): boolean;
|
|
51
|
-
isRequired<P extends BitPath<T>>(path: P): boolean;
|
|
52
|
-
isFieldDirty(path: string): boolean;
|
|
53
|
-
isFieldValidating(path: string): boolean;
|
|
54
|
-
getDirtyValues(): Partial<T>;
|
|
55
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
56
|
-
getHistoryMetadata(): BitHistoryMetadata;
|
|
57
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
58
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
59
|
-
}
|
|
60
|
-
interface BitStoreObserveApi<T extends object = any> {
|
|
61
|
-
subscribe(listener: () => void): () => void;
|
|
62
|
-
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
63
|
-
subscribeHistoryMeta(listener: (meta: BitHistoryMetadata) => void): () => void;
|
|
64
|
-
subscribeScopeStatus(scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
65
|
-
}
|
|
66
|
-
interface BitStoreWriteApi<T extends object = any> {
|
|
67
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
68
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
69
|
-
setValues(values: T | DeepPartial<T>, options?: {
|
|
70
|
-
partial?: boolean;
|
|
71
|
-
rebase?: boolean;
|
|
72
|
-
}): void;
|
|
73
|
-
setError(path: string, message: string | undefined): void;
|
|
74
|
-
setErrors(errors: BitErrors<T>): void;
|
|
75
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
76
|
-
validate(options?: BitValidationOptions): Promise<boolean>;
|
|
77
|
-
reset(): void;
|
|
78
|
-
transaction<TResult>(callback: () => TResult): TResult;
|
|
79
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
interface BitStorePersistFeatureApi {
|
|
82
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
83
|
-
restorePersisted(): Promise<boolean>;
|
|
84
|
-
forceSave(): Promise<void>;
|
|
85
|
-
clearPersisted(): Promise<void>;
|
|
86
|
-
}
|
|
87
|
-
interface BitStoreRegistrationFeatureApi<T extends object = any> {
|
|
88
|
-
cleanup(): void;
|
|
89
|
-
registerField(path: string, config: BitFieldDefinition<T>): void;
|
|
90
|
-
unregisterField(path: string): void;
|
|
91
|
-
}
|
|
92
|
-
interface BitStoreArrayFeatureApi<T extends object = any> {
|
|
93
|
-
pushItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
94
|
-
prependItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
95
|
-
insertItem<P extends BitArrayPath<T>>(path: P, index: number, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
96
|
-
removeItem<P extends BitArrayPath<T>>(path: P, index: number): void;
|
|
97
|
-
moveItem<P extends BitArrayPath<T>>(path: P, from: number, to: number): void;
|
|
98
|
-
swapItems<P extends BitArrayPath<T>>(path: P, indexA: number, indexB: number): void;
|
|
99
|
-
}
|
|
100
|
-
interface BitStoreHistoryFeatureApi {
|
|
101
|
-
undo(): void;
|
|
102
|
-
redo(): void;
|
|
103
|
-
}
|
|
104
|
-
interface BitFormMetaBindingApi<T extends object = any> {
|
|
105
|
-
getState(): Readonly<BitState<T>>;
|
|
106
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
107
|
-
}
|
|
108
|
-
interface BitFieldBindingApi<T extends object = any> {
|
|
109
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
110
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
111
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
112
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
113
|
-
resolveMask(path: string): BitMask | undefined;
|
|
114
|
-
unregisterField?(path: string): void;
|
|
115
|
-
}
|
|
116
|
-
interface BitArrayBindingApi<T extends object = any> extends Pick<BitFormBindingApi<T>, "getState" | "setField" | "subscribePath" | "pushItem" | "prependItem" | "insertItem" | "removeItem" | "moveItem" | "swapItems" | "createArrayItemId"> {
|
|
117
|
-
}
|
|
118
|
-
interface BitStoreFeatureApi<T extends object = any> extends BitStorePersistFeatureApi, BitStoreRegistrationFeatureApi<T>, BitStoreArrayFeatureApi<T>, BitStoreHistoryFeatureApi {
|
|
119
|
-
}
|
|
120
|
-
interface BitStoreApi<T extends object = any> extends BitStoreQueryApi<T>, BitStoreObserveApi<T>, BitStoreWriteApi<T>, BitStoreFeatureApi<T> {
|
|
121
|
-
}
|
|
122
|
-
interface BitStoreHooksApi<T extends object = any> extends BitStoreApi<T> {
|
|
123
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
124
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
125
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
126
|
-
subscribePath<P extends BitPath<T>>(path: P, listener: (value: BitPathValue<T, P>) => void, options?: BitSelectorSubscriptionOptions<BitPathValue<T, P>>): () => void;
|
|
127
|
-
subscribeSelector<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: BitSelectorSubscriptionOptions<TSlice>): () => void;
|
|
128
|
-
subscribeTracked<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: Omit<BitSelectorSubscriptionOptions<TSlice>, "paths">): () => void;
|
|
129
|
-
unregisterPrefix?(prefix: string): void;
|
|
130
|
-
markFieldsTouched(paths: string[]): void;
|
|
131
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
132
|
-
resolveMask(path: string): BitMask | undefined;
|
|
133
|
-
getScopeFields(scopeName: string): string[];
|
|
134
|
-
createArrayItemId(path: string, index?: number): string;
|
|
135
|
-
}
|
|
136
|
-
interface BitFormBindingApi<T extends object = any> {
|
|
137
|
-
getFieldState<P extends BitPath<T>>(path: P): Readonly<BitFieldState<T, BitPathValue<T, P>>>;
|
|
138
|
-
subscribeFieldState<P extends BitPath<T>>(path: P, listener: (state: Readonly<BitFieldState<T, BitPathValue<T, P>>>) => void): () => void;
|
|
139
|
-
getState(): Readonly<BitState<T>>;
|
|
140
|
-
subscribeFormMeta(listener: (meta: BitFormMeta) => void): () => void;
|
|
141
|
-
subscribe(listener: () => void): () => void;
|
|
142
|
-
subscribePath<P extends BitPath<T>>(path: P, listener: (value: BitPathValue<T, P>) => void, options?: BitSelectorSubscriptionOptions<BitPathValue<T, P>>): () => void;
|
|
143
|
-
subscribeSelector<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: BitSelectorSubscriptionOptions<TSlice>): () => void;
|
|
144
|
-
subscribeTracked<TSlice>(selector: BitSelector<T, TSlice>, listener: (slice: TSlice) => void, options?: Omit<BitSelectorSubscriptionOptions<TSlice>, "paths">): () => void;
|
|
145
|
-
setField<P extends BitPath<T>>(path: P, value: BitPathValue<T, P>): void;
|
|
146
|
-
blurField<P extends BitPath<T>>(path: P): void;
|
|
147
|
-
registerField?(path: string, config: BitFieldDefinition<T>): void;
|
|
148
|
-
unregisterField?(path: string): void;
|
|
149
|
-
unregisterPrefix?(prefix: string): void;
|
|
150
|
-
markFieldsTouched(paths: string[]): void;
|
|
151
|
-
resolveMask(path: string): BitMask | undefined;
|
|
152
|
-
submit(onSuccess: (values: T, dirtyValues?: Partial<T>) => void | Promise<void>): Promise<void>;
|
|
153
|
-
reset(): void;
|
|
154
|
-
validate(options?: BitValidationOptions): Promise<boolean>;
|
|
155
|
-
setError(path: string, message: string | undefined): void;
|
|
156
|
-
setErrors(errors: BitErrors<T>): void;
|
|
157
|
-
setServerErrors(serverErrors: Record<string, string[] | string>): void;
|
|
158
|
-
setValues(values: T | DeepPartial<T>, options?: {
|
|
159
|
-
partial?: boolean;
|
|
160
|
-
rebase?: boolean;
|
|
161
|
-
}): void;
|
|
162
|
-
transaction<TResult>(callback: () => TResult): TResult;
|
|
163
|
-
pushItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
164
|
-
prependItem<P extends BitArrayPath<T>>(path: P, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
165
|
-
insertItem<P extends BitArrayPath<T>>(path: P, index: number, value: BitArrayItem<BitPathValue<T, P>>): void;
|
|
166
|
-
removeItem<P extends BitArrayPath<T>>(path: P, index: number): void;
|
|
167
|
-
moveItem<P extends BitArrayPath<T>>(path: P, from: number, to: number): void;
|
|
168
|
-
swapItems<P extends BitArrayPath<T>>(path: P, indexA: number, indexB: number): void;
|
|
169
|
-
undo(): void;
|
|
170
|
-
redo(): void;
|
|
171
|
-
getHistoryMetadata(): BitHistoryMetadata;
|
|
172
|
-
getPersistMetadata(): BitPersistMetadata;
|
|
173
|
-
restorePersisted(): Promise<boolean>;
|
|
174
|
-
forceSave(): Promise<void>;
|
|
175
|
-
clearPersisted(): Promise<void>;
|
|
176
|
-
getDirtyValues(): Partial<T>;
|
|
177
|
-
hasValidationsInProgress(scopeFields?: string[]): boolean;
|
|
178
|
-
getScopeFields(scopeName: string): string[];
|
|
179
|
-
getStepStatus(scopeName: string): ScopeStatus;
|
|
180
|
-
getStepErrors(scopeName: string): Record<string, string>;
|
|
181
|
-
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
182
|
-
subscribeHistoryMeta(listener: (meta: BitHistoryMetadata) => void): () => void;
|
|
183
|
-
subscribeScopeStatus(scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
184
|
-
createArrayItemId(path: string, index?: number): string;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export type { BitArrayBindingApi as B, BitStoreHooksApi as a, BitFormBindingApi as b, BitHistoryMetadata as c, BitValidationOptions as d, BitFormMetaBindingApi as e, BitFormMeta as f, BitFieldBindingApi as g, BitEqualityFn as h, BitFrameworkConfig as i, BitSelector as j, BitSelectorSubscriptionOptions as k, BitStoreApi as l, BitStoreArrayFeatureApi as m, BitStoreFeatureApi as n, BitStoreHistoryFeatureApi as o, BitStoreObserveApi as p, BitStorePersistFeatureApi as q, BitStoreQueryApi as r, BitStoreRegistrationFeatureApi as s, BitStoreWriteApi as t };
|