@coherent.js/forms 1.0.0-rc.2 → 1.0.0-rc.4
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/package.json +7 -4
- package/types/index.d.ts +0 -23
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coherent.js/forms",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "SSR + Hydration form system for Coherent.js applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./types/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
9
12
|
"./form-builder": "./dist/form-builder.js",
|
|
10
13
|
"./hydration": "./dist/form-hydration.js",
|
|
11
14
|
"./validation": "./dist/validation.js",
|
|
@@ -20,8 +23,8 @@
|
|
|
20
23
|
"author": "Coherent.js Team",
|
|
21
24
|
"license": "MIT",
|
|
22
25
|
"peerDependencies": {
|
|
23
|
-
"@coherent.js/core": "1.0.0-rc.
|
|
24
|
-
"@coherent.js/state": "1.0.0-rc.
|
|
26
|
+
"@coherent.js/core": "1.0.0-rc.4",
|
|
27
|
+
"@coherent.js/state": "1.0.0-rc.4"
|
|
25
28
|
},
|
|
26
29
|
"repository": {
|
|
27
30
|
"type": "git",
|
package/types/index.d.ts
CHANGED
|
@@ -198,11 +198,6 @@ export function createFormBuilder<T extends Record<string, unknown> = Record<str
|
|
|
198
198
|
*/
|
|
199
199
|
export function buildForm(config: FormConfig): CoherentNode;
|
|
200
200
|
|
|
201
|
-
/**
|
|
202
|
-
* Render a single form field
|
|
203
|
-
*/
|
|
204
|
-
export function renderField<T = unknown>(field: FormField<T>): CoherentNode;
|
|
205
|
-
|
|
206
201
|
/**
|
|
207
202
|
* Validate a single field value
|
|
208
203
|
* @returns Error message or null if valid
|
|
@@ -387,24 +382,6 @@ export const validators: {
|
|
|
387
382
|
// Form Utilities
|
|
388
383
|
// ============================================================================
|
|
389
384
|
|
|
390
|
-
/**
|
|
391
|
-
* Parse FormData to typed object
|
|
392
|
-
*/
|
|
393
|
-
export function parseFormData<T extends Record<string, unknown>>(formData: FormData): T;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Serialize object to FormData
|
|
397
|
-
*/
|
|
398
|
-
export function toFormData(data: Record<string, unknown>): FormData;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Create a form group (fieldset)
|
|
402
|
-
*/
|
|
403
|
-
export function createFieldGroup(
|
|
404
|
-
legend: string,
|
|
405
|
-
fields: FormField[]
|
|
406
|
-
): CoherentNode;
|
|
407
|
-
|
|
408
385
|
// 1.0: removed deprecated SPA APIs — createForm, formValidators, enhancedForm,
|
|
409
386
|
// createAsyncValidator, combineValidators, conditionalValidator.
|
|
410
387
|
// See docs/migration/1.0#removed-forms-spa-apis.
|