@goodie-forms/core 1.2.5-alpha → 1.2.6-alpha

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.
Files changed (43) hide show
  1. package/dist/field/FieldPath.d.ts +18 -9
  2. package/dist/field/FieldPath.d.ts.map +1 -1
  3. package/dist/field/FieldPathBuilder.d.ts +2 -2
  4. package/dist/field/FieldPathBuilder.d.ts.map +1 -1
  5. package/dist/field/Reconcile.d.ts +2 -2
  6. package/dist/field/Reconcile.d.ts.map +1 -1
  7. package/dist/form/FormController.d.ts +51 -20
  8. package/dist/form/FormController.d.ts.map +1 -1
  9. package/dist/form/FormField.d.ts +15 -10
  10. package/dist/form/FormField.d.ts.map +1 -1
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +523 -476
  14. package/dist/index.js.map +1 -1
  15. package/dist/types/DeepHelpers.d.ts +11 -0
  16. package/dist/types/DeepHelpers.d.ts.map +1 -0
  17. package/dist/types/FormHelpers.d.ts +5 -0
  18. package/dist/types/FormHelpers.d.ts.map +1 -0
  19. package/dist/types/Suppliable.d.ts +3 -0
  20. package/dist/types/Suppliable.d.ts.map +1 -0
  21. package/dist/validation/CustomValidation.d.ts +1 -1
  22. package/package.json +13 -3
  23. package/src/field/FieldPath.spec.ts +204 -0
  24. package/src/field/FieldPath.ts +62 -59
  25. package/src/field/FieldPathBuilder.spec.ts +47 -0
  26. package/src/field/FieldPathBuilder.ts +15 -81
  27. package/src/field/Reconcile.ts +2 -2
  28. package/src/form/FormController.spec.ts +55 -0
  29. package/src/form/FormController.ts +151 -115
  30. package/src/form/FormField.ts +63 -30
  31. package/src/index.ts +2 -2
  32. package/src/types/DeepHelpers.ts +15 -0
  33. package/src/types/FormHelpers.ts +13 -0
  34. package/src/types/Suppliable.ts +7 -0
  35. package/src/validation/CustomValidation.ts +1 -1
  36. package/dist/form/NonullFormField.d.ts +0 -9
  37. package/dist/form/NonullFormField.d.ts.map +0 -1
  38. package/dist/types/DeepPartial.d.ts +0 -6
  39. package/dist/types/DeepPartial.d.ts.map +0 -1
  40. package/src/form/NonullFormField.ts +0 -15
  41. package/src/types/DeepPartial.ts +0 -7
  42. package/tsconfig.json +0 -8
  43. package/vite.config.ts +0 -18
@@ -1,5 +1,5 @@
1
1
  import { StandardSchemaV1 } from "@standard-schema/spec";
2
- import { DeepPartial } from "../types/DeepPartial";
2
+ import { DeepPartial } from "../types/DeepHelpers";
3
3
  import { FieldPath } from "../field/FieldPath";
4
4
 
5
5
  export type CustomValidationIssue<TOutput extends object> = {
@@ -1,9 +0,0 @@
1
- import { FormField } from './FormField';
2
- import { Mixin } from '../types/Mixin';
3
- export type NonnullFormField<TOutput extends object, TValue> = Mixin<FormField<TOutput, TValue>, {
4
- modifyValue: (modifier: (currentValue: TValue) => TValue | void, opts?: {
5
- shouldTouch?: boolean;
6
- shouldMarkDirty?: boolean;
7
- }) => void;
8
- }>;
9
- //# sourceMappingURL=NonullFormField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NonullFormField.d.ts","sourceRoot":"","sources":["../../src/form/NonullFormField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,MAAM,EAAE,MAAM,IAAI,KAAK,CAClE,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,EAC1B;IACE,WAAW,EAAE,CACX,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,EACjD,IAAI,CAAC,EAAE;QACL,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,KACE,IAAI,CAAC;CACX,CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- export type DeepPartial<T> = {
2
- [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: T[K];
3
- } & {
4
- [K in keyof T as T[K] extends (...args: any[]) => any ? never : K]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
5
- };
6
- //# sourceMappingURL=DeepPartial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeepPartial.d.ts","sourceRoot":"","sources":["../../src/types/DeepPartial.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;CACzE,GAAG;KACD,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GACjD,KAAK,GACL,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACxD,CAAC"}
@@ -1,15 +0,0 @@
1
- import { FormField } from "./FormField";
2
- import { Mixin } from "../types/Mixin";
3
-
4
- export type NonnullFormField<TOutput extends object, TValue> = Mixin<
5
- FormField<TOutput, TValue>,
6
- {
7
- modifyValue: (
8
- modifier: (currentValue: TValue) => TValue | void,
9
- opts?: {
10
- shouldTouch?: boolean;
11
- shouldMarkDirty?: boolean;
12
- },
13
- ) => void;
14
- }
15
- >;
@@ -1,7 +0,0 @@
1
- export type DeepPartial<T> = {
2
- [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: T[K];
3
- } & {
4
- [K in keyof T as T[K] extends (...args: any[]) => any
5
- ? never
6
- : K]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
7
- };
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "rootDir": "."
6
- },
7
- "include": ["src"]
8
- }
package/vite.config.ts DELETED
@@ -1,18 +0,0 @@
1
- import { defineConfig } from "vite";
2
-
3
- import dts from "vite-plugin-dts";
4
-
5
- export default defineConfig({
6
- plugins: [dts({ entryRoot: "src" })],
7
- build: {
8
- lib: {
9
- entry: "src/index.ts",
10
- formats: ["es"],
11
- fileName: "index",
12
- },
13
- rollupOptions: {
14
- external: [],
15
- },
16
- sourcemap: true,
17
- },
18
- });