@rjsf/core 5.0.0-beta.15 → 5.0.0-beta.17

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.ts CHANGED
@@ -6,7 +6,7 @@ interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
6
6
  /** The JSON schema object for the form */
7
7
  schema: S;
8
8
  /** An implementation of the `ValidatorType` interface that is needed for form validation to work */
9
- validator: ValidatorType<T, S>;
9
+ validator: ValidatorType<T, S, F>;
10
10
  /** The optional children for the form, if provided, it will replace the default `SubmitButton` */
11
11
  children?: React.ReactNode;
12
12
  /** The uiSchema for the form */
@@ -96,7 +96,7 @@ interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
96
96
  /** The value of this prop will be passed to the `target` HTML attribute on the form */
97
97
  target?: string;
98
98
  /** Formerly the `validate` prop; Takes a function that specifies custom validation rules for the form */
99
- customValidate?: CustomValidator<T>;
99
+ customValidate?: CustomValidator<T, S, F>;
100
100
  /** This prop allows passing in custom errors that are augmented with the existing JSON Schema errors on the form; it
101
101
  * can be used to implement asynchronous validation
102
102
  */
@@ -127,7 +127,7 @@ interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
127
127
  /** A function can be passed to this prop in order to make modifications to the default errors resulting from JSON
128
128
  * Schema validation
129
129
  */
130
- transformErrors?: ErrorTransformer;
130
+ transformErrors?: ErrorTransformer<T, S, F>;
131
131
  /**
132
132
  * _internalFormWrapper is currently used by the semantic-ui theme to provide a custom wrapper around `<Form />`
133
133
  * that supports the proper rendering of those themes. To use this prop, one must pass a component that takes two
@@ -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>): ValidationData<T>;
225
+ validate(formData: T, 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
@@ -291,7 +291,7 @@ declare class Form<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends F
291
291
  /** The properties for the `withTheme` function, essentially a subset of properties from the `FormProps` that can be
292
292
  * overridden while creating a theme
293
293
  */
294
- declare type ThemeProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<FormProps<T, S, F>, "fields" | "templates" | "widgets" | "_internalFormWrapper"> & {
294
+ type ThemeProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<FormProps<T, S, F>, "fields" | "templates" | "widgets" | "_internalFormWrapper"> & {
295
295
  ref?: React.Ref<Form<T, S, F>>;
296
296
  };
297
297
  /** A Higher-Order component that creates a wrapper around a `Form` with the overrides from the `WithThemeProps` */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/core",
3
- "version": "5.0.0-beta.15",
3
+ "version": "5.0.0-beta.17",
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",
@@ -43,33 +43,33 @@
43
43
  "prop-types": "^15.7.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/cli": "^7.19.3",
47
- "@babel/core": "^7.19.6",
46
+ "@babel/cli": "^7.20.7",
47
+ "@babel/core": "^7.20.12",
48
48
  "@babel/plugin-proposal-class-properties": "^7.18.6",
49
- "@babel/plugin-proposal-optional-chaining": "^7.18.9",
49
+ "@babel/plugin-proposal-optional-chaining": "^7.20.7",
50
50
  "@babel/plugin-transform-object-assign": "^7.18.6",
51
- "@babel/plugin-transform-react-jsx": "^7.19.0",
52
- "@babel/preset-env": "^7.19.4",
51
+ "@babel/plugin-transform-react-jsx": "^7.20.7",
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.15",
56
- "@rjsf/validator-ajv6": "^5.0.0-beta.15",
57
- "@rjsf/validator-ajv8": "^5.0.0-beta.15",
58
- "@types/lodash": "^4.14.186",
55
+ "@rjsf/utils": "^5.0.0-beta.17",
56
+ "@rjsf/validator-ajv6": "^5.0.0-beta.17",
57
+ "@rjsf/validator-ajv8": "^5.0.0-beta.17",
58
+ "@types/lodash": "^4.14.191",
59
59
  "@types/react": "^17.0.39",
60
60
  "@types/react-dom": "^17.0.11",
61
- "ajv": "^8.11.0",
61
+ "ajv": "^8.12.0",
62
62
  "atob": "^2.1.2",
63
63
  "chai": "^3.3.0",
64
- "dts-cli": "^1.6.0",
65
- "eslint": "^8.26.0",
64
+ "dts-cli": "^1.6.3",
65
+ "eslint": "^8.31.0",
66
66
  "html": "^1.0.0",
67
67
  "jsdom": "^20.0.1",
68
- "mocha": "^10.1.0",
68
+ "mocha": "^10.2.0",
69
69
  "react": "^17.0.2",
70
70
  "react-dom": "^17.0.2",
71
71
  "react-portal": "^4.2.2",
72
- "rimraf": "^3.0.2",
72
+ "rimraf": "^4.0.4",
73
73
  "sinon": "^9.0.2"
74
74
  },
75
75
  "directories": {
@@ -93,5 +93,5 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "gitHead": "965c0e41f1ab1261bbc1f9a1e9f64fc526426087"
96
+ "gitHead": "b0163ffdb06df1dea51cda3141bf4ca1889f8e49"
97
97
  }