@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.
- package/dist/field/FieldPath.d.ts +18 -9
- package/dist/field/FieldPath.d.ts.map +1 -1
- package/dist/field/FieldPathBuilder.d.ts +2 -2
- package/dist/field/FieldPathBuilder.d.ts.map +1 -1
- package/dist/field/Reconcile.d.ts +2 -2
- package/dist/field/Reconcile.d.ts.map +1 -1
- package/dist/form/FormController.d.ts +51 -20
- package/dist/form/FormController.d.ts.map +1 -1
- package/dist/form/FormField.d.ts +15 -10
- package/dist/form/FormField.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +523 -476
- package/dist/index.js.map +1 -1
- package/dist/types/DeepHelpers.d.ts +11 -0
- package/dist/types/DeepHelpers.d.ts.map +1 -0
- package/dist/types/FormHelpers.d.ts +5 -0
- package/dist/types/FormHelpers.d.ts.map +1 -0
- package/dist/types/Suppliable.d.ts +3 -0
- package/dist/types/Suppliable.d.ts.map +1 -0
- package/dist/validation/CustomValidation.d.ts +1 -1
- package/package.json +13 -3
- package/src/field/FieldPath.spec.ts +204 -0
- package/src/field/FieldPath.ts +62 -59
- package/src/field/FieldPathBuilder.spec.ts +47 -0
- package/src/field/FieldPathBuilder.ts +15 -81
- package/src/field/Reconcile.ts +2 -2
- package/src/form/FormController.spec.ts +55 -0
- package/src/form/FormController.ts +151 -115
- package/src/form/FormField.ts +63 -30
- package/src/index.ts +2 -2
- package/src/types/DeepHelpers.ts +15 -0
- package/src/types/FormHelpers.ts +13 -0
- package/src/types/Suppliable.ts +7 -0
- package/src/validation/CustomValidation.ts +1 -1
- package/dist/form/NonullFormField.d.ts +0 -9
- package/dist/form/NonullFormField.d.ts.map +0 -1
- package/dist/types/DeepPartial.d.ts +0 -6
- package/dist/types/DeepPartial.d.ts.map +0 -1
- package/src/form/NonullFormField.ts +0 -15
- package/src/types/DeepPartial.ts +0 -7
- package/tsconfig.json +0 -8
- package/vite.config.ts +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
import { DeepPartial } from "../types/
|
|
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
|
-
>;
|
package/src/types/DeepPartial.ts
DELETED
package/tsconfig.json
DELETED
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
|
-
});
|