@rjsf/utils 5.19.2 → 5.19.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/dist/utils.esm.js CHANGED
@@ -2511,11 +2511,11 @@ var TranslatableString = /* @__PURE__ */ ((TranslatableString2) => {
2511
2511
  TranslatableString2["OptionPrefix"] = "Option %1";
2512
2512
  TranslatableString2["TitleOptionPrefix"] = "%1 option %2";
2513
2513
  TranslatableString2["KeyLabel"] = "%1 Key";
2514
- TranslatableString2["InvalidObjectField"] = 'Invalid "%1" object field configuration: <em>%2</em>.';
2514
+ TranslatableString2["InvalidObjectField"] = 'Invalid "%1" object field configuration: _%2_.';
2515
2515
  TranslatableString2["UnsupportedField"] = "Unsupported field schema.";
2516
- TranslatableString2["UnsupportedFieldWithId"] = "Unsupported field schema for field <code>%1</code>.";
2517
- TranslatableString2["UnsupportedFieldWithReason"] = "Unsupported field schema: <em>%1</em>.";
2518
- TranslatableString2["UnsupportedFieldWithIdAndReason"] = "Unsupported field schema for field <code>%1</code>: <em>%2</em>.";
2516
+ TranslatableString2["UnsupportedFieldWithId"] = "Unsupported field schema for field `%1`.";
2517
+ TranslatableString2["UnsupportedFieldWithReason"] = "Unsupported field schema: _%1_.";
2518
+ TranslatableString2["UnsupportedFieldWithIdAndReason"] = "Unsupported field schema for field `%1`: _%2_.";
2519
2519
  TranslatableString2["FilesInfo"] = "**%1** (%2, %3 bytes)";
2520
2520
  return TranslatableString2;
2521
2521
  })(TranslatableString || {});
@@ -2539,6 +2539,11 @@ var ParserValidator = class {
2539
2539
  this.rootSchema = rootSchema;
2540
2540
  this.addSchema(rootSchema, hashForSchema(rootSchema));
2541
2541
  }
2542
+ /** Resets the internal AJV validator to clear schemas from it. Can be helpful for resetting the validator for tests.
2543
+ */
2544
+ reset() {
2545
+ this.schemaMap = {};
2546
+ }
2542
2547
  /** Adds the given `schema` to the `schemaMap` keyed by the `hash` or `ID_KEY` if present on the `schema`. If the
2543
2548
  * schema does not have an `ID_KEY`, then the `hash` will be added as the `ID_KEY` to allow the schema to be
2544
2549
  * associated with it's `hash` for future use (by a schema compiler).