Commit Graph

80 Commits

Author SHA1 Message Date
Tanner Linsley
0c88ee82f1 release: v0.9.0 2023-11-05 14:29:49 +00:00
Tanner Linsley
90bd06ff56 release: v0.8.1 2023-11-05 14:02:10 +00: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
Tanner Linsley
fd19453188 release: v0.7.1 2023-11-03 19:35:09 +00: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
Julien Delort
a3a8d97fcc fix: NextJS should not throw an error anymore (#485)
* fix: remove use-isomorphic-layout-effect package for nextjs compatibility

* chore: remove DOM from tsconfig

* chore: fix formatting errors

---------

Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-10-30 00:46:12 -07:00
Tanner Linsley
bde212f23b release: v0.6.0 2023-10-30 07:20:15 +00: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
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
658c8f8c6c release: v0.3.4 2023-09-09 11:05:16 +00: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
Tanner Linsley
39d6c3c44b release: v0.2.1 2023-09-08 03:05:10 +00: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
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
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
Gabriel Tavares
6eca66ee0b refactor: change form options spread to object assign (#421)
Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2023-09-02 07:45:47 -07:00
Corbin Crutchley
4cb122551b Update store packages to match dedicated repo (#427)
* chore: update store dependency

* fix: form meta should never be undefined now

* chore: fix tests that only break on fast computers

Guess I don't need to upgrade my computer anytime soon 😅😅
2023-09-02 01:00:27 -07:00
João Pedro Magalhães
09edc1fc1a test(react-form): add on change validation tests (#425)
Co-authored-by: João Pedro Magalhães <joaopsilvamagalhaes@gmail.com>
2023-09-02 00:35:41 -07:00
Tanner Linsley
c6b246de9e release: v0.0.14 2023-08-31 22:29:44 +00:00
Tanner Linsley
dc8d88bb7c release: v0.0.13 2023-08-31 20:52:17 +00:00
Gabriel Tavares
d8ff96087d fix: cannot update a component/bad setState (#420)
* fix: cannot update a component/bad setState

* fix: add dep useEffect in useForm

* fix: add missing deps in useForm
2023-08-31 13:50:49 -07:00
Tanner Linsley
8a2f755417 release: v0.0.12 2023-08-29 08:29:14 +00:00
Corbin Crutchley
7ee5524693 fix: Initial FieldAPI tests, made FieldAPI typings much more strict (#405)
* fix: initial work at fixing the typescript typings for fieldapi to be more strict

* chore(form-core): change implementation of strict tdata

* fix(form-core): insertValue should now be typed properly

* test(form-core): validate array helpers

* fix(form-core): make types for getSubField more narrow

* chore: autoformat with prettier

* chore: fix tests, eslint

* chore: upgrade eslint deps

* chore: upgrade nx and concurrent

* chore: remove svelte from prettier plugins

* chore: upgrade TypeScript version to avoid a TS codegen bug

* chore: remove React 17 CI script temporarily

* chore: fix build and formatter
2023-08-28 08:33:44 -06:00