@worknice/whiteboard 0.21.3 → 0.21.5
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/dist/forms/useForm.js +0 -3
- package/package.json +2 -2
package/dist/forms/useForm.js
CHANGED
|
@@ -17,13 +17,11 @@ const useForm = ({ initialValues, onSubmit, onSuccess, validators })=>{
|
|
|
17
17
|
setErrors(flatValidationErrors);
|
|
18
18
|
setStatus("errored");
|
|
19
19
|
await sleep(1000, ()=>setStatus("modified"));
|
|
20
|
-
setStatus("modified");
|
|
21
20
|
} else try {
|
|
22
21
|
const result = await onSubmit(data);
|
|
23
22
|
setStatus("success");
|
|
24
23
|
await sleep(1000, ()=>setStatus("modified"));
|
|
25
24
|
if (onSuccess) await onSuccess(result);
|
|
26
|
-
setStatus("modified");
|
|
27
25
|
} catch (error) {
|
|
28
26
|
if (error instanceof __WEBPACK_EXTERNAL_MODULE__FormError_js_149fc952__["default"]) setErrors(error.validationErrors);
|
|
29
27
|
else error instanceof Error ? setErrors([
|
|
@@ -39,7 +37,6 @@ const useForm = ({ initialValues, onSubmit, onSuccess, validators })=>{
|
|
|
39
37
|
]);
|
|
40
38
|
setStatus("errored");
|
|
41
39
|
await sleep(1000, ()=>setStatus("modified"));
|
|
42
|
-
setStatus("modified");
|
|
43
40
|
}
|
|
44
41
|
}, [
|
|
45
42
|
data,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.21.
|
|
4
|
+
"version": "0.21.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-markdown": "^10.1.0",
|
|
39
39
|
"utf8": "^3.0.0",
|
|
40
40
|
"zod": "^3.22.3",
|
|
41
|
-
"@worknice/utils": "^0.6.
|
|
41
|
+
"@worknice/utils": "^0.6.83"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@anolilab/semantic-release-pnpm": "^1.1.10",
|