react-schema-form 1.0.11 → 1.0.12

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.
@@ -6884,13 +6884,12 @@ function UT() {
6884
6884
  }(Ca, Ca.exports)), Ca.exports;
6885
6885
  }
6886
6886
  var WT = UT();
6887
- const HT = /* @__PURE__ */ Ut(WT), ki = new qT({ allErrors: !0 });
6887
+ const HT = /* @__PURE__ */ Ut(WT), ki = new qT({ allErrors: !0, strict: !1, keywords: ["readonly"] });
6888
6888
  HT(ki);
6889
6889
  const Gu = /* @__PURE__ */ new Map(), YT = (e, t) => {
6890
6890
  try {
6891
6891
  return t.split(/[.[\]'"]/).filter(Boolean).reduce((r, o) => r && r[o], e);
6892
- } catch (r) {
6893
- console.log(r);
6892
+ } catch {
6894
6893
  return;
6895
6894
  }
6896
6895
  }, KT = (e, t) => {
@@ -7168,13 +7167,13 @@ function t1(e, t, r, o) {
7168
7167
  return l;
7169
7168
  }
7170
7169
  const Jv = (e, t) => {
7171
- if (console.log(e, t), Gu.has(e))
7172
- return console.log("schemaKey is found!"), Gu.get(e);
7170
+ if (Gu.has(e))
7171
+ return Gu.get(e);
7173
7172
  try {
7174
7173
  const r = ki.compile(t);
7175
7174
  return Gu.set(e, r), r;
7176
- } catch (r) {
7177
- return console.error("Schema compilation error:", r, schemaCopy), null;
7175
+ } catch {
7176
+ return null;
7178
7177
  }
7179
7178
  };
7180
7179
  function r1(e) {
@@ -7185,20 +7184,18 @@ function r1(e) {
7185
7184
  return r.toString(16);
7186
7185
  }
7187
7186
  const n1 = (e, t) => {
7188
- e.$schema || (e.$schema = "http://json-schema.org/draft-07/schema#"), console.log("schema", e);
7187
+ e.$schema || (e.$schema = "http://json-schema.org/draft-07/schema#");
7189
7188
  let r = r1(e);
7190
7189
  const o = Jv(r, e);
7191
- return o ? (console.log("value = ", t), o(t === void 0 ? {} : t) ? { valid: !0 } : { valid: !1, error: ki.errorsText(o.errors, {}) }) : { valid: !1, error: "Invalid Schema" };
7190
+ return o ? o(t === void 0 ? {} : t) ? { valid: !0 } : { valid: !1, error: ki.errorsText(o.errors, {}) } : { valid: !1, error: "Invalid Schema" };
7192
7191
  }, o1 = (e, t) => {
7193
7192
  if (!e || !e.schema)
7194
7193
  return { valid: !0 };
7195
7194
  (t === "" || e.type === "number" && (t === null || isNaN(parseFloat(t)))) && (t = void 0);
7196
- const r = e.key[e.key.length - 1];
7197
- console.log("schemaKey = ", r);
7198
- const { schema: o } = e, s = { type: "object", properties: {}, $schema: "http://json-schema.org/draft-07/schema#" }, a = e.key[e.key.length - 1];
7199
- s.properties[a] = o, e.required && (s.required = [a]), console.log("wrap", s);
7195
+ const r = e.key[e.key.length - 1], { schema: o } = e, s = { type: "object", properties: {}, $schema: "http://json-schema.org/draft-07/schema#" }, a = e.key[e.key.length - 1];
7196
+ s.properties[a] = o, e.required && (s.required = [a]);
7200
7197
  const l = Jv(r, s);
7201
- return l ? (console.log("value = ", t === void 0 ? {} : { [e.key[e.key.length - 1]]: t }), l(t === void 0 ? {} : { [e.key[e.key.length - 1]]: t }) ? { valid: !0 } : { valid: !1, error: ki.errorsText(l.errors, {}) }) : { valid: !1, error: "Invalid Schema" };
7198
+ return l ? l(t === void 0 ? {} : { [e.key[e.key.length - 1]]: t }) ? { valid: !0 } : { valid: !1, error: ki.errorsText(l.errors, {}) } : { valid: !1, error: "Invalid Schema" };
7202
7199
  }, s1 = (e, t) => {
7203
7200
  let r;
7204
7201
  return Array.isArray(t) ? (t.reduce((o, s) => o && o[s], e), r = t.reduce((o, s) => o && o[s], e)) : r = e[t], r;