mobx-react-hook-form 4.0.2 → 5.0.0
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/mobx-form/deep-observable-struct.d.ts +7 -0
- package/mobx-form/deep-observable-struct.d.ts.map +1 -0
- package/mobx-form/deep-observable-struct.js +59 -0
- package/mobx-form/mobx-form.d.ts +5 -1
- package/mobx-form/mobx-form.d.ts.map +1 -1
- package/mobx-form/mobx-form.js +50 -49
- package/mobx-form/mobx-form.types.d.ts +7 -2
- package/mobx-form/mobx-form.types.d.ts.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-observable-struct.d.ts","sourceRoot":"","sources":["../../src/mobx-form/deep-observable-struct.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,qBAAa,oBAAoB,CAAC,KAAK,SAAS,SAAS;IACvD,IAAI,EAAE,KAAK,CAAC;gBAEA,IAAI,EAAE,KAAK;IASvB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;CAoD5B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
+
/* eslint-disable no-prototype-builtins */
|
|
3
|
+
/* eslint-disable sonarjs/cognitive-complexity */
|
|
4
|
+
import { action, makeObservable, observable, toJS } from 'mobx';
|
|
5
|
+
import { typeGuard } from 'yummies/type-guard';
|
|
6
|
+
export class DeepObservableStruct {
|
|
7
|
+
data;
|
|
8
|
+
constructor(data) {
|
|
9
|
+
this.data = data;
|
|
10
|
+
makeObservable(this, {
|
|
11
|
+
data: observable.deep,
|
|
12
|
+
set: action,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
set(newData) {
|
|
16
|
+
const currentData = toJS(this.data);
|
|
17
|
+
const stack = Object.keys(currentData).map((it) => ({
|
|
18
|
+
key: it,
|
|
19
|
+
currObservable: this.data,
|
|
20
|
+
curr: currentData,
|
|
21
|
+
new: newData,
|
|
22
|
+
}));
|
|
23
|
+
while (stack.length > 0) {
|
|
24
|
+
const item = stack.shift();
|
|
25
|
+
const newValue = item.new[item.key];
|
|
26
|
+
const currValue = item.curr[item.key];
|
|
27
|
+
if (item.key in item.new) {
|
|
28
|
+
if (typeGuard.isObject(newValue) && typeGuard.isObject(currValue)) {
|
|
29
|
+
const newValueKeys = Object.keys(newValue);
|
|
30
|
+
Object.keys(currValue).forEach((key) => {
|
|
31
|
+
if (!(key in newValue)) {
|
|
32
|
+
delete item.currObservable[item.key][key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
newValueKeys.forEach((key) => {
|
|
36
|
+
stack.push({
|
|
37
|
+
key,
|
|
38
|
+
currObservable: item.currObservable[item.key],
|
|
39
|
+
curr: currValue,
|
|
40
|
+
new: newValue,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
else if (newValue !== currValue) {
|
|
45
|
+
item.currObservable[item.key] = newValue;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
delete item.currObservable[item.key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
Object.keys(newData).forEach((newDataKey) => {
|
|
53
|
+
if (!currentData[newDataKey]) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
this.data[newDataKey] = newData[newDataKey];
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
package/mobx-form/mobx-form.d.ts
CHANGED
|
@@ -252,11 +252,11 @@ export declare class Form<TFieldValues extends FieldValues = FieldValues, TConte
|
|
|
252
252
|
*/
|
|
253
253
|
resetForm: UseFormReset<TFieldValues>;
|
|
254
254
|
protected abortController: AbortController;
|
|
255
|
-
protected lastRafId: number | undefined;
|
|
256
255
|
/**
|
|
257
256
|
* Original react-hook-form form
|
|
258
257
|
*/
|
|
259
258
|
originalForm: ReturnType<typeof createFormControl<TFieldValues, TContext, TTransformedValues>>;
|
|
259
|
+
private _observableStruct;
|
|
260
260
|
constructor(config: FormParams<TFieldValues, TContext, TTransformedValues>);
|
|
261
261
|
/**
|
|
262
262
|
* Method to manually submit form.
|
|
@@ -277,6 +277,10 @@ export declare class Form<TFieldValues extends FieldValues = FieldValues, TConte
|
|
|
277
277
|
*/
|
|
278
278
|
reset(e?: BaseSyntheticEvent): void;
|
|
279
279
|
private updateFormState;
|
|
280
|
+
protected lastRafId: number | undefined;
|
|
281
|
+
protected lastTimeoutId: number | undefined;
|
|
282
|
+
private stopScheduledFormStateUpdate;
|
|
283
|
+
private scheduleUpdateFormState;
|
|
280
284
|
destroy(): void;
|
|
281
285
|
}
|
|
282
286
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobx-form.d.ts","sourceRoot":"","sources":["../../src/mobx-form/mobx-form.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mobx-form.d.ts","sourceRoot":"","sources":["../../src/mobx-form/mobx-form.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EAGT,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,KAAK,aAAa,CAAC,YAAY,SAAS,WAAW,IACjD,SAAS,CAAC,YAAY,CAAC,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEJ,qBAAa,IAAI,CACf,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd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AAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,CACjC,SAAQ,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC;CAAG"}
|
package/mobx-form/mobx-form.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
import { LinkedAbortController } from 'linked-abort-controller';
|
|
3
|
-
import { action,
|
|
3
|
+
import { action, isObservableObject, makeObservable, observable, toJS, } from 'mobx';
|
|
4
4
|
import { createFormControl, get, set, } from 'react-hook-form';
|
|
5
|
+
import { DeepObservableStruct } from './deep-observable-struct.js';
|
|
5
6
|
export class Form {
|
|
6
7
|
config;
|
|
7
8
|
values;
|
|
@@ -19,10 +20,10 @@ export class Form {
|
|
|
19
20
|
* Use {resetForm} method
|
|
20
21
|
*/
|
|
21
22
|
defaultValues;
|
|
22
|
-
dirtyFields
|
|
23
|
-
touchedFields
|
|
24
|
-
validatingFields
|
|
25
|
-
errors
|
|
23
|
+
dirtyFields;
|
|
24
|
+
touchedFields;
|
|
25
|
+
validatingFields;
|
|
26
|
+
errors;
|
|
26
27
|
isReady = false;
|
|
27
28
|
/**
|
|
28
29
|
* Set an error for the field. When set an error which is not associated to a field then manual `clearErrors` invoke is required.
|
|
@@ -250,11 +251,11 @@ export class Form {
|
|
|
250
251
|
*/
|
|
251
252
|
resetForm;
|
|
252
253
|
abortController;
|
|
253
|
-
lastRafId;
|
|
254
254
|
/**
|
|
255
255
|
* Original react-hook-form form
|
|
256
256
|
*/
|
|
257
257
|
originalForm;
|
|
258
|
+
_observableStruct;
|
|
258
259
|
constructor(config) {
|
|
259
260
|
this.config = config;
|
|
260
261
|
this.abortController = new LinkedAbortController(config.abortSignal);
|
|
@@ -294,8 +295,19 @@ export class Form {
|
|
|
294
295
|
this.values = defaultValues;
|
|
295
296
|
return this.originalForm.reset(...args);
|
|
296
297
|
});
|
|
297
|
-
|
|
298
|
+
this._observableStruct = new DeepObservableStruct({
|
|
298
299
|
values: this.originalForm.getValues(),
|
|
300
|
+
errors: {},
|
|
301
|
+
dirtyFields: {},
|
|
302
|
+
touchedFields: {},
|
|
303
|
+
validatingFields: {},
|
|
304
|
+
});
|
|
305
|
+
this.values = this._observableStruct.data.values;
|
|
306
|
+
this.errors = this._observableStruct.data.errors;
|
|
307
|
+
this.validatingFields = this._observableStruct.data.validatingFields;
|
|
308
|
+
this.dirtyFields = this._observableStruct.data.dirtyFields;
|
|
309
|
+
this.touchedFields = this._observableStruct.data.touchedFields;
|
|
310
|
+
Object.assign(this, {
|
|
299
311
|
defaultValues,
|
|
300
312
|
});
|
|
301
313
|
const subscription = this.originalForm.subscribe({
|
|
@@ -314,18 +326,10 @@ export class Form {
|
|
|
314
326
|
this.updateFormState(rawFormState);
|
|
315
327
|
}
|
|
316
328
|
else {
|
|
317
|
-
|
|
318
|
-
cancelAnimationFrame(this.lastRafId);
|
|
319
|
-
this.lastRafId = undefined;
|
|
320
|
-
}
|
|
321
|
-
this.lastRafId = requestAnimationFrame(() => {
|
|
322
|
-
this.updateFormState(rawFormState);
|
|
323
|
-
this.lastRafId = undefined;
|
|
324
|
-
});
|
|
329
|
+
this.scheduleUpdateFormState(rawFormState);
|
|
325
330
|
}
|
|
326
331
|
},
|
|
327
332
|
});
|
|
328
|
-
observable.deep(this, 'values');
|
|
329
333
|
observable.ref(this, 'isDirty');
|
|
330
334
|
observable.ref(this, 'isLoading');
|
|
331
335
|
observable.ref(this, 'isSubmitted');
|
|
@@ -337,10 +341,6 @@ export class Form {
|
|
|
337
341
|
observable.ref(this, 'submitCount');
|
|
338
342
|
observable.ref(this, 'isReady');
|
|
339
343
|
observable.deep(this, 'defaultValues');
|
|
340
|
-
observable.deep(this, 'dirtyFields');
|
|
341
|
-
observable.deep(this, 'touchedFields');
|
|
342
|
-
observable.deep(this, 'validatingFields');
|
|
343
|
-
observable.deep(this, 'errors');
|
|
344
344
|
action(this, 'updateFormState');
|
|
345
345
|
observable.ref(this, 'originalForm');
|
|
346
346
|
action.bound(this, 'submit');
|
|
@@ -385,45 +385,46 @@ export class Form {
|
|
|
385
385
|
this.resetForm();
|
|
386
386
|
this.config.onReset?.(e);
|
|
387
387
|
}
|
|
388
|
-
updateFormState({ values, errors, ...simpleProperties }) {
|
|
388
|
+
updateFormState({ values, errors, dirtyFields, validatingFields, touchedFields, ...simpleProperties }) {
|
|
389
389
|
Object.entries(simpleProperties).forEach(([key, value]) => {
|
|
390
390
|
if (value != null) {
|
|
391
391
|
// @ts-ignore
|
|
392
392
|
this[key] = value;
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
// @ts-ignore
|
|
403
|
-
Object.assign(this.errors[errorField], errors[errorField]);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
// @ts-ignore
|
|
408
|
-
this.errors[errorField] = errors[errorField];
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
currentErrorsSet.forEach((errorField) => {
|
|
412
|
-
// @ts-ignore
|
|
413
|
-
delete this.errors[errorField];
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
this.errors = {};
|
|
418
|
-
}
|
|
419
|
-
// @ts-ignore
|
|
420
|
-
this.values = values ?? {};
|
|
395
|
+
this._observableStruct.set({
|
|
396
|
+
dirtyFields,
|
|
397
|
+
errors,
|
|
398
|
+
touchedFields,
|
|
399
|
+
validatingFields,
|
|
400
|
+
values,
|
|
401
|
+
});
|
|
421
402
|
}
|
|
422
|
-
|
|
423
|
-
|
|
403
|
+
lastRafId;
|
|
404
|
+
lastTimeoutId;
|
|
405
|
+
stopScheduledFormStateUpdate = () => {
|
|
424
406
|
if (this.lastRafId !== undefined) {
|
|
425
407
|
cancelAnimationFrame(this.lastRafId);
|
|
408
|
+
this.lastRafId = undefined;
|
|
409
|
+
}
|
|
410
|
+
if (this.lastTimeoutId !== undefined) {
|
|
411
|
+
clearTimeout(this.lastTimeoutId);
|
|
412
|
+
this.lastTimeoutId = undefined;
|
|
426
413
|
}
|
|
414
|
+
};
|
|
415
|
+
scheduleUpdateFormState = (rawFormState) => {
|
|
416
|
+
this.stopScheduledFormStateUpdate();
|
|
417
|
+
this.lastTimeoutId = setTimeout(() => {
|
|
418
|
+
this.lastRafId = requestAnimationFrame(() => {
|
|
419
|
+
this.updateFormState(rawFormState);
|
|
420
|
+
this.lastTimeoutId = undefined;
|
|
421
|
+
this.lastRafId = undefined;
|
|
422
|
+
});
|
|
423
|
+
}, this.config.lazyUpdatesTimer ?? 50);
|
|
424
|
+
};
|
|
425
|
+
destroy() {
|
|
426
|
+
this.abortController.abort();
|
|
427
|
+
this.stopScheduledFormStateUpdate();
|
|
427
428
|
}
|
|
428
429
|
}
|
|
429
430
|
/**
|
|
@@ -30,10 +30,15 @@ export interface FormParams<TFieldValues extends FieldValues = FieldValues, TCon
|
|
|
30
30
|
*/
|
|
31
31
|
onReset?: (event: any) => void;
|
|
32
32
|
/**
|
|
33
|
-
* lazy mobx form state updates using
|
|
34
|
-
* @
|
|
33
|
+
* lazy mobx form state updates using setTimeout
|
|
34
|
+
* @defaults `true`
|
|
35
35
|
*/
|
|
36
36
|
lazyUpdates?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* lazy mobx form state updates timer in ms
|
|
39
|
+
* @defaults `50`
|
|
40
|
+
*/
|
|
41
|
+
lazyUpdatesTimer?: number;
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
44
|
* @deprecated ⚠️ use `FormParams`. This export will be removed in next major release
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobx-form.types.d.ts","sourceRoot":"","sources":["../../src/mobx-form/mobx-form.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,aAAa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-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [],
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
"default": "./index.js",
|
|
53
53
|
"types": "./index.d.ts"
|
|
54
54
|
},
|
|
55
|
+
"./mobx-form/deep-observable-struct": {
|
|
56
|
+
"import": "./mobx-form/deep-observable-struct.js",
|
|
57
|
+
"default": "./mobx-form/deep-observable-struct.js",
|
|
58
|
+
"types": "./mobx-form/deep-observable-struct.d.ts"
|
|
59
|
+
},
|
|
55
60
|
"./mobx-form": {
|
|
56
61
|
"import": "./mobx-form/index.js",
|
|
57
62
|
"default": "./mobx-form/index.js",
|