@declarion/react 0.59.2 → 0.60.0

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.
Files changed (35) hide show
  1. package/dist-lib/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-BY-Ir7Sh.js} +39 -39
  2. package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-B9p1XhjC.js} +11 -11
  3. package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-CtL7rdT6.js} +34 -34
  4. package/dist-lib/{Grid-CQabaBLx.js → Grid-CYERLdXO.js} +1 -1
  5. package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-B08IJKsZ.js} +465 -465
  6. package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-Dje_rays.js} +26 -26
  7. package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-N0IWjTH5.js} +1 -1
  8. package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-BEWSHtAC.js} +26 -26
  9. package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-CYiM-ITJ.js} +470 -470
  10. package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +3051 -0
  11. package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +780 -0
  12. package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-DKKeCGTH.js} +1 -1
  13. package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-DbiOpvd6.js} +187 -187
  14. package/dist-lib/api/data.d.ts +5 -1
  15. package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-nveYLvHR.js} +1 -1
  16. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  17. package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
  18. package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
  19. package/dist-lib/{failure-v-uGSpbX.js → failure-BT54OLHy.js} +5 -5
  20. package/dist-lib/{format-count-DA4wmmWR.js → format-count-DLFCdtME.js} +246 -246
  21. package/dist-lib/hooks/useObject.d.ts +3 -2
  22. package/dist-lib/index.js +613 -613
  23. package/dist-lib/lib/field-classification.d.ts +10 -1
  24. package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-DSExeoAh.js} +6 -6
  25. package/dist-lib/{registry-Cb3W-czW.js → registry-CRPxNbkk.js} +444 -438
  26. package/dist-lib/testing.js +2 -2
  27. package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-BavrHfrU.js} +14 -14
  28. package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-BPq7HMF1.js} +1083 -1017
  29. package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-CG1WM4cv.js} +5 -5
  30. package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-C18iWRgr.js} +132 -158
  31. package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-C35JrjwQ.js} +2 -2
  32. package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-DKktWWLB.js} +1 -1
  33. package/package.json +1 -1
  34. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
  35. package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
@@ -1,8 +1,8 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { Dt as t, Ln as n, Rn as r, Vt as i, jn as a, nn as o, xt as s } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { Jn as t, Lt as n, Vn as r, Zt as i, fn as a, jt as o, qn as s } from "./useCurrentScreen-BPq7HMF1.js";
3
3
  import { d as c, f as l, t as u, u as d } from "./useText-BFDCTUSo.js";
4
- import { t as f } from "./failure-v-uGSpbX.js";
5
- import { g as p, h as m, t as h } from "./useAgentConversation-D97IqE-J.js";
4
+ import { t as f } from "./failure-BT54OLHy.js";
5
+ import { g as p, h as m, t as h } from "./useAgentConversation-BavrHfrU.js";
6
6
  import { useEffect as g, useRef as _, useState as v } from "react";
7
7
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
8
8
  import x from "react-textarea-autosize";
@@ -59,7 +59,7 @@ function D(e) {
59
59
  //#endregion
60
60
  //#region src/components/agents/AgentChatPanel.impl.tsx
61
61
  var O = 80;
62
- function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
62
+ function k({ open: t, onClose: n, context: r, title: i = "", askOnOpen: o }) {
63
63
  let l = h(), d = u(), S = u("errors"), [w, T] = v(""), [E, D] = v(null), k = _(null), [A, P] = v(!1), I = _(null), L = _(null), R = _(!0), [B, V] = v(!1), H = () => {
64
64
  let e = L.current;
65
65
  if (!e) return;
@@ -77,9 +77,9 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
77
77
  }, [l.messages]), g(() => {
78
78
  t && U("instant");
79
79
  }, [t]), g(() => {
80
- let e = s?.trim();
80
+ let e = o?.trim();
81
81
  t && e && k.current !== e && (k.current = e, I.current?.(e));
82
- }, [t, s]), !t) return null;
82
+ }, [t, o]), !t) return null;
83
83
  let W = async (e) => {
84
84
  if (e.trim()) {
85
85
  D(null), T("");
@@ -141,7 +141,7 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
141
141
  fontWeight: 600,
142
142
  color: "var(--text)"
143
143
  },
144
- children: a
144
+ children: i
145
145
  }), /* @__PURE__ */ b("div", {
146
146
  style: {
147
147
  fontSize: 10.5,
@@ -157,17 +157,17 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
157
157
  borderRadius: 999
158
158
  } }), c(d("agent.panel.context", "context: {context}"), { context: /* @__PURE__ */ y("span", {
159
159
  className: "mono",
160
- children: i || d("agent.panel.context_platform", "Platform")
160
+ children: r || d("agent.panel.context_platform", "Platform")
161
161
  }) })]
162
162
  })]
163
163
  }),
164
- l.messages.length > 0 && /* @__PURE__ */ y(n, {
164
+ l.messages.length > 0 && /* @__PURE__ */ y(s, {
165
165
  size: 24,
166
166
  icon: /* @__PURE__ */ y(e.copy, { size: 12 }),
167
167
  onClick: () => void ne(d, l.messages),
168
168
  title: d("agent.panel.copy_all", "Copy entire conversation")
169
169
  }),
170
- /* @__PURE__ */ y(n, {
170
+ /* @__PURE__ */ y(s, {
171
171
  size: 24,
172
172
  icon: /* @__PURE__ */ y(e.clock, { size: 12 }),
173
173
  onClick: () => {
@@ -175,21 +175,21 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
175
175
  },
176
176
  title: d("agent.panel.earlier", "Earlier conversations")
177
177
  }),
178
- l.conversationId && /* @__PURE__ */ y(n, {
178
+ l.conversationId && /* @__PURE__ */ y(s, {
179
179
  size: 24,
180
180
  icon: /* @__PURE__ */ y(e.plus, { size: 12 }),
181
181
  onClick: l.startNew,
182
182
  title: d("agent.panel.new_conversation", "New conversation")
183
183
  }),
184
- /* @__PURE__ */ y(n, {
184
+ /* @__PURE__ */ y(s, {
185
185
  size: 24,
186
186
  icon: /* @__PURE__ */ y(e.settings, { size: 12 }),
187
187
  title: d("agent.panel.preferences", "Preferences")
188
188
  }),
189
- /* @__PURE__ */ y(n, {
189
+ /* @__PURE__ */ y(s, {
190
190
  size: 24,
191
191
  icon: /* @__PURE__ */ y(e.x, { size: 13 }),
192
- onClick: r,
192
+ onClick: n,
193
193
  title: d("agent.panel.close", "Close")
194
194
  })
195
195
  ]
@@ -242,7 +242,7 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
242
242
  color: "var(--text-3)",
243
243
  fontSize: 11.5
244
244
  },
245
- children: [/* @__PURE__ */ y(o, { size: 12 }), d("agent.panel.thinking", "Thinking…")]
245
+ children: [/* @__PURE__ */ y(a, { size: 12 }), d("agent.panel.thinking", "Thinking…")]
246
246
  }),
247
247
  E && /* @__PURE__ */ y("div", {
248
248
  style: {
@@ -316,7 +316,7 @@ function k({ open: t, onClose: r, context: i, title: a = "", askOnOpen: s }) {
316
316
  fontFamily: "inherit"
317
317
  }
318
318
  }),
319
- /* @__PURE__ */ y(n, {
319
+ /* @__PURE__ */ y(s, {
320
320
  size: 26,
321
321
  icon: /* @__PURE__ */ y(e.paperclip, { size: 12 }),
322
322
  title: d("agent.panel.attach_context", "Attach context")
@@ -422,7 +422,7 @@ function j({ children: t, dataMessageId: n, dataStreaming: r }) {
422
422
  });
423
423
  }
424
424
  function M({ agentTurn: e }) {
425
- let t = u(), n = u("errors"), r = s("agent_turn")?.fields.get("status"), i = e.status === "failed" ? n(e.error_code ?? "", a(e.error_details) || n("agents.turn_failed", "The assistant could not finish this turn.")) : void 0;
425
+ let t = u(), n = u("errors"), i = o("agent_turn")?.fields.get("status"), a = e.status === "failed" ? n(e.error_code ?? "", r(e.error_details) || n("agents.turn_failed", "The assistant could not finish this turn.")) : void 0;
426
426
  return /* @__PURE__ */ b("div", {
427
427
  "data-agent-turn": e.id,
428
428
  "data-turn-status": e.status,
@@ -431,10 +431,10 @@ function M({ agentTurn: e }) {
431
431
  color: "var(--text-3)"
432
432
  },
433
433
  children: [
434
- e.status === "queued" && (t(r?.values?.find((e) => e.code === "queued")?.name) || e.status),
434
+ e.status === "queued" && (t(i?.values?.find((e) => e.code === "queued")?.name) || e.status),
435
435
  e.status === "running" && t("agent.panel.turn_working", "Working…"),
436
436
  e.status === "waiting" && t("agent.panel.turn_waiting", "Waiting for your response"),
437
- e.status === "failed" && t("agent.panel.turn_unfinished", "The agent couldn't finish: {reason}", { reason: i ?? "" })
437
+ e.status === "failed" && t("agent.panel.turn_unfinished", "The agent couldn't finish: {reason}", { reason: a ?? "" })
438
438
  ]
439
439
  });
440
440
  }
@@ -537,7 +537,7 @@ function I() {
537
537
  };
538
538
  }
539
539
  function L({ call: e }) {
540
- let [t, n] = v(!1), r = u(), i = B(e.name), a = s("agent_tool_invocation")?.fields.get("status"), o = e.status ?? "running", c = r(a?.values?.find((e) => e.code === o)?.name) || o, l = e.status === "outcome_unknown" ? "outcome_unknown" : e.isError ? "failed" : R(e.status) ? "ok" : "running";
540
+ let [t, n] = v(!1), r = u(), i = B(e.name), a = o("agent_tool_invocation")?.fields.get("status"), s = e.status ?? "running", c = r(a?.values?.find((e) => e.code === s)?.name) || s, l = e.status === "outcome_unknown" ? "outcome_unknown" : e.isError ? "failed" : R(e.status) ? "ok" : "running";
541
541
  return /* @__PURE__ */ b("div", {
542
542
  "data-activity-call": e.name,
543
543
  "data-call-state": l,
@@ -749,11 +749,11 @@ var U = {
749
749
  }
750
750
  };
751
751
  function W({ block: e }) {
752
- let n = u();
752
+ let t = u();
753
753
  switch (e.type) {
754
754
  case "text": return /* @__PURE__ */ y("div", {
755
755
  className: "agent-md",
756
- children: /* @__PURE__ */ y(t, {
756
+ children: /* @__PURE__ */ y(n, {
757
757
  content: e.text,
758
758
  plugins: "gfm",
759
759
  prose: !1,
@@ -762,23 +762,23 @@ function W({ block: e }) {
762
762
  })
763
763
  });
764
764
  case "tool_use": {
765
- let t = q(n, e.name, e.input);
765
+ let n = q(t, e.name, e.input);
766
766
  return /* @__PURE__ */ y(G, {
767
767
  kind: "call",
768
- label: t.label,
769
- sub: t.sub,
768
+ label: n.label,
769
+ sub: n.sub,
770
770
  body: e.input
771
771
  });
772
772
  }
773
773
  case "tool_result": return /* @__PURE__ */ y(G, {
774
774
  kind: "result",
775
- label: J(n, e),
775
+ label: J(t, e),
776
776
  body: e.output,
777
777
  isError: !!e.is_error
778
778
  });
779
779
  case "elicit_response": return /* @__PURE__ */ y(G, {
780
780
  kind: "result",
781
- label: n("agent.panel.chip.answer", "answer"),
781
+ label: t("agent.panel.chip.answer", "answer"),
782
782
  body: e.data
783
783
  });
784
784
  case "decision": return /* @__PURE__ */ y(X, { block: e });
@@ -998,12 +998,12 @@ function Z(e, t) {
998
998
  function Q(e, t) {
999
999
  return e("agent.panel.proposal", "Run {code}.", { code: t });
1000
1000
  }
1001
- function re({ tool: t, onApprove: n, onReject: i }) {
1002
- let a = u(), o = u("errors"), s = JSON.stringify(t.params ?? {}, null, 2), [c, l] = v(!1), [d, p] = v(!1), [m, h] = v(""), [g, _] = v(null), [x, S] = v(!1), C = async (e) => {
1001
+ function re({ tool: n, onApprove: r, onReject: i }) {
1002
+ let a = u(), o = u("errors"), s = JSON.stringify(n.params ?? {}, null, 2), [c, l] = v(!1), [d, p] = v(!1), [m, h] = v(""), [g, _] = v(null), [x, S] = v(!1), C = async (e) => {
1003
1003
  if (!x) {
1004
1004
  S(!0);
1005
1005
  try {
1006
- await n(e);
1006
+ await r(e);
1007
1007
  } catch (e) {
1008
1008
  _(f(o, e)), S(!1);
1009
1009
  }
@@ -1017,7 +1017,7 @@ function re({ tool: t, onApprove: n, onReject: i }) {
1017
1017
  _(f(o, e)), S(!1);
1018
1018
  }
1019
1019
  }
1020
- }, T = typeof t.confidence == "number" ? Math.round(Math.max(0, Math.min(1, t.confidence)) * 100) : null;
1020
+ }, T = typeof n.confidence == "number" ? Math.round(Math.max(0, Math.min(1, n.confidence)) * 100) : null;
1021
1021
  return /* @__PURE__ */ b("div", {
1022
1022
  style: {
1023
1023
  marginTop: 4,
@@ -1053,7 +1053,7 @@ function re({ tool: t, onApprove: n, onReject: i }) {
1053
1053
  fontSize: 10.5,
1054
1054
  color: "var(--text-3)"
1055
1055
  },
1056
- children: t.tool_code
1056
+ children: n.tool_code
1057
1057
  }),
1058
1058
  T !== null && /* @__PURE__ */ y("span", {
1059
1059
  title: a("agent.panel.confidence_title", "LLM confidence {percent}%", { percent: T }),
@@ -1076,16 +1076,16 @@ function re({ tool: t, onApprove: n, onReject: i }) {
1076
1076
  color: "var(--text)",
1077
1077
  marginBottom: 8
1078
1078
  },
1079
- children: t.question?.message?.trim() || Q(a, t.tool_code)
1079
+ children: n.question?.message?.trim() || Q(a, n.tool_code)
1080
1080
  }),
1081
- t.reason?.trim() && /* @__PURE__ */ y("div", {
1081
+ n.reason?.trim() && /* @__PURE__ */ y("div", {
1082
1082
  style: {
1083
1083
  fontSize: 11.5,
1084
1084
  lineHeight: 1.45,
1085
1085
  color: "var(--text-2)",
1086
1086
  marginBottom: 8
1087
1087
  },
1088
- children: t.reason.trim()
1088
+ children: n.reason.trim()
1089
1089
  }),
1090
1090
  /* @__PURE__ */ b("button", {
1091
1091
  type: "button",
@@ -1163,27 +1163,27 @@ function re({ tool: t, onApprove: n, onReject: i }) {
1163
1163
  justifyContent: "flex-end"
1164
1164
  },
1165
1165
  children: [
1166
- d ? /* @__PURE__ */ y(r, {
1166
+ d ? /* @__PURE__ */ y(t, {
1167
1167
  size: "xs",
1168
1168
  kind: "ghost",
1169
1169
  onClick: w,
1170
1170
  disabled: x,
1171
1171
  children: a("agent.panel.reject_send", "Send rejection")
1172
- }) : /* @__PURE__ */ y(r, {
1172
+ }) : /* @__PURE__ */ y(t, {
1173
1173
  size: "xs",
1174
1174
  kind: "ghost",
1175
1175
  onClick: () => p(!0),
1176
1176
  disabled: x,
1177
1177
  children: a("agent.panel.reject", "Reject…")
1178
1178
  }),
1179
- t.confirmation_mode !== "always" && /* @__PURE__ */ y(r, {
1179
+ n.confirmation_mode !== "always" && /* @__PURE__ */ y(t, {
1180
1180
  size: "xs",
1181
1181
  kind: "ghost",
1182
1182
  onClick: () => C("conversation"),
1183
1183
  disabled: x,
1184
1184
  children: a("agent.panel.approve_chat", "Approve for this chat")
1185
1185
  }),
1186
- /* @__PURE__ */ y(r, {
1186
+ /* @__PURE__ */ y(t, {
1187
1187
  size: "xs",
1188
1188
  kind: "primary",
1189
1189
  icon: /* @__PURE__ */ y(e.check, { size: 11 }),
@@ -1,9 +1,9 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { In as t, Ln as n, on as r } from "./useCurrentScreen-BL5NZFCw.js";
3
- import { h as i } from "./RefreshControl-Bhoib0ZA.js";
2
+ import { Kn as t, gn as n, qn as r } from "./useCurrentScreen-BPq7HMF1.js";
3
+ import { h as i } from "./RefreshControl-BEWSHtAC.js";
4
4
  import { t as a } from "./useText-BFDCTUSo.js";
5
- import { A as o } from "./field-classification-C28XE-_P.js";
6
- import { p as s } from "./action-dispatch-DY0c8U81.js";
5
+ import { C as o } from "./useOwnRefresh-C18iWRgr.js";
6
+ import { p as s } from "./action-dispatch-DbiOpvd6.js";
7
7
  import { useCallback as c, useState as l } from "react";
8
8
  import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
9
9
  //#region src/components/primitives/RecordIdBadge.tsx
@@ -27,8 +27,8 @@ function h({ value: t }) {
27
27
  }
28
28
  //#endregion
29
29
  //#region src/components/chrome/PageShell.tsx
30
- function g({ header: e, children: t, scrollRef: n }) {
31
- let i = r(), a = i.isPhone ? o(12) : {
30
+ function g({ header: e, children: t, scrollRef: r }) {
31
+ let i = n(), a = i.isPhone ? o(12) : {
32
32
  paddingLeft: "24px",
33
33
  paddingRight: "24px"
34
34
  };
@@ -50,7 +50,7 @@ function g({ header: e, children: t, scrollRef: n }) {
50
50
  },
51
51
  children: e
52
52
  }), /* @__PURE__ */ d("div", {
53
- ref: n,
53
+ ref: r,
54
54
  style: {
55
55
  flex: 1,
56
56
  minHeight: 0,
@@ -80,7 +80,7 @@ var _ = {
80
80
  flexWrap: "wrap",
81
81
  justifyContent: "flex-end"
82
82
  }, v = 160;
83
- function y({ icon: r, title: o, recordId: s, description: c, highlights: l, mode: p, dirty: m = !1, showBack: g = !1, onBack: y, right: b, identityControls: x, showTitle: S = !0 }) {
83
+ function y({ icon: n, title: o, recordId: s, description: c, highlights: l, mode: p, dirty: m = !1, showBack: g = !1, onBack: y, right: b, identityControls: x, showTitle: S = !0 }) {
84
84
  let C = a();
85
85
  return /* @__PURE__ */ f("div", {
86
86
  style: {
@@ -96,14 +96,14 @@ function y({ icon: r, title: o, recordId: s, description: c, highlights: l, mode
96
96
  paddingTop: 4,
97
97
  flexShrink: 0
98
98
  },
99
- children: /* @__PURE__ */ d(n, {
99
+ children: /* @__PURE__ */ d(r, {
100
100
  size: 26,
101
101
  icon: /* @__PURE__ */ d(e.back, { size: 14 }),
102
102
  title: C("shell.back", "Back"),
103
103
  onClick: y
104
104
  })
105
105
  }),
106
- S && r && /* @__PURE__ */ d("div", {
106
+ S && n && /* @__PURE__ */ d("div", {
107
107
  style: {
108
108
  flexShrink: 0,
109
109
  paddingTop: 2
@@ -119,7 +119,7 @@ function y({ icon: r, title: o, recordId: s, description: c, highlights: l, mode
119
119
  alignItems: "center",
120
120
  justifyContent: "center"
121
121
  },
122
- children: r
122
+ children: n
123
123
  })
124
124
  }),
125
125
  S && /* @__PURE__ */ f(u, { children: [
@@ -1,5 +1,5 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { Ln as t, Rn as n, _n as r, jn as i, rt as a } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { Dn as t, Jn as n, Vn as r, qn as i, rt as a } from "./useCurrentScreen-BPq7HMF1.js";
3
3
  import { t as o } from "./useText-BFDCTUSo.js";
4
4
  import { n as s, r as c, t as l } from "./dataTableStyles-vwD1mVOP.js";
5
5
  import { useCallback as u, useMemo as d, useRef as f } from "react";
@@ -8,8 +8,8 @@ import { DndContext as h, PointerSensor as g, closestCenter as _, useSensor as v
8
8
  import { SortableContext as b, useSortable as x, verticalListSortingStrategy as S } from "@dnd-kit/sortable";
9
9
  import { CSS as C } from "@dnd-kit/utilities";
10
10
  //#region src/components/detail-layout/DraggableChildrenTable.tsx
11
- function w({ config: t, childEntity: i, schema: a, rows: l, onChange: x, validationErrors: C, refs: w }) {
12
- let E = o(), D = f(null), O = t.position_field, k = t.columns, A = y(v(g, { activationConstraint: { distance: 5 } })), j = new Set(Array.isArray(t.foreign_key) ? t.foreign_key : [t.foreign_key]), M = k.filter((e) => {
11
+ function w({ config: r, childEntity: i, schema: a, rows: l, onChange: x, validationErrors: C, refs: w }) {
12
+ let E = o(), D = f(null), O = r.position_field, k = r.columns, A = y(v(g, { activationConstraint: { distance: 5 } })), j = new Set(Array.isArray(r.foreign_key) ? r.foreign_key : [r.foreign_key]), M = k.filter((e) => {
13
13
  if (j.has(e) || e === O) return !1;
14
14
  let t = i.fields.get(e);
15
15
  return !(!t || t.auto || t.primary || t.source);
@@ -27,22 +27,22 @@ function w({ config: t, childEntity: i, schema: a, rows: l, onChange: x, validat
27
27
  let e = l.filter((e) => !e._deleted).reduce((e, t) => {
28
28
  let n = typeof t[O] == "number" ? t[O] : -1;
29
29
  return Math.max(e, n);
30
- }, -1), n = {
30
+ }, -1), t = {
31
31
  _key: crypto.randomUUID(),
32
32
  _dirty: !0,
33
33
  [O]: e + 1
34
- }, r = t.quick_add?.defaults ?? {};
34
+ }, n = r.quick_add?.defaults ?? {};
35
35
  for (let e of M) {
36
- let t = i.fields.get(e);
37
- t && (r[e] === void 0 ? t.default === void 0 ? t.type === "bool" && (n[e] = !1) : n[e] = t.default : n[e] = r[e]);
36
+ let r = i.fields.get(e);
37
+ r && (n[e] === void 0 ? r.default === void 0 ? r.type === "bool" && (t[e] = !1) : t[e] = r.default : t[e] = n[e]);
38
38
  }
39
- x([...l, n]);
39
+ x([...l, t]);
40
40
  }, [
41
41
  l,
42
42
  x,
43
43
  M,
44
44
  i,
45
- t.quick_add?.defaults,
45
+ r.quick_add?.defaults,
46
46
  O
47
47
  ]), R = u((e) => {
48
48
  x(l.map((t) => t._key === e ? {
@@ -119,10 +119,10 @@ function w({ config: t, childEntity: i, schema: a, rows: l, onChange: x, validat
119
119
  padding: "0 4px"
120
120
  } }),
121
121
  P.map((e) => {
122
- let t = i.fields.get(e);
122
+ let n = i.fields.get(e);
123
123
  return /* @__PURE__ */ p("th", {
124
124
  style: H,
125
- children: t ? r(E, t, e, a.entities) : e
125
+ children: n ? t(E, n, e, a.entities) : e
126
126
  }, e);
127
127
  }),
128
128
  /* @__PURE__ */ p("th", { style: {
@@ -158,9 +158,9 @@ function w({ config: t, childEntity: i, schema: a, rows: l, onChange: x, validat
158
158
  })
159
159
  })] });
160
160
  }
161
- function T({ row: n, columns: r, editableColumns: s, displayOnlyColumns: c, childEntity: u, validationErrors: d, refs: f, onCellChange: h, onDelete: g, onUndoDelete: _ }) {
162
- let v = o(), y = !!n._deleted, b = d?.[n._key], { attributes: S, listeners: w, setNodeRef: T, transform: E, transition: D, isDragging: O } = x({
163
- id: n._key,
161
+ function T({ row: t, columns: n, editableColumns: s, displayOnlyColumns: c, childEntity: u, validationErrors: d, refs: f, onCellChange: h, onDelete: g, onUndoDelete: _ }) {
162
+ let v = o(), y = !!t._deleted, b = d?.[t._key], { attributes: S, listeners: w, setNodeRef: T, transform: E, transition: D, isDragging: O } = x({
163
+ id: t._key,
164
164
  disabled: y
165
165
  }), k = {
166
166
  transform: C.Translate.toString(E),
@@ -201,40 +201,40 @@ function T({ row: n, columns: r, editableColumns: s, displayOnlyColumns: c, chil
201
201
  children: /* @__PURE__ */ p(e.grid, { size: 14 })
202
202
  })
203
203
  }),
204
- r.map((e) => {
205
- let t = u.fields.get(e), r = b?.includes(e), o = c.has(e), l = s.includes(e);
204
+ n.map((e) => {
205
+ let n = u.fields.get(e), i = b?.includes(e), o = c.has(e), l = s.includes(e);
206
206
  return y || o || !l ? /* @__PURE__ */ p("td", {
207
207
  style: {
208
208
  ...A,
209
209
  textDecoration: y ? "line-through" : "none"
210
210
  },
211
- children: t ? a({
212
- field: t,
211
+ children: n ? a({
212
+ field: n,
213
213
  fieldName: e,
214
- value: n[e],
214
+ value: t[e],
215
215
  mode: "display",
216
- record: n,
216
+ record: t,
217
217
  refs: f,
218
218
  t: v
219
- }) : i(n[e])
219
+ }) : r(t[e])
220
220
  }, e) : /* @__PURE__ */ p("td", {
221
221
  style: {
222
222
  ...j,
223
- outline: r ? "1px solid var(--danger)" : "none",
223
+ outline: i ? "1px solid var(--danger)" : "none",
224
224
  outlineOffset: -1,
225
- borderRadius: r ? 4 : 0
225
+ borderRadius: i ? 4 : 0
226
226
  },
227
- title: r ? v("record.row.field_required", "{field} is required", { field: e }) : void 0,
228
- children: t ? a({
229
- field: t,
227
+ title: i ? v("record.row.field_required", "{field} is required", { field: e }) : void 0,
228
+ children: n ? a({
229
+ field: n,
230
230
  fieldName: e,
231
- value: n[e],
231
+ value: t[e],
232
232
  mode: "edit",
233
- onChange: (t) => h(n._key, e, t),
234
- record: n,
233
+ onChange: (n) => h(t._key, e, n),
234
+ record: t,
235
235
  refs: f,
236
236
  t: v
237
- }) : i(n[e])
237
+ }) : r(t[e])
238
238
  }, e);
239
239
  }),
240
240
  /* @__PURE__ */ p("td", {
@@ -243,15 +243,15 @@ function T({ row: n, columns: r, editableColumns: s, displayOnlyColumns: c, chil
243
243
  borderBottom: "1px solid var(--divider)",
244
244
  verticalAlign: "middle"
245
245
  },
246
- children: y ? /* @__PURE__ */ p(t, {
246
+ children: y ? /* @__PURE__ */ p(i, {
247
247
  size: 24,
248
248
  icon: /* @__PURE__ */ p(e.refresh, { size: 12 }),
249
- onClick: () => _(n._key),
249
+ onClick: () => _(t._key),
250
250
  title: v("record.row.undo_delete", "Undo delete")
251
- }) : /* @__PURE__ */ p(t, {
251
+ }) : /* @__PURE__ */ p(i, {
252
252
  size: 24,
253
253
  icon: /* @__PURE__ */ p(e.trash, { size: 12 }),
254
- onClick: () => g(n._key),
254
+ onClick: () => g(t._key),
255
255
  title: v("record.row.delete", "Delete row")
256
256
  })
257
257
  })
@@ -1,4 +1,4 @@
1
- import { dt as e, ft as t, ht as n, lt as r, mt as i, pt as a, st as o, ut as s } from "./useCurrentScreen-BL5NZFCw.js";
1
+ import { dt as e, ft as t, ht as n, lt as r, mt as i, pt as a, st as o, ut as s } from "./useCurrentScreen-BPq7HMF1.js";
2
2
  import { t as c, u as l } from "./useText-BFDCTUSo.js";
3
3
  import { c as u, i as d, l as f, m as p, t as m } from "./value-By1-WJ8J.js";
4
4
  import { useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";