@acp-autoform/core 3.0.0 → 3.1.0
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/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +34 -34
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.0",
|
|
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
|
+
}
|