@formisch/qwik 0.6.1 → 0.7.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 +7 -7
- package/dist/index.d.ts +5 -5
- package/dist/index.qwik.js +3 -3
- 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.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { JSXOutput, NoSerialize, PropsOf, QRL, ReadonlySignal } from "@qwik.dev/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _qwik_dev_core_internal0 from "@qwik.dev/core/internal";
|
|
4
4
|
|
|
5
5
|
//#region ../../packages/core/dist/index.qwik.d.ts
|
|
6
6
|
|
|
@@ -499,7 +499,7 @@ declare function getInput<TSchema extends Schema, TFieldPath extends RequiredPat
|
|
|
499
499
|
*
|
|
500
500
|
* @returns A submit event handler function to attach to the form element.
|
|
501
501
|
*/
|
|
502
|
-
declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => void
|
|
502
|
+
declare function handleSubmit<TSchema extends Schema>(form: BaseFormStore<TSchema>, handler: SubmitHandler<TSchema>): (event: SubmitEvent) => Promise<void>;
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/insert/insert.d.ts
|
|
505
505
|
/**
|
|
@@ -973,7 +973,7 @@ interface FieldProps<TSchema extends Schema = Schema, TFieldPath extends Require
|
|
|
973
973
|
*
|
|
974
974
|
* @returns The UI of the field to be rendered.
|
|
975
975
|
*/
|
|
976
|
-
declare const Field: <TSchema extends Schema, TFieldPath extends RequiredPath>(props:
|
|
976
|
+
declare const Field: <TSchema extends Schema, TFieldPath extends RequiredPath>(props: _qwik_dev_core_internal0.PublicProps<FieldProps<TSchema, TFieldPath>>, key: string | null, flags: number, dev?: _qwik_dev_core_internal0.DevJSX) => JSXOutput;
|
|
977
977
|
//#endregion
|
|
978
978
|
//#region src/components/FieldArray/FieldArray.d.ts
|
|
979
979
|
/**
|
|
@@ -1001,7 +1001,7 @@ interface FieldArrayProps<TSchema extends Schema = Schema, TFieldArrayPath exten
|
|
|
1001
1001
|
*
|
|
1002
1002
|
* @returns The UI of the field array to be rendered.
|
|
1003
1003
|
*/
|
|
1004
|
-
declare const FieldArray: <TSchema extends Schema, TFieldArrayPath extends RequiredPath>(props:
|
|
1004
|
+
declare const FieldArray: <TSchema extends Schema, TFieldArrayPath extends RequiredPath>(props: _qwik_dev_core_internal0.PublicProps<FieldArrayProps<TSchema, TFieldArrayPath>>, key: string | null, flags: number, dev?: _qwik_dev_core_internal0.DevJSX) => JSXOutput;
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region src/components/Form/Form.d.ts
|
|
1007
1007
|
/**
|
|
@@ -1023,7 +1023,7 @@ type FormProps<TSchema extends Schema = Schema> = Omit<PropsOf<'form'>, 'onSubmi
|
|
|
1023
1023
|
*
|
|
1024
1024
|
* @returns The a native form element.
|
|
1025
1025
|
*/
|
|
1026
|
-
declare const Form: <TSchema extends Schema>(props:
|
|
1026
|
+
declare const Form: <TSchema extends Schema>(props: _qwik_dev_core_internal0.PublicProps<FormProps<TSchema>>, key: string | null, flags: number, dev?: _qwik_dev_core_internal0.DevJSX) => JSXOutput;
|
|
1027
1027
|
//#endregion
|
|
1028
1028
|
//#region src/hooks/useField/useField.d.ts
|
|
1029
1029
|
/**
|
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
|
}
|
|
@@ -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.1",
|
|
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.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@qwik.dev/core": ">=2",
|