@declarion/react 0.1.27 → 0.1.28

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-lib/index.js CHANGED
@@ -7178,10 +7178,10 @@ function gl({ fields: e, ctx: t }) {
7178
7178
  const vl = /* @__PURE__ */ new Set(["string", "text", "int", "float", "decimal", "email", "url"]), yl = 500;
7179
7179
  function xl({ node: e, ctx: t }) {
7180
7180
  const { entity: r, objectProperties: s, onSetProperty: i, isNew: a, mode: l, refs: c } = t, o = r.properties ?? {};
7181
- if (a || !i) return null;
7181
+ if (a) return null;
7182
7182
  const u = e.properties === !0 ? !0 : e.properties, f = u === !0 ? Object.entries(o).sort(([m], [p]) => m.localeCompare(p)) : u.filter((m) => o[m] != null).map((m) => [m, o[m]]);
7183
7183
  return f.length === 0 ? null : /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-3", children: f.map(([m, p]) => {
7184
- const g = s == null ? void 0 : s.find((w) => w.property_code === m), y = ki(p), b = p.readonly ? "display" : l;
7184
+ const g = s == null ? void 0 : s.find((w) => w.property_code === m), y = ki(p), b = p.readonly || !i ? "display" : l;
7185
7185
  return /* @__PURE__ */ n(
7186
7186
  bl,
7187
7187
  {
@@ -7213,7 +7213,7 @@ function bl({
7213
7213
  }, []);
7214
7214
  const o = z(
7215
7215
  (f) => {
7216
- vl.has(t.type) ? (c.current && clearTimeout(c.current), c.current = setTimeout(() => a(e, f), yl)) : a(e, f);
7216
+ a && (vl.has(t.type) ? (c.current && clearTimeout(c.current), c.current = setTimeout(() => a(e, f), yl)) : a(e, f));
7217
7217
  },
7218
7218
  [e, t.type, a]
7219
7219
  );