@rjsf/core 5.10.0 → 5.11.2

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
@@ -98,9 +98,12 @@ interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
98
98
  /** Formerly the `validate` prop; Takes a function that specifies custom validation rules for the form */
99
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
- * can be used to implement asynchronous validation
101
+ * can be used to implement asynchronous validation. By default, these are non-blocking errors, meaning that you can
102
+ * still submit the form when these are the only errors displayed to the user.
102
103
  */
103
104
  extraErrors?: ErrorSchema<T>;
105
+ /** If set to true, causes the `extraErrors` to become blocking when the form is submitted */
106
+ extraErrorsBlockSubmit?: boolean;
104
107
  /** If set to true, turns off HTML5 validation on the form; Set to `false` by default */
105
108
  noHtml5Validate?: boolean;
106
109
  /** If set to true, turns off all validation. Set to `false` by default
@@ -290,7 +293,7 @@ declare class Form<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends F
290
293
  /** Callback function to handle when the form is submitted. First, it prevents the default event behavior. Nothing
291
294
  * happens if the target and currentTarget of the event are not the same. It will omit any extra data in the
292
295
  * `formData` in the state if `omitExtraData` is true. It will validate the resulting `formData`, reporting errors
293
- * via the `onError()` callback unless validation is disabled. Finally it will add in any `extraErrors` and then call
296
+ * via the `onError()` callback unless validation is disabled. Finally, it will add in any `extraErrors` and then call
294
297
  * back the `onSubmit` callback if it was provided.
295
298
  *
296
299
  * @param event - The submit HTML form event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/core",
3
- "version": "5.10.0",
3
+ "version": "5.11.2",
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",
@@ -9,12 +9,11 @@
9
9
  "lint": "eslint src test",
10
10
  "precommit": "lint-staged",
11
11
  "publish-to-npm": "npm run build && npm publish",
12
- "test": "dts test",
13
- "test:debug": "node --inspect-brk node_modules/.bin/dts test",
14
- "test:update": "dts test --u",
15
- "test:watch": "dts test --watch",
16
- "test-coverage": "dts test --coverage",
17
- "bump-packages": "npm update --save --lockfile-version 2"
12
+ "test": "jest",
13
+ "test:debug": "node --inspect-brk node_modules/.bin/jest",
14
+ "test:update": "jest --u",
15
+ "test:watch": "jest --watch",
16
+ "test-coverage": "jest --coverage"
18
17
  },
19
18
  "lint-staged": {
20
19
  "{src,test,testSnap}/**/*.[jt]s?(x)": [
@@ -45,28 +44,28 @@
45
44
  "prop-types": "^15.8.1"
46
45
  },
47
46
  "devDependencies": {
48
- "@babel/cli": "^7.22.9",
49
47
  "@babel/core": "^7.22.9",
50
48
  "@babel/plugin-proposal-class-properties": "^7.18.6",
51
49
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
52
- "@babel/plugin-transform-object-assign": "^7.22.5",
53
- "@babel/plugin-transform-react-jsx": "^7.22.5",
54
50
  "@babel/preset-env": "^7.22.9",
55
51
  "@babel/preset-react": "^7.22.5",
56
- "@babel/register": "^7.22.5",
57
- "@rjsf/utils": "^5.10.0",
58
- "@rjsf/validator-ajv6": "^5.10.0",
59
- "@rjsf/validator-ajv8": "^5.10.0",
52
+ "@babel/preset-typescript": "^7.22.5",
53
+ "@rjsf/utils": "^5.11.2",
54
+ "@rjsf/validator-ajv6": "^5.11.2",
55
+ "@rjsf/validator-ajv8": "^5.11.2",
60
56
  "@types/lodash": "^4.14.195",
61
57
  "@types/react": "^17.0.62",
62
58
  "@types/react-dom": "^17.0.20",
63
59
  "@types/react-test-renderer": "^17.0.2",
64
60
  "ajv": "^8.12.0",
65
61
  "atob": "^2.1.2",
62
+ "babel-jest": "^29.6.1",
66
63
  "chai": "^3.5.0",
67
64
  "dts-cli": "^1.6.3",
68
65
  "eslint": "^8.44.0",
69
66
  "html": "^1.0.0",
67
+ "jest": "^29.6.1",
68
+ "jest-environment-jsdom": "^29.6.1",
70
69
  "jsdom": "^20.0.3",
71
70
  "mocha": "^10.2.0",
72
71
  "react": "^17.0.2",
@@ -97,5 +96,5 @@
97
96
  "publishConfig": {
98
97
  "access": "public"
99
98
  },
100
- "gitHead": "d05138f4dc678e0f6f85e13780dd3e17074791c8"
99
+ "gitHead": "2fafced84e18aa2cd487715d11d2730cd23333f3"
101
100
  }