@rjsf/core 5.0.0-beta.17 → 5.0.0-beta.18
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/core.cjs.development.js +52 -103
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +51 -102
- package/dist/core.esm.js.map +1 -1
- package/dist/core.umd.development.js +54 -105
- package/dist/core.umd.development.js.map +1 -1
- package/dist/core.umd.production.min.js +1 -1
- package/dist/core.umd.production.min.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -158,7 +158,7 @@ interface FormState<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
|
|
|
158
158
|
/** The schemaUtils implementation used by the `Form`, created from the `validator` and the `schema` */
|
|
159
159
|
schemaUtils: SchemaUtilsType<T, S, F>;
|
|
160
160
|
/** The current data for the form, computed from the `formData` prop and the changes made by the user */
|
|
161
|
-
formData
|
|
161
|
+
formData?: T;
|
|
162
162
|
/** Flag indicating whether the form is in edit mode, true when `formData` is passed to the form, otherwise false */
|
|
163
163
|
edit: boolean;
|
|
164
164
|
/** The current list of errors for the form, includes `extraErrors` */
|
|
@@ -222,7 +222,7 @@ declare class Form<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends F
|
|
|
222
222
|
* @param schema - The schema used to validate against
|
|
223
223
|
* @param altSchemaUtils - The alternate schemaUtils to use for validation
|
|
224
224
|
*/
|
|
225
|
-
validate(formData: T, schema?: S, altSchemaUtils?: SchemaUtilsType<T, S, F>): ValidationData<T>;
|
|
225
|
+
validate(formData: T | undefined, schema?: S, altSchemaUtils?: SchemaUtilsType<T, S, F>): ValidationData<T>;
|
|
226
226
|
/** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */
|
|
227
227
|
renderErrors(registry: Registry<T, S, F>): JSX.Element | null;
|
|
228
228
|
/** Returns the `formData` with only the elements specified in the `fields` list
|
|
@@ -230,13 +230,13 @@ declare class Form<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends F
|
|
|
230
230
|
* @param formData - The data for the `Form`
|
|
231
231
|
* @param fields - The fields to keep while filtering
|
|
232
232
|
*/
|
|
233
|
-
getUsedFormData: (formData: T, fields: string[][]) => T;
|
|
233
|
+
getUsedFormData: (formData: T | undefined, fields: string[][]) => T | undefined;
|
|
234
234
|
/** Returns the list of field names from inspecting the `pathSchema` as well as using the `formData`
|
|
235
235
|
*
|
|
236
236
|
* @param pathSchema - The `PathSchema` object for the form
|
|
237
|
-
* @param formData - The form data to use while checking for empty objects/arrays
|
|
237
|
+
* @param [formData] - The form data to use while checking for empty objects/arrays
|
|
238
238
|
*/
|
|
239
|
-
getFieldNames: (pathSchema: PathSchema<T>, formData
|
|
239
|
+
getFieldNames: (pathSchema: PathSchema<T>, formData?: T) => string[][];
|
|
240
240
|
/** Function to handle changes made to a field in the `Form`. This handler receives an entirely new copy of the
|
|
241
241
|
* `formData` along with a new `ErrorSchema`. It will first update the `formData` with any missing default fields and
|
|
242
242
|
* then, if `omitExtraData` and `liveOmit` are turned on, the `formData` will be filterer to remove any extra data not
|
|
@@ -248,7 +248,7 @@ declare class Form<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends F
|
|
|
248
248
|
* @param newErrorSchema - The new `ErrorSchema` based on the field change
|
|
249
249
|
* @param id - The id of the field that caused the change
|
|
250
250
|
*/
|
|
251
|
-
onChange: (formData: T, newErrorSchema?: ErrorSchema<T>, id?: string) => void;
|
|
251
|
+
onChange: (formData: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => void;
|
|
252
252
|
/** Callback function to handle when a field on the form is blurred. Calls the `onBlur` callback for the `Form` if it
|
|
253
253
|
* was provided.
|
|
254
254
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rjsf/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.18",
|
|
4
4
|
"description": "A simple React component capable of building HTML forms out of a JSON schema.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && dts build --rollupTypes --format cjs,esm,umd",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@babel/preset-env": "^7.20.2",
|
|
53
53
|
"@babel/preset-react": "^7.18.6",
|
|
54
54
|
"@babel/register": "^7.18.9",
|
|
55
|
-
"@rjsf/utils": "^5.0.0-beta.
|
|
56
|
-
"@rjsf/validator-ajv6": "^5.0.0-beta.
|
|
57
|
-
"@rjsf/validator-ajv8": "^5.0.0-beta.
|
|
55
|
+
"@rjsf/utils": "^5.0.0-beta.18",
|
|
56
|
+
"@rjsf/validator-ajv6": "^5.0.0-beta.18",
|
|
57
|
+
"@rjsf/validator-ajv8": "^5.0.0-beta.18",
|
|
58
58
|
"@types/lodash": "^4.14.191",
|
|
59
59
|
"@types/react": "^17.0.39",
|
|
60
60
|
"@types/react-dom": "^17.0.11",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "93bb555d94ce60820b9e473733a699befcee9dc1"
|
|
97
97
|
}
|