@rjsf/utils
Advanced tools
Comparing version 5.19.3 to 5.19.4
@@ -56,14 +56,21 @@ /** An enumeration of all the translatable strings used by `@rjsf/core` and its themes. The value of each of the | ||
KeyLabel = "%1 Key", | ||
/** Invalid object field configuration as provided by the ObjectField */ | ||
InvalidObjectField = "Invalid \"%1\" object field configuration: <em>%2</em>.", | ||
/** Invalid object field configuration as provided by the ObjectField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
InvalidObjectField = "Invalid \"%1\" object field configuration: _%2_.", | ||
/** Unsupported field schema, used by UnsupportedField */ | ||
UnsupportedField = "Unsupported field schema.", | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField */ | ||
UnsupportedFieldWithId = "Unsupported field schema for field <code>%1</code>.", | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField */ | ||
UnsupportedFieldWithReason = "Unsupported field schema: <em>%1</em>.", | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithId = "Unsupported field schema for field `%1`.", | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithReason = "Unsupported field schema: _%1_.", | ||
/** Unsupported field schema, where %1 and %2 will be replaced by the idSchema.$id and reason strings, respectively, | ||
* as provided by UnsupportedField | ||
* as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithIdAndReason = "Unsupported field schema for field <code>%1</code>: <em>%2</em>.", | ||
UnsupportedFieldWithIdAndReason = "Unsupported field schema for field `%1`: _%2_.", | ||
/** File name, type and size info, where %1, %2 and %3 will be replaced by the file name, file type and file size as | ||
@@ -70,0 +77,0 @@ * provided by FileWidget |
@@ -59,14 +59,21 @@ /** An enumeration of all the translatable strings used by `@rjsf/core` and its themes. The value of each of the | ||
// Strings with replaceable parameters AND/OR that support markdown and html | ||
/** Invalid object field configuration as provided by the ObjectField */ | ||
TranslatableString["InvalidObjectField"] = "Invalid \"%1\" object field configuration: <em>%2</em>."; | ||
/** Invalid object field configuration as provided by the ObjectField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
TranslatableString["InvalidObjectField"] = "Invalid \"%1\" object field configuration: _%2_."; | ||
/** Unsupported field schema, used by UnsupportedField */ | ||
TranslatableString["UnsupportedField"] = "Unsupported field schema."; | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField */ | ||
TranslatableString["UnsupportedFieldWithId"] = "Unsupported field schema for field <code>%1</code>."; | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField */ | ||
TranslatableString["UnsupportedFieldWithReason"] = "Unsupported field schema: <em>%1</em>."; | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
TranslatableString["UnsupportedFieldWithId"] = "Unsupported field schema for field `%1`."; | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
TranslatableString["UnsupportedFieldWithReason"] = "Unsupported field schema: _%1_."; | ||
/** Unsupported field schema, where %1 and %2 will be replaced by the idSchema.$id and reason strings, respectively, | ||
* as provided by UnsupportedField | ||
* as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
TranslatableString["UnsupportedFieldWithIdAndReason"] = "Unsupported field schema for field <code>%1</code>: <em>%2</em>."; | ||
TranslatableString["UnsupportedFieldWithIdAndReason"] = "Unsupported field schema for field `%1`: _%2_."; | ||
/** File name, type and size info, where %1, %2 and %3 will be replaced by the file name, file type and file size as | ||
@@ -73,0 +80,0 @@ * provided by FileWidget |
@@ -25,2 +25,5 @@ import { CustomValidator, ErrorSchema, ErrorTransformer, FormContextType, RJSFSchema, RJSFValidationError, StrictRJSFSchema, UiSchema, ValidationData, ValidatorType } from '../types'; | ||
constructor(rootSchema: S); | ||
/** Resets the internal AJV validator to clear schemas from it. Can be helpful for resetting the validator for tests. | ||
*/ | ||
reset(): void; | ||
/** Adds the given `schema` to the `schemaMap` keyed by the `hash` or `ID_KEY` if present on the `schema`. If the | ||
@@ -27,0 +30,0 @@ * schema does not have an `ID_KEY`, then the `hash` will be added as the `ID_KEY` to allow the schema to be |
@@ -24,2 +24,7 @@ import get from 'lodash/get'; | ||
} | ||
/** Resets the internal AJV validator to clear schemas from it. Can be helpful for resetting the validator for tests. | ||
*/ | ||
reset() { | ||
this.schemaMap = {}; | ||
} | ||
/** Adds the given `schema` to the `schemaMap` keyed by the `hash` or `ID_KEY` if present on the `schema`. If the | ||
@@ -26,0 +31,0 @@ * schema does not have an `ID_KEY`, then the `hash` will be added as the `ID_KEY` to allow the schema to be |
@@ -853,2 +853,6 @@ import type { ButtonHTMLAttributes, ChangeEvent, ComponentType, HTMLAttributes, ReactElement, ReactNode, StyleHTMLAttributes } from 'react'; | ||
}; | ||
/** An optional function that can be used to reset validator implementation. Useful for clear schemas in the AJV | ||
* instance for tests. | ||
*/ | ||
reset?: () => void; | ||
} | ||
@@ -855,0 +859,0 @@ /** The `SchemaUtilsType` interface provides a wrapper around the publicly exported APIs in the `@rjsf/utils/schema` |
{ | ||
"name": "@rjsf/utils", | ||
"version": "5.19.3", | ||
"version": "5.19.4", | ||
"main": "dist/index.js", | ||
@@ -88,3 +88,3 @@ "module": "lib/index.js", | ||
"license": "Apache-2.0", | ||
"gitHead": "3d0a309c23e6f6da116b350faead174dade7ca40" | ||
"gitHead": "e2c3b063b0d1186fe3a8ced0e9effe29138e4440" | ||
} |
@@ -58,14 +58,21 @@ /** An enumeration of all the translatable strings used by `@rjsf/core` and its themes. The value of each of the | ||
// Strings with replaceable parameters AND/OR that support markdown and html | ||
/** Invalid object field configuration as provided by the ObjectField */ | ||
InvalidObjectField = 'Invalid "%1" object field configuration: <em>%2</em>.', | ||
/** Invalid object field configuration as provided by the ObjectField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
InvalidObjectField = 'Invalid "%1" object field configuration: _%2_.', | ||
/** Unsupported field schema, used by UnsupportedField */ | ||
UnsupportedField = 'Unsupported field schema.', | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField */ | ||
UnsupportedFieldWithId = 'Unsupported field schema for field <code>%1</code>.', | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField */ | ||
UnsupportedFieldWithReason = 'Unsupported field schema: <em>%1</em>.', | ||
/** Unsupported field schema, where %1 will be replaced by the idSchema.$id as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithId = 'Unsupported field schema for field `%1`.', | ||
/** Unsupported field schema, where %1 will be replaced by the reason string as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithReason = 'Unsupported field schema: _%1_.', | ||
/** Unsupported field schema, where %1 and %2 will be replaced by the idSchema.$id and reason strings, respectively, | ||
* as provided by UnsupportedField | ||
* as provided by UnsupportedField. | ||
* NOTE: Use markdown notation rather than html tags. | ||
*/ | ||
UnsupportedFieldWithIdAndReason = 'Unsupported field schema for field <code>%1</code>: <em>%2</em>.', | ||
UnsupportedFieldWithIdAndReason = 'Unsupported field schema for field `%1`: _%2_.', | ||
/** File name, type and size info, where %1, %2 and %3 will be replaced by the file name, file type and file size as | ||
@@ -72,0 +79,0 @@ * provided by FileWidget |
@@ -51,2 +51,8 @@ import get from 'lodash/get'; | ||
/** Resets the internal AJV validator to clear schemas from it. Can be helpful for resetting the validator for tests. | ||
*/ | ||
reset() { | ||
this.schemaMap = {}; | ||
} | ||
/** Adds the given `schema` to the `schemaMap` keyed by the `hash` or `ID_KEY` if present on the `schema`. If the | ||
@@ -53,0 +59,0 @@ * schema does not have an `ID_KEY`, then the `hash` will be added as the `ID_KEY` to allow the schema to be |
@@ -1007,2 +1007,6 @@ import type { | ||
rawValidation<Result = any>(schema: S, formData?: T): { errors?: Result[]; validationError?: Error }; | ||
/** An optional function that can be used to reset validator implementation. Useful for clear schemas in the AJV | ||
* instance for tests. | ||
*/ | ||
reset?: () => void; | ||
} | ||
@@ -1009,0 +1013,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1639457
19680