@rjsf/utils 6.0.0-beta.14 → 6.0.0-beta.15

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.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/isPlainObject'), require('lodash/isEqualWith'), require('lodash/get'), require('lodash/has'), require('lodash/isEqual'), require('lodash/set'), require('lodash/times'), require('lodash/transform'), require('lodash/merge'), require('lodash/flattenDeep'), require('lodash/uniq'), require('json-schema-merge-allof'), require('jsonpointer'), require('lodash/omit'), require('lodash/isObject'), require('lodash/isEmpty'), require('fast-uri'), require('lodash/isString'), require('lodash/union'), require('lodash/isNumber'), require('lodash/reduce'), require('lodash/isNil'), require('lodash/cloneDeep'), require('lodash/setWith'), require('nanoid'), require('react'), require('react-is'), require('react/jsx-runtime'), require('lodash/toPath'), require('lodash/keys'), require('lodash/pickBy'), require('lodash/difference'), require('lodash/forEach')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash/isPlainObject', 'lodash/isEqualWith', 'lodash/get', 'lodash/has', 'lodash/isEqual', 'lodash/set', 'lodash/times', 'lodash/transform', 'lodash/merge', 'lodash/flattenDeep', 'lodash/uniq', 'json-schema-merge-allof', 'jsonpointer', 'lodash/omit', 'lodash/isObject', 'lodash/isEmpty', 'fast-uri', 'lodash/isString', 'lodash/union', 'lodash/isNumber', 'lodash/reduce', 'lodash/isNil', 'lodash/cloneDeep', 'lodash/setWith', 'nanoid', 'react', 'react-is', 'react/jsx-runtime', 'lodash/toPath', 'lodash/keys', 'lodash/pickBy', 'lodash/difference', 'lodash/forEach'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/utils"] = {}, global.isPlainObject4, global.isEqualWith, global.get13, global.has5, global.isEqual, global.set, global.times, global.transform, global.merge, global.flattenDeep, global.uniq, global.mergeAllOf, global.jsonpointer, global.omit, global.isObject2, global.isEmpty4, global.UriResolver, global.isString, global.union, global.isNumber, global.reduce, global.isNil, global.cloneDeep, global.setWith, global.nanoid, global.react, global.ReactIs, global.jsxRuntime, global.toPath, global.keys, global.pickBy, global.difference, global.forEach));
5
- })(this, (function (exports, isPlainObject4, isEqualWith, get13, has5, isEqual, set, times, transform, merge, flattenDeep, uniq, mergeAllOf, jsonpointer, omit, isObject2, isEmpty4, UriResolver, isString, union, isNumber, reduce, isNil, cloneDeep, setWith, nanoid, react, ReactIs, jsxRuntime, toPath, keys, pickBy, difference, forEach) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/isPlainObject'), require('lodash/isEqualWith'), require('lodash/get'), require('lodash/has'), require('lodash/isEqual'), require('lodash/set'), require('lodash/times'), require('lodash/transform'), require('lodash/merge'), require('lodash/flattenDeep'), require('lodash/uniq'), require('json-schema-merge-allof'), require('jsonpointer'), require('lodash/omit'), require('lodash/isObject'), require('lodash/isEmpty'), require('fast-uri'), require('lodash/isString'), require('lodash/union'), require('lodash/isNumber'), require('lodash/reduce'), require('lodash/isNil'), require('lodash/cloneDeep'), require('lodash/setWith'), require('lodash/uniqueId'), require('react'), require('react-is'), require('react/jsx-runtime'), require('lodash/toPath'), require('lodash/keys'), require('lodash/pickBy'), require('lodash/difference'), require('lodash/forEach')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash/isPlainObject', 'lodash/isEqualWith', 'lodash/get', 'lodash/has', 'lodash/isEqual', 'lodash/set', 'lodash/times', 'lodash/transform', 'lodash/merge', 'lodash/flattenDeep', 'lodash/uniq', 'json-schema-merge-allof', 'jsonpointer', 'lodash/omit', 'lodash/isObject', 'lodash/isEmpty', 'fast-uri', 'lodash/isString', 'lodash/union', 'lodash/isNumber', 'lodash/reduce', 'lodash/isNil', 'lodash/cloneDeep', 'lodash/setWith', 'lodash/uniqueId', 'react', 'react-is', 'react/jsx-runtime', 'lodash/toPath', 'lodash/keys', 'lodash/pickBy', 'lodash/difference', 'lodash/forEach'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/utils"] = {}, global.isPlainObject4, global.isEqualWith, global.get13, global.has5, global.isEqual, global.set, global.times, global.transform, global.merge, global.flattenDeep, global.uniq, global.mergeAllOf, global.jsonpointer, global.omit, global.isObject2, global.isEmpty4, global.UriResolver, global.isString, global.union, global.isNumber, global.reduce, global.isNil, global.cloneDeep, global.setWith, global.uniqueId, global.react, global.ReactIs, global.jsxRuntime, global.toPath, global.keys, global.pickBy, global.difference, global.forEach));
5
+ })(this, (function (exports, isPlainObject4, isEqualWith, get13, has5, isEqual, set, times, transform, merge, flattenDeep, uniq, mergeAllOf, jsonpointer, omit, isObject2, isEmpty4, UriResolver, isString, union, isNumber, reduce, isNil, cloneDeep, setWith, uniqueId, react, ReactIs, jsxRuntime, toPath, keys, pickBy, difference, forEach) { 'use strict';
6
6
 
7
7
  // src/isObject.ts
8
8
  function isObject(thing) {
@@ -2756,7 +2756,7 @@
2756
2756
  {
2757
2757
  get(_obj, prop) {
2758
2758
  if (!ids.has(prop)) {
2759
- ids.set(prop, nanoid.nanoid());
2759
+ ids.set(prop, uniqueId("test-id-"));
2760
2760
  }
2761
2761
  return ids.get(prop);
2762
2762
  }
package/lib/getTestIds.js CHANGED
@@ -1,5 +1,5 @@
1
- import { nanoid } from 'nanoid';
2
1
  import get from 'lodash-es/get.js';
2
+ import uniqueId from 'lodash-es/uniqueId.js';
3
3
  /** Returns an object of test IDs that can only be used in test mode. If the function is called in a test environment
4
4
  * (`NODE_ENV === 'test'`, this is set by jest) then a Proxy object will be returned. If a key within the returned
5
5
  * object is accessed, if the value already exists the object will return that value, otherwise it will create that key
@@ -25,7 +25,7 @@ export default function getTestIds() {
25
25
  return new Proxy({}, {
26
26
  get(_obj, prop) {
27
27
  if (!ids.has(prop)) {
28
- ids.set(prop, nanoid());
28
+ ids.set(prop, uniqueId('test-id-'));
29
29
  }
30
30
  return ids.get(prop);
31
31
  },
@@ -1 +1 @@
1
- {"version":3,"file":"getTestIds.js","sourceRoot":"","sources":["../src/getTestIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,GAAG,MAAM,YAAY,CAAC;AAI7B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,oHAAoH;IACpH,8EAA8E;IAC9E,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,KAAK,MAAM,EAAE,CAAC;QAC9E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IACtB,OAAO,IAAI,KAAK,CACd,EAAE,EACF;QACE,GAAG,CAAC,IAAI,EAAE,IAAI;YACZ,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"getTestIds.js","sourceRoot":"","sources":["../src/getTestIds.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAIvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,oHAAoH;IACpH,8EAA8E;IAC9E,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,KAAK,MAAM,EAAE,CAAC;QAC9E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IACtB,OAAO,IAAI,KAAK,CACd,EAAE,EACF;QACE,GAAG,CAAC,IAAI,EAAE,IAAI;YACZ,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACtC,CAAC;YACD,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}