Commit Graph

96 Commits

Author SHA1 Message Date
Tanner Linsley
0c88ee82f1 release: v0.9.0 2023-11-05 14:29:49 +00:00
Christian24
1a37fabcf4 fix: FormApi's deleteField method now updates the store
* Add basic tests for arrays

* Ran prettier

* Ran prettier

* Add new test for bug

* Fix bug regarding preserved values even if field is umounted

* Run prettier

* Update store subscription when removingFields

* Fix delete field

* Fix delete field

* chore: fix linting

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-11-05 06:16:29 -08:00
Tanner Linsley
90bd06ff56 release: v0.8.1 2023-11-05 14:02:10 +00:00
Corbin Crutchley
0dc440d7d9 fix: errors should no longer throw on intial render (#508) 2023-11-05 05:59:47 -08:00
Tanner Linsley
0982e3fe6c release: v0.8.0 2023-11-05 13:16:34 +00:00
Corbin Crutchley
2fc941ed76 feat: add back form validation (#505)
* initial attempt to add back form validation

* uncomment tests

* fixed form validation not running

* onChange + onBlur

* feat: mount method on FormApi

* fix solid-form test case

* fix checkLatest

* add onMount logic + test

* fix: run mount on proper API

* test: add React Form onChange validation tests

---------

Co-authored-by: aadito123 <aaditolkar123@gmail.com>
Co-authored-by: aadito123 <63646058+aadito123@users.noreply.github.com>
2023-11-05 05:14:29 -08:00
Tanner Linsley
5d3f0fd946 release: v0.7.2 2023-11-05 11:40:02 +00:00
Christian24
f75aab2f11 fix: form should now be aware of field unmounting
* Add basic tests for arrays

* Ran prettier

* Ran prettier

* Add new test for bug

* Fix bug regarding preserved values even if field is umounted

* Run prettier

* Update store subscription when removingFields
2023-11-05 03:37:46 -08:00
Tanner Linsley
fd19453188 release: v0.7.1 2023-11-03 19:35:09 +00:00
Christian24
25a2fc8ee6 fix: unmount field now updates form
* Add basic tests for arrays

* Ran prettier

* Ran prettier

* Add new test for bug

* Fix bug regarding preserved values even if field is umounted

* Run prettier
2023-11-03 12:33:25 -07:00
Tanner Linsley
665894708c release: v0.7.0 2023-11-01 02:25:38 +00:00
Aadit Olkar
986268476b feat: mount method on FormApi (#496)
* feat: mount method on FormApi

* fix solid-form test case

* fix: added form.mount() to tests
2023-10-31 19:23:17 -07:00
Tanner Linsley
84e257f310 release: v0.6.1 2023-10-30 07:48:01 +00:00
Tanner Linsley
bde212f23b release: v0.6.0 2023-10-30 07:20:15 +00:00
Aadit Olkar
6050fea779 feat: solid.js form (#471)
* solid commit -a

* fix failing tests and formatting

* comments + removed unneeded computed

* updated changes

* prettierd

* chore: add Solid Form to script to be deployed

* fix: fix typing of solid's Subscribe data

* chore: remove errant createEffect

* chore: rename Solid's useForm and useField to createForm and createField

* chore: remove old mention of React's memoization

* chore: add Solid simple example

* chore: add Solid yup example

* chore: add Zod Solid example

* docs: add initial docs for Solid package

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-30 00:17:49 -07:00
Tanner Linsley
1b394a7e72 release: v0.5.0 2023-10-30 06:03:37 +00:00
Vikas Kumar
57bc462978 feat: add preserve value to field API (#444)
* feat: add preserve value to field API

* removed conflict

* add test for core/fieldAPI

* add test for react/fieldAPI

* chore: fix TS usage and format

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-29 23:01:45 -07:00
☕️ mino
2b2ed02311 fix: form's valid state should be up to date (#475) 2023-10-18 03:23:09 -07:00
Tanner Linsley
d739f2a064 release: v0.4.1 2023-10-18 09:36:20 +00:00
Tanner Linsley
280a3bf96b release: v0.4.0 2023-10-18 09:23:40 +00:00
Corbin Crutchley
54652ee674 feat: Add Yup and Zod validator support (#462)
* chore: first pass

* chore: onto something I think

* chore: closer but no cigar

* chore: infer validator

* chore: infer zod

* feat: add validation transformer logic

* chore: fix typings for react adapter

* chore: fix issue with `this` not being defined properly

* chore: mostly update FieldInfo types from Vue

* chore: work on fixing type inferencing

* fix: make ValidatorType optional

* chore: make TName restriction easier to grok

* chore: fix React types

* chore: fix Vue types

* chore: fix typing issues

* chore: fix various linting items

* chore: fix ESlint and validation logic

* chore: fix inferencing from formdata

* chore: fix form inferencing

* chore: fix React TS types to match form validator logic

* chore: fix Vue types

* chore: migrate zod validation to dedicated package

* chore: add first integration test for zod adapter

* chore: enable non-validator types to be passed to validator

* feat: add yup 1.x adapter

* chore: add functionality and tests for form-wide validators

* chore: fix typings of async validation types

* fix: async validation should now run as-expected more often

* chore: add async tests for Yup validator

* chore: rename packages to match naming schema better

* chore: add Zod examples for React and Vue

* chore: add React and Vue Yup support

* chore: fix formatting

* chore: fix CI types

* chore: initial work to drastically improve docs

* docs: improve docs for validation

* docs: add adapter validation docs
2023-10-18 02:22:05 -07:00
Tanner Linsley
a721443870 release: v0.3.7 2023-10-17 11:56:39 +00:00
☕️ mino
5b74e0d29c fix: field defaultValue should precedence over form defaultValues (#463)
* fix: field `defaultValue` should precedence over form `defaultValues`

* chore: fix type

* chore: format
2023-10-17 04:55:30 -07:00
Tanner Linsley
0159e61103 release: v0.3.6 2023-09-14 15:08:50 +00:00
Tanner Linsley
638a3917c5 fix: remove _TData abstraction (#465)
* fix: remove _TData abstraction

* tests: fix
2023-09-14 09:07:42 -06:00
Tanner Linsley
9e5fef402e release: v0.3.5 2023-09-13 20:48:04 +00:00
Tanner Linsley
1fb28c53eb fix: refactor to flat generics with consistent names & patterns 2023-09-13 14:46:16 -06:00
Tanner Linsley
46b49ca669 fix: limit deep keys to max depth of 10 2023-09-13 10:37:47 -06:00
Tanner Linsley
658c8f8c6c release: v0.3.4 2023-09-09 11:05:16 +00:00
Corbin Crutchley
32793c92c1 fix: onChange should disappear when new input comes in (#461) 2023-09-09 04:03:00 -07:00
Tanner Linsley
192ffceca7 release: v0.3.3 2023-09-09 10:42:22 +00:00
Corbin Crutchley
160f71275f fix: Field components should now infer state.value properly
* chore: refactor TS typings for React

* fix: field should now infer state.value properly in React adapter

* chore: fix Vue package typings

* chore: fix linting

* chore: fix React adapter

* chore: improve performance of TData type in FieldApi

* chore: add back index and parent type

* chore: add Vue TSC dep on Vue example

* chore: fix lint and type test

* chore: update Vite stuff

* chore: add implicit dep for Vue and React examples

* chore: add type test pre-req

* chore: install deps from examples in PR CI

* chore: remove filter from more installation
2023-09-09 03:40:29 -07:00
Tanner Linsley
b5a768f182 release: v0.3.2 2023-09-09 07:27:24 +00:00
Tanner Linsley
826c58d5c2 release: v0.3.1 2023-09-09 06:44:30 +00:00
Corbin Crutchley
4790982c64 fix: migrate to use CI/CD system that router uses (#455) 2023-09-08 23:32:09 -07:00
Tanner Linsley
2842420a17 release: v0.3.0 2023-09-08 21:45:09 +00:00
Ray Liu
c2f9957046 feat(form-core): Change from touched error message and error message to error map and array of errors (#442)
* feature(FieldAPI): Change from touched error message and  error message to error map and array of errors

BREAKING CHANGE: The touched Error and error field has been removed will be replaced with touched errors array and errors map.

* feat: update documentation for updated fields

* chore: update Vue adapter as well

* fix: update getErrorMapKey to return onChange when change is the validation cause

* chore: remove console.log

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-09-08 11:14:54 -07:00
Corbin Crutchley
e3e60ccd41 fix: bundler errors in React and Vue adapters should now be resolved (#447)
* fix: bundler errors in React and Vue adapters should now be resolved

* chore: replace use-isomorphic-layout-effect with dep for RN support
2023-09-07 20:03:11 -07:00
Tanner Linsley
57c9f5fa7c release: v0.2.0 2023-09-08 00:56:08 +00:00
Corbin Crutchley
15d4af9570 chore: migrate to TSUp (#446)
* chore: migrate to TSUp

* chore: fix build
2023-09-07 17:54:16 -07:00
Tanner Linsley
d6da133a29 release: v0.1.3 2023-09-07 22:56:33 +00:00
Corbin Crutchley
d80bcf7a96 fix: Field default should now be set properly (#445)
* fix: fields should now set default value properly

* test: add test to validate fix
2023-09-07 15:55:17 -07:00
Tanner Linsley
6ffa574a66 release: v0.1.2 2023-09-07 02:35:32 +00:00
Corbin Crutchley
6f76feee6b fix: onSubmit should now behave as expected
* fix: memoize all non-function form props by default

* chore: migrate useStableFormOpts to useMemo

* fix: options passed to useField will not always cause a re-render

* chore: minor code cleanups

* test: add previously failing test to demonstrate fix

* chore: fix linting

* fix: running form.update repeatedly should not wipe form state

* test: add test to validate formapi update behavior

* test: add initial tests for useStableOptions

* chore: remove useStableOpts and useFormCallback
2023-09-06 19:33:52 -07:00
Tanner Linsley
9424ed94f8 release: v0.1.1 2023-09-04 00:01:18 +00:00
João Pedro Magalhães
3b7f6c16ba fix(form-core): remove 500ms fallback for asyncDebounceMs
* test(form-core): add async validation tests

* chore(form-core): remove old asyncDebounceMs api

* Revert "chore(form-core): remove old asyncDebounceMs api"

This reverts commit cd7dbc11ec3acdc529d77df10dc1f990f8a7bfcf.

* fix(form-core): make sure to fallback to asyncDebounceMs

* chore(form-core): remove 500ms fallback

---------

Co-authored-by: João Pedro Magalhães <joaopsilvamagalhaes@gmail.com>
2023-09-03 17:00:04 -07:00
Tanner Linsley
de22b6c38a release: v0.1.0 2023-09-03 23:50:16 +00:00
Corbin Crutchley
7980336d03 feat: remove getInputProps to support React Native 2023-09-03 16:48:51 -07:00
Corbin Crutchley
2a31bd8219 feat: remove getFormProps to support React Native 2023-09-03 16:48:51 -07:00
Tanner Linsley
48e7825686 release: v0.0.15 2023-09-02 14:47:13 +00:00