@acp-autoform/core 3.0.0 → 3.1.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 +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +34 -34
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AutoForm Core
|
|
2
2
|
|
|
3
|
-
This package provides the core functionality for AutoForm. You'll most likely use UI-library specific packages like `@acp-autoform/mui` instead of this package - unless you want to create your own renderer.
|
|
3
|
+
This package provides the core functionality for AutoForm. You'll most likely use UI-library specific packages like [shadcn](https://autoform-acp-docs.vercel.app/docs/react/getting-started#shadcnui), `@acp-autoform/mui` instead of this package - unless you want to create your own renderer.
|
|
4
4
|
|
|
5
5
|
The core is agnostic to both the schema and the UI library used to render the form.
|
|
6
6
|
|
|
@@ -10,4 +10,4 @@ The core is agnostic to both the schema and the UI library used to render the fo
|
|
|
10
10
|
npm install @acp-autoform/core
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
For more information on how to use this package, see the [AutoForm documentation](https://autoform.
|
|
13
|
+
For more information on how to use this package, see the [AutoForm documentation](https://autoform-acp-docs.vercel.app/docs/react/getting-started).
|
package/dist/index.d.mts
CHANGED
|
@@ -100,11 +100,11 @@ declare function parseSchema(schemaProvider: SchemaProvider): ParsedSchema;
|
|
|
100
100
|
declare function validateSchema(schemaProvider: SchemaProvider, values: any): SchemaValidation;
|
|
101
101
|
declare function getDefaultValues(schemaProvider: SchemaProvider): Record<string, any>;
|
|
102
102
|
/**
|
|
103
|
-
* Recursively remove empty values from an object (null, undefined, ''
|
|
103
|
+
* Recursively remove empty values from an object (null, undefined, '')
|
|
104
104
|
* Used in AutoForm before calling the resolver to prevent empty values from being validated.
|
|
105
105
|
* This is necessary because zod's optional() allows undefined, but form fields default to
|
|
106
|
-
* empty strings
|
|
107
|
-
*
|
|
106
|
+
* empty strings even when untouched. These defaults makes the optional() unusable.
|
|
107
|
+
* and cause validation issues in react-hook-form.
|
|
108
108
|
*/
|
|
109
109
|
declare function removeEmptyValues<T extends Record<string, any>>(values: T): Partial<T>;
|
|
110
110
|
declare function replaceEmptyValue<T extends Record<string, any>>(values: T): T;
|
package/dist/index.d.ts
CHANGED
|
@@ -100,11 +100,11 @@ declare function parseSchema(schemaProvider: SchemaProvider): ParsedSchema;
|
|
|
100
100
|
declare function validateSchema(schemaProvider: SchemaProvider, values: any): SchemaValidation;
|
|
101
101
|
declare function getDefaultValues(schemaProvider: SchemaProvider): Record<string, any>;
|
|
102
102
|
/**
|
|
103
|
-
* Recursively remove empty values from an object (null, undefined, ''
|
|
103
|
+
* Recursively remove empty values from an object (null, undefined, '')
|
|
104
104
|
* Used in AutoForm before calling the resolver to prevent empty values from being validated.
|
|
105
105
|
* This is necessary because zod's optional() allows undefined, but form fields default to
|
|
106
|
-
* empty strings
|
|
107
|
-
*
|
|
106
|
+
* empty strings even when untouched. These defaults makes the optional() unusable.
|
|
107
|
+
* and cause validation issues in react-hook-form.
|
|
108
108
|
*/
|
|
109
109
|
declare function removeEmptyValues<T extends Record<string, any>>(values: T): Partial<T>;
|
|
110
110
|
declare function replaceEmptyValue<T extends Record<string, any>>(values: T): T;
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@acp-autoform/core",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"main": "./dist/index.js",
|
|
5
|
-
"module": "./dist/index.mjs",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/adityacodepublic/autoform.git"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"lint": "eslint . --max-warnings 0",
|
|
13
|
-
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
14
|
-
"dev": "tsup src/index.ts --format cjs,esm --dts --watch"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@acp-autoform/eslint-config": "*",
|
|
18
|
-
"@acp-autoform/typescript-config": "*",
|
|
19
|
-
"@turbo/gen": "^1.12.4",
|
|
20
|
-
"@types/eslint": "^8.56.5",
|
|
21
|
-
"@types/node": "^20.11.24",
|
|
22
|
-
"@types/react": "^19.1.8",
|
|
23
|
-
"@types/react-dom": "^19.1.6",
|
|
24
|
-
"eslint": "^8.57.0",
|
|
25
|
-
"tsup": "^8.3.0",
|
|
26
|
-
"typescript": "^5.3.3"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist"
|
|
30
|
-
],
|
|
31
|
-
"publishConfig": {
|
|
32
|
-
"access": "public"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@acp-autoform/core",
|
|
3
|
+
"version": "3.1.1",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/adityacodepublic/autoform.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "eslint . --max-warnings 0",
|
|
13
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
14
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@acp-autoform/eslint-config": "*",
|
|
18
|
+
"@acp-autoform/typescript-config": "*",
|
|
19
|
+
"@turbo/gen": "^1.12.4",
|
|
20
|
+
"@types/eslint": "^8.56.5",
|
|
21
|
+
"@types/node": "^20.11.24",
|
|
22
|
+
"@types/react": "^19.1.8",
|
|
23
|
+
"@types/react-dom": "^19.1.6",
|
|
24
|
+
"eslint": "^8.57.0",
|
|
25
|
+
"tsup": "^8.3.0",
|
|
26
|
+
"typescript": "^5.3.3"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
}
|
|
34
|
+
}
|