@formisch/qwik 0.6.0 → 0.7.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/README.md +7 -7
- package/dist/index.qwik.js +5 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -70,17 +70,17 @@ What makes Formisch unique is its framework-agnostic core, which is fully native
|
|
|
70
70
|
|
|
71
71
|
Thanks to our partners who support the development! [Join them](https://github.com/sponsors/fabian-hiller) and contribute to the sustainability of open source software!
|
|
72
72
|
|
|
73
|
-

|
|
74
74
|
|
|
75
75
|
## Feedback
|
|
76
76
|
|
|
77
|
-
Find a bug or have an idea how to improve the library? Please fill out an [issue](https://github.com/
|
|
77
|
+
Find a bug or have an idea how to improve the library? Please fill out an [issue](https://github.com/open-circle/formisch/issues/new). Together we can make forms even better!
|
|
78
78
|
|
|
79
79
|
## License
|
|
80
80
|
|
|
81
|
-
This project is available free of charge and licensed under the [MIT license](https://github.com/
|
|
81
|
+
This project is available free of charge and licensed under the [MIT license](https://github.com/open-circle/formisch/blob/main/LICENSE.md).
|
|
82
82
|
|
|
83
|
-
[formisch-preact]: https://github.com/
|
|
84
|
-
[formisch-solid]: https://github.com/
|
|
85
|
-
[formisch-svelte]: https://github.com/
|
|
86
|
-
[formisch-vue]: https://github.com/
|
|
83
|
+
[formisch-preact]: https://github.com/open-circle/formisch/tree/main/frameworks/preact
|
|
84
|
+
[formisch-solid]: https://github.com/open-circle/formisch/tree/main/frameworks/solid
|
|
85
|
+
[formisch-svelte]: https://github.com/open-circle/formisch/tree/main/frameworks/svelte
|
|
86
|
+
[formisch-vue]: https://github.com/open-circle/formisch/tree/main/frameworks/vue
|
package/dist/index.qwik.js
CHANGED
|
@@ -387,7 +387,7 @@ function setNestedInput(internalFieldStore, input) {
|
|
|
387
387
|
} else {
|
|
388
388
|
internalFieldStore.input.value = input;
|
|
389
389
|
const startInput = internalFieldStore.startInput.value;
|
|
390
|
-
internalFieldStore.isDirty.value = startInput !== input && (startInput
|
|
390
|
+
internalFieldStore.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
/**
|
|
@@ -594,7 +594,7 @@ function handleSubmit(form, handler) {
|
|
|
594
594
|
const result = await validateFormInput(internalFormStore, { shouldFocus: true });
|
|
595
595
|
if (result.success) await handler(result.output, event);
|
|
596
596
|
} catch (error) {
|
|
597
|
-
internalFormStore.errors.value = [error
|
|
597
|
+
internalFormStore.errors.value = [error && typeof error === "object" && "message" in error && typeof error.message === "string" ? error.message : "An unknown error has occurred."];
|
|
598
598
|
} finally {
|
|
599
599
|
internalFormStore.isSubmitting.value = false;
|
|
600
600
|
}
|
|
@@ -651,10 +651,10 @@ function move(form, config) {
|
|
|
651
651
|
internalArrayStore.items.value = newItems;
|
|
652
652
|
const tempInternalFieldStore = {};
|
|
653
653
|
initializeFieldStore(tempInternalFieldStore, internalArrayStore.schema.item, void 0, []);
|
|
654
|
-
copyItemState(internalArrayStore.children[config.from
|
|
654
|
+
copyItemState(internalArrayStore.children[config.from], tempInternalFieldStore);
|
|
655
655
|
if (config.from < config.to) for (let index = config.from; index < config.to; index++) copyItemState(internalArrayStore.children[index + 1], internalArrayStore.children[index]);
|
|
656
656
|
else for (let index = config.from; index > config.to; index--) copyItemState(internalArrayStore.children[index - 1], internalArrayStore.children[index]);
|
|
657
|
-
copyItemState(tempInternalFieldStore, internalArrayStore.children[config.
|
|
657
|
+
copyItemState(tempInternalFieldStore, internalArrayStore.children[config.to]);
|
|
658
658
|
internalArrayStore.isTouched.value = true;
|
|
659
659
|
internalArrayStore.isDirty.value = internalArrayStore.startItems.value.join() !== newItems.join();
|
|
660
660
|
validateIfRequired(internalFormStore, internalArrayStore, "input");
|
|
@@ -721,7 +721,7 @@ function reset(form, config) {
|
|
|
721
721
|
else {
|
|
722
722
|
const startInput = internalFieldStore$1.startInput.value;
|
|
723
723
|
const input = internalFieldStore$1.input.value;
|
|
724
|
-
internalFieldStore$1.isDirty.value = startInput !== input && (startInput
|
|
724
|
+
internalFieldStore$1.isDirty.value = startInput !== input && (startInput != null || input !== "" && !Number.isNaN(input));
|
|
725
725
|
for (const element of internalFieldStore$1.elements) if (element.type === "file") element.value = "";
|
|
726
726
|
}
|
|
727
727
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formisch/qwik",
|
|
3
3
|
"description": "The modular and type-safe form library for Qwik",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fabian Hiller",
|
|
7
7
|
"homepage": "https://formisch.dev",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/
|
|
10
|
+
"url": "https://github.com/open-circle/formisch"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"qwik",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"valibot": "^1.1.0",
|
|
50
50
|
"vite": "7.0.4",
|
|
51
51
|
"vite-tsconfig-paths": "^5.1.4",
|
|
52
|
-
"@formisch/core": "0.4.
|
|
53
|
-
"@formisch/methods": "0.
|
|
52
|
+
"@formisch/core": "0.4.2",
|
|
53
|
+
"@formisch/methods": "0.5.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@qwik.dev/core": ">=2",
|