@declarion/react 0.162.0 → 0.167.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.
@@ -26,62 +26,62 @@ import { useTabStore as fe } from "../../stores/tabs.js";
26
26
  import { applyRowState as pe, resolveActionLayoutForSlot as _ } from "../../lib/actions.js";
27
27
  import { effectiveScreenForRecord as me, variantActionCodesForRecord as he } from "../../lib/variants.js";
28
28
  import { dispatchAction as v } from "../../lib/action-dispatch.js";
29
- import { ResponsiveActionBar as y } from "../actions/ResponsiveActionBar.js";
30
- import { RefreshControl as b } from "../shared/RefreshControl.js";
31
- import { DocumentsMenu as x } from "./DocumentsMenu.js";
32
- import { RecordPanels as ge } from "./RecordPanels.js";
33
- import { canManageDocumentTemplates as _e } from "../../lib/document-templates.js";
34
- import { useTabNavigate as S } from "../../hooks/useTabNavigate.js";
35
- import { useScreenBack as ve } from "../../hooks/useScreenBack.js";
36
- import { useEmbed as ye } from "../../embed/EmbedContext.js";
37
- import { useEmbedNavigate as be } from "../../embed/useEmbedNavigate.js";
38
- import { useReportEmbedDirty as xe } from "../../embed/embed-dirty.js";
39
- import { useScreenIsLive as C } from "../../stores/realtime.js";
40
- import { entityAllowsCreateRoute as Se, entityAllowsMutation as Ce, extractPkValues as we, fieldDisplayName as w, getDisplayValue as Te, getPrimaryKeyFields as Ee, isUserEditableField as De, pkValuesFromId as Oe, pkValuesToId as ke, resolveRefRecordLabel as T, rowAllowsMutation as Ae, rowSetInTenant as je } from "../../types/schema.js";
41
- import { LayoutRenderer as E } from "../detail-layout/LayoutRenderer.js";
42
- import { ErrorSummary as Me } from "../detail-layout/ErrorSummary.js";
43
- import { DetailHighlights as Ne, highlightedFieldCodes as Pe } from "../detail-layout/DetailHighlights.js";
44
- import { DetailAuditStrip as Fe } from "../detail-layout/DetailAuditStrip.js";
45
- import { StatusGroupsDisplay as Ie } from "../shared/StatusGroupsDisplay.js";
46
- import { EvidenceBlock as Le } from "../detail-layout/EvidenceBlock.js";
47
- import { RecordHeader as Re } from "../chrome/RecordHeader.js";
48
- import { PageShell as ze } from "../chrome/PageShell.js";
49
- import { DynamicIcon as Be } from "../shared/DynamicIcon.js";
50
- import { findInvalidEmailFields as Ve, findMissingRequiredFields as He, validatePendingChildren as Ue } from "../../lib/children-validation.js";
51
- import { takePeekDraft as We } from "../list/peekDraftStore.js";
52
- import { coerceDisplayString as D } from "../../lib/display-value.js";
53
- import { FileDraftScope as O, useFileDraftScope as Ge } from "../file-widgets/draft-scope.js";
54
- import { discardFile as Ke } from "../file-widgets/upload.js";
55
- import { buildFilesPayload as qe, collectCommittedFileIds as Je } from "../file-widgets/payload.js";
56
- import { getEntityFileField as Ye, getSchemaFieldValue as Xe, serializeSchemaFieldValue as k } from "../file-widgets/host.js";
57
- import { resolveCard as Ze } from "./list/cardProjection.js";
58
- import { useText as Qe } from "../../hooks/useText.js";
59
- import { useRowTenant as $e } from "../../hooks/useRowTenant.js";
60
- import { useUnsavedInput as et } from "../../hooks/useUnsavedInput.js";
61
- import { showsOnNewRecord as tt } from "../../lib/child-config.js";
62
- import { useCallback as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
63
- import { Fragment as nt, jsx as F, jsxs as I } from "react/jsx-runtime";
64
- import { useLocation as rt, useParams as it, useSearchParams as at } from "react-router";
29
+ import { ResponsiveActionBar as ge } from "../actions/ResponsiveActionBar.js";
30
+ import { RefreshControl as _e } from "../shared/RefreshControl.js";
31
+ import { DocumentsMenu as y } from "./DocumentsMenu.js";
32
+ import { RecordPanels as ve } from "./RecordPanels.js";
33
+ import { canManageDocumentTemplates as ye } from "../../lib/document-templates.js";
34
+ import { useTabNavigate as b } from "../../hooks/useTabNavigate.js";
35
+ import { useScreenBack as be } from "../../hooks/useScreenBack.js";
36
+ import { useEmbed as xe } from "../../embed/EmbedContext.js";
37
+ import { useEmbedNavigate as Se } from "../../embed/useEmbedNavigate.js";
38
+ import { useReportEmbedDirty as Ce } from "../../embed/embed-dirty.js";
39
+ import { useScreenIsLive as x } from "../../stores/realtime.js";
40
+ import { entityAllowsCreateRoute as we, entityAllowsMutation as Te, extractPkValues as Ee, fieldDisplayName as S, getDisplayValue as De, getPrimaryKeyFields as Oe, isUserEditableField as ke, pkValuesFromId as Ae, pkValuesToId as je, resolveRefRecordLabel as C, rowAllowsMutation as Me, rowSetInTenant as Ne } from "../../types/schema.js";
41
+ import { LayoutRenderer as w } from "../detail-layout/LayoutRenderer.js";
42
+ import { ErrorSummary as Pe } from "../detail-layout/ErrorSummary.js";
43
+ import { DetailHighlights as Fe, highlightedFieldCodes as Ie } from "../detail-layout/DetailHighlights.js";
44
+ import { DetailAuditStrip as Le } from "../detail-layout/DetailAuditStrip.js";
45
+ import { StatusGroupsDisplay as Re } from "../shared/StatusGroupsDisplay.js";
46
+ import { EvidenceBlock as ze } from "../detail-layout/EvidenceBlock.js";
47
+ import { RecordHeader as Be } from "../chrome/RecordHeader.js";
48
+ import { PageShell as Ve } from "../chrome/PageShell.js";
49
+ import { DynamicIcon as He } from "../shared/DynamicIcon.js";
50
+ import { findInvalidEmailFields as Ue, findMissingRequiredFields as We, validatePendingChildren as Ge } from "../../lib/children-validation.js";
51
+ import { takePeekDraft as Ke } from "../list/peekDraftStore.js";
52
+ import { coerceDisplayString as T } from "../../lib/display-value.js";
53
+ import { FileDraftScope as E, useFileDraftScope as qe } from "../file-widgets/draft-scope.js";
54
+ import { discardFile as Je } from "../file-widgets/upload.js";
55
+ import { buildFilesPayload as Ye, collectCommittedFileIds as Xe } from "../file-widgets/payload.js";
56
+ import { getEntityFileField as Ze, getSchemaFieldValue as Qe, serializeSchemaFieldValue as D } from "../file-widgets/host.js";
57
+ import { resolveCard as $e } from "./list/cardProjection.js";
58
+ import { useText as et } from "../../hooks/useText.js";
59
+ import { useRowTenant as tt } from "../../hooks/useRowTenant.js";
60
+ import { useUnsavedInput as nt } from "../../hooks/useUnsavedInput.js";
61
+ import { showsOnNewRecord as rt } from "../../lib/child-config.js";
62
+ import { useCallback as O, useEffect as k, useMemo as A, useRef as it, useState as j } from "react";
63
+ import { Fragment as at, jsx as M, jsxs as N } from "react/jsx-runtime";
64
+ import { useLocation as ot, useParams as st, useSearchParams as ct } from "react-router";
65
65
  // src/components/pages/SmartDetailPage.impl.tsx
66
- var ot = () => {}, st = { expand: ["evidence"] };
67
- function L(e, t) {
66
+ var lt = () => {}, ut = { expand: ["evidence"] };
67
+ function P(e, t) {
68
68
  return e.length === t.length && JSON.stringify(e) === JSON.stringify(t);
69
69
  }
70
- function ct({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
71
- let c = {}, l = qe({
70
+ function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
71
+ let c = {}, l = Ye({
72
72
  entity: e,
73
73
  formData: t,
74
74
  record: n,
75
75
  isNew: r
76
- }), u = Je(l);
76
+ }), u = Xe(l);
77
77
  if (r) for (let [n, r] of Object.entries(t)) {
78
78
  if (e.files?.has(n)) continue;
79
- let t = k(e, n, r);
79
+ let t = D(e, n, r);
80
80
  t !== "" && t != null && (c[n] = t);
81
81
  }
82
82
  else for (let [r, i] of Object.entries(t)) {
83
83
  if (e.files?.has(r)) continue;
84
- let t = n ? Xe(e, n, r) : void 0, a = k(e, r, i), o = k(e, r, t);
84
+ let t = n ? Qe(e, n, r) : void 0, a = D(e, r, i), o = D(e, r, t);
85
85
  (a === "" ? null : a) !== (o === "" || o === void 0 ? null : o) && (c[r] = a);
86
86
  }
87
87
  if (Object.keys(l).length > 0 && (c.$files = l), Object.keys(i).length > 0 && (c.$statuses = Object.entries(i).map(([e, t]) => ({
@@ -97,7 +97,7 @@ function ct({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
97
97
  let { _key: t, _deleted: n, _dirty: r, ...i } = e;
98
98
  return i;
99
99
  }), a = s?.[t] ?? [];
100
- (r || !L(i, a)) && (e[t] = i);
100
+ (r || !P(i, a)) && (e[t] = i);
101
101
  }
102
102
  Object.keys(e).length > 0 && (c.$children = e);
103
103
  }
@@ -106,169 +106,174 @@ function ct({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
106
106
  committedFileIds: u
107
107
  };
108
108
  }
109
- function lt(e, t) {
109
+ function ft(e, t) {
110
110
  if (e) {
111
- let n = we(e, t), r = ke(n);
111
+ let n = Ee(e, t), r = je(n);
112
112
  if (r.replace(/^\|+|\|+$/g, "")) return r;
113
113
  }
114
- return t.id == null ? crypto.randomUUID() : D(t.id);
114
+ return t.id == null ? crypto.randomUUID() : T(t.id);
115
115
  }
116
- function ut({ screenCode: e }) {
117
- return /* @__PURE__ */ F(O, { children: /* @__PURE__ */ F(dt, { screenCode: e }) });
116
+ function pt({ screenCode: e }) {
117
+ return /* @__PURE__ */ M(E, { children: /* @__PURE__ */ M(mt, { screenCode: e }) });
118
118
  }
119
- function dt({ screenCode: r }) {
120
- let o = Qe(), oe = Qe("errors"), { id: le } = it(), g = be(), [ue, pe] = at(), { data: _ } = u(), he = ee((e) => e.user), v = Ge(), y = ae(), b = _?.screens[r], x = b?.entity ? _?.entities[b.entity] : void 0, S = b?.entity, T = Ce(x, "create"), Re = $e(x), Be = (() => {
121
- if (!x || !x.singleton || !x.prefilter) return;
122
- let e = Ee(x);
119
+ function mt({ screenCode: r }) {
120
+ let o = et(), oe = et("errors"), { id: le } = st(), g = Se(), [ue, pe] = ct(), { data: _ } = u(), he = ee((e) => e.user), v = qe(), ge = ae(), _e = _?.screens[r], y = _e?.entity ? _?.entities[_e.entity] : void 0, b = _e?.entity, C = Te(y, "create"), Be = tt(y), He = (() => {
121
+ if (!y || !y.singleton || !y.prefilter) return;
122
+ let e = Oe(y);
123
123
  if (e.length !== 1) return;
124
- let t = x.prefilter[e[0]];
124
+ let t = y.prefilter[e[0]];
125
125
  if (t === "$caller.user_id") return he?.id;
126
126
  if (t === "$caller.tenant_id") return he?.tenant?.id;
127
- })(), D = Be !== void 0, O = D ? Be : le, k = !D && O === "new", L = M(() => {
128
- if (!O || k) return;
129
- if (!x) return O;
130
- let e = Ee(x);
131
- if (e.length === 1) return { [e[0]]: O };
132
- let t = Oe(O, e.length);
127
+ })(), T = He !== void 0, E = T ? He : le, D = !T && E === "new", P = A(() => {
128
+ if (!E || D) return;
129
+ if (!y) return E;
130
+ let e = Oe(y);
131
+ if (e.length === 1) return { [e[0]]: E };
132
+ let t = Ae(E, e.length);
133
133
  if (!t) return;
134
134
  let n = {};
135
135
  for (let r = 0; r < e.length; r++) n[e[r]] = t[r] ?? "";
136
136
  return n;
137
137
  }, [
138
- O,
139
- k,
140
- x
141
- ]), ut = M(() => {
142
- if (L) return typeof L == "string" ? L : ke(L);
143
- }, [L]), dt = f(S, L, st), { data: R, isLoading: pt, error: ht } = dt, z = c(dt), vt = !k && z.error !== null && !(z.error instanceof se && z.error.status === 404);
144
- e(!pt);
145
- let yt = C(x?.realtime, S ?? ""), bt = S ? yt : !1;
146
- p(d(S, L, st), !k);
147
- let xt = m(S ?? ""), St = ie(S ?? ""), Ct = h(S ?? ""), wt = Object.keys(x?.status_groups ?? {}).length > 0, B = R?.data, V = Ae(x, "update", B, Re.tenantId), Tt = !!B && Ce(x, "update") && !je(x, B, Re.tenantId), Et = Ae(x, "restore", B, Re.tenantId), Dt = B?.$statuses, Ot = B?.$properties, kt = ue.get("edit") === "true", [At, jt] = P(k || kt), [H, Mt] = P({}), [U, Nt] = P({}), [Pt, Ft] = P({}), [W, G] = P(void 0), [It, Lt] = P(!1), [Rt, zt] = P(void 0), [Bt, Vt] = P(!1), Ht = k ? T : V, K = At && Ht, Ut = ye();
148
- xe(K && !k, Ut.enabled);
149
- let [Wt, Gt] = P(() => {
150
- let e = parseInt(b?.sidebar_width || "380", 10);
138
+ E,
139
+ D,
140
+ y
141
+ ]), pt = A(() => {
142
+ if (P) return typeof P == "string" ? P : je(P);
143
+ }, [P]), mt = f(b, P, ut), { data: F, isLoading: gt, error: vt } = mt, I = c(mt), xt = !D && I.error !== null && !(I.error instanceof se && I.error.status === 404);
144
+ e(!gt);
145
+ let St = x(y?.realtime, b ?? ""), Ct = b ? St : !1;
146
+ p(d(b, P, ut), !D);
147
+ let wt = m(b ?? ""), Tt = ie(b ?? ""), Et = h(b ?? ""), Dt = Object.keys(y?.status_groups ?? {}).length > 0, L = F?.data, R = Me(y, "update", L, Be.tenantId), Ot = !!L && Te(y, "update") && !Ne(y, L, Be.tenantId), kt = Me(y, "restore", L, Be.tenantId), At = L?.$statuses, jt = L?.$properties, Mt = ue.get("edit") === "true", [Nt, Pt] = j(D || Mt), [z, Ft] = j({}), [B, It] = j({}), [V, Lt] = j({}), [H, U] = j(void 0), [Rt, zt] = j(!1), [Bt, W] = j(void 0), [Vt, Ht] = j(!1), Ut = D ? C : R, G = Nt && Ut, Wt = xe();
148
+ Ce(G && !D, Wt.enabled);
149
+ let [Gt, Kt] = j(() => {
150
+ let e = parseInt(_e?.sidebar_width || "380", 10);
151
151
  return isNaN(e) ? 380 : e;
152
- }), Kt = N(null), q = N(null), qt = A((e) => {
152
+ }), qt = it(null), K = it(null), Jt = O((e) => {
153
153
  e.preventDefault();
154
- let t = Kt.current;
154
+ let t = qt.current;
155
155
  if (!t) return;
156
156
  let n = t.offsetWidth;
157
- q.current = {
157
+ K.current = {
158
158
  startX: e.clientX,
159
159
  startW: n
160
160
  };
161
161
  let r = (e) => {
162
- if (!q.current) return;
163
- let n = q.current.startX - e.clientX, r = Math.max(280, Math.min(800, q.current.startW + n));
162
+ if (!K.current) return;
163
+ let n = K.current.startX - e.clientX, r = Math.max(280, Math.min(800, K.current.startW + n));
164
164
  t.style.width = `${r}px`;
165
165
  }, i = () => {
166
- q.current && t && Gt(parseInt(t.style.width, 10) || q.current.startW), q.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
166
+ K.current && t && Kt(parseInt(t.style.width, 10) || K.current.startW), K.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
167
167
  };
168
168
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
169
- }, []), J = R?.data, Y = me(x, b, J ?? {});
170
- j(() => {
171
- let e = parseInt(Y?.sidebar_width || "380", 10);
172
- Gt(Number.isNaN(e) ? 380 : e);
173
- }, [Y?.sidebar_width]);
174
- let X = typeof J?.$row_version == "string" ? J.$row_version : void 0, Jt = J?.$refs, Yt = N(X);
175
- j(() => {
176
- if (!X) return;
177
- let e = Yt.current;
178
- Yt.current = X, e && e !== X && At && Lt(!0);
179
- }, [At, X]);
180
- let Xt = !!x?.soft_delete && J != null && J[x.soft_delete] != null, Z = rt(), Zt = N(null);
181
- te({ scrollElementRef: Zt });
182
- let Qt = !k && ht instanceof se && ht.status === 404, $t = k && !Se(x), en = N(null);
183
- j(() => {
184
- if (!Qt) return;
185
- let e = ne(Z);
186
- en.current !== e && (en.current = e, re.getState().kill(e));
187
- }, [Qt, Z]);
188
- let { openTab: tn, updateTabTitle: nn, findTabByPathname: rn } = fe();
189
- j(() => {
190
- if (!x || D || Ut.enabled) return;
191
- let e = Z.pathname, t = o(Y?.display?.name) || o(x.display.name), n = Y?.display?.icon || x.display.icon;
192
- tn({
169
+ }, []), q = F?.data, J = me(y, _e, q ?? {});
170
+ k(() => {
171
+ let e = parseInt(J?.sidebar_width || "380", 10);
172
+ Kt(Number.isNaN(e) ? 380 : e);
173
+ }, [J?.sidebar_width]);
174
+ let Y = typeof q?.$row_version == "string" ? q.$row_version : void 0, Yt = q?.$refs, Xt = it(Y);
175
+ k(() => {
176
+ if (!Y) return;
177
+ let e = Xt.current;
178
+ Xt.current = Y, e && e !== Y && Nt && zt(!0);
179
+ }, [Nt, Y]);
180
+ let Zt = !!y?.soft_delete && q != null && q[y.soft_delete] != null, X = ot(), Qt = it(null);
181
+ te({ scrollElementRef: Qt });
182
+ let $t = !D && vt instanceof se && vt.status === 404, en = D && !we(y), tn = it(null);
183
+ k(() => {
184
+ if (!$t) return;
185
+ let e = ne(X);
186
+ tn.current !== e && (tn.current = e, re.getState().kill(e));
187
+ }, [$t, X]);
188
+ let { openTab: nn, updateTabTitle: rn, findTabByPathname: an } = fe(), on = y !== void 0, sn = o(J?.display?.name) || o(y?.display.name), cn = J?.display?.icon || y?.display.icon;
189
+ k(() => {
190
+ if (!on || T || Wt.enabled) return;
191
+ let e = X.pathname;
192
+ nn({
193
193
  pathname: e,
194
194
  search: "",
195
- title: k ? o("record.new_title", "New {name}", { name: t }) : t,
196
- derivedTitle: !k,
197
- icon: n,
195
+ title: D ? o("record.new_title", "New {name}", { name: sn }) : sn,
196
+ derivedTitle: !D,
197
+ icon: cn,
198
198
  closable: !0
199
199
  });
200
200
  }, [
201
- Z.pathname,
201
+ X.pathname,
202
202
  o,
203
- Y?.display?.icon,
204
- x?.display.icon,
205
- k,
203
+ sn,
204
+ cn,
205
+ on,
206
+ nn,
206
207
  D,
207
- Ut.enabled
208
- ]), j(() => {
209
- if (!J || !x || D || Ut.enabled) return;
210
- let e = rn(Z.pathname);
208
+ T,
209
+ Wt.enabled
210
+ ]), k(() => {
211
+ if (!q || !y || T || Wt.enabled) return;
212
+ let e = an(X.pathname);
211
213
  if (e) {
212
- let t = o(Y?.display?.name) || o(x.display.name), n = Te(o, J, x), r = n && !String(n).startsWith("/") ? String(n) : t;
213
- nn(e.id, r, r === t);
214
+ let t = sn, n = De(o, q, y), r = n && !String(n).startsWith("/") ? String(n) : t;
215
+ rn(e.id, r, r === t);
214
216
  }
215
217
  }, [
216
- J,
218
+ q,
217
219
  o,
218
- x?.display.display_field,
219
- Z.pathname,
220
- D,
221
- Ut.enabled
220
+ y,
221
+ sn,
222
+ an,
223
+ rn,
224
+ X.pathname,
225
+ T,
226
+ Wt.enabled
222
227
  ]);
223
- let an = M(() => {
224
- if (!x || !Ht) return /* @__PURE__ */ new Set();
228
+ let ln = A(() => {
229
+ if (!y || !Ut) return /* @__PURE__ */ new Set();
225
230
  let e = /* @__PURE__ */ new Set();
226
- for (let [t, n] of x.fields) De(n) && e.add(t);
227
- for (let [t] of x.files ?? []) e.add(t);
231
+ for (let [t, n] of y.fields) ke(n) && e.add(t);
232
+ for (let [t] of y.files ?? []) e.add(t);
228
233
  return e;
229
- }, [x, Ht]), on = N(null);
230
- j(() => {
231
- if (kt && J && x && V && on.current !== Z.key) {
232
- if (on.current = Z.key, At || jt(!0), Object.keys(H).length === 0) {
233
- let e = O ? We(O) : null;
234
+ }, [y, Ut]), un = it(null);
235
+ k(() => {
236
+ if (Mt && q && y && R && un.current !== X.key) {
237
+ if (un.current = X.key, Nt || Pt(!0), Object.keys(z).length === 0) {
238
+ let e = E ? Ke(E) : null;
234
239
  if (e) {
235
- let t = qe({
236
- entity: x,
240
+ let t = Ye({
241
+ entity: y,
237
242
  formData: e,
238
243
  record: void 0,
239
244
  isNew: !0
240
245
  });
241
- Je(t).forEach((e) => {
246
+ Xe(t).forEach((e) => {
242
247
  v.registerDraft({
243
248
  fileId: e,
244
- discard: () => Ke(e)
249
+ discard: () => Je(e)
245
250
  });
246
251
  });
247
252
  }
248
253
  let t = {};
249
- an.forEach((n) => {
254
+ ln.forEach((n) => {
250
255
  let r = e ? e[n] : void 0;
251
256
  if (r !== void 0) {
252
257
  t[n] = r;
253
258
  return;
254
259
  }
255
- let i = Xe(x, J, n);
256
- t[n] = Ye(x, n) ? i ?? null : i ?? "";
257
- }), Mt(t);
260
+ let i = Qe(y, q, n);
261
+ t[n] = Ze(y, n) ? i ?? null : i ?? "";
262
+ }), Ft(t);
258
263
  }
259
- if (x.children !== void 0 && x.children.length > 0 && W === void 0) {
260
- let e = J.$children;
264
+ if (y.children !== void 0 && y.children.length > 0 && H === void 0) {
265
+ let e = q.$children;
261
266
  if (e && Object.keys(e).length > 0) {
262
267
  let t = {};
263
268
  for (let [n, r] of Object.entries(e)) {
264
269
  let e = _?.entities[n];
265
270
  t[n] = r.map((t) => ({
266
271
  ...t,
267
- _key: lt(e, t)
272
+ _key: ft(e, t)
268
273
  }));
269
274
  }
270
- G(t), zt(e);
271
- } else G({}), zt({});
275
+ U(t), W(e);
276
+ } else U({}), W({});
272
277
  }
273
278
  pe((e) => {
274
279
  let t = new URLSearchParams(e);
@@ -276,152 +281,157 @@ function dt({ screenCode: r }) {
276
281
  }, { replace: !0 });
277
282
  }
278
283
  }, [
279
- kt,
280
- J,
281
- an,
282
- V,
283
- x,
284
- W,
284
+ Mt,
285
+ q,
286
+ ln,
287
+ R,
288
+ y,
289
+ H,
285
290
  _,
286
- Z.key
287
- ]), j(() => {
288
- k && T && x?.children && x.children.length !== 0 && W === void 0 && (G({}), zt({}));
291
+ X.key,
292
+ v,
293
+ Nt,
294
+ z,
295
+ E,
296
+ pe
297
+ ]), k(() => {
298
+ D && C && y?.children && y.children.length !== 0 && (U((e) => e ?? {}), W((e) => e ?? {}));
289
299
  }, [
290
- k,
291
- T,
292
- x?.children
300
+ D,
301
+ C,
302
+ y?.children
293
303
  ]);
294
- let sn = A(async () => {
295
- if (await v.flushAllDrafts(), k) {
296
- let e = Y?.route?.replace("/:id", "") ?? "/";
304
+ let dn = O(async () => {
305
+ if (await v.flushAllDrafts(), D) {
306
+ let e = J?.route?.replace("/:id", "") ?? "/";
297
307
  g(e);
298
- } else jt(!1), Mt({}), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
308
+ } else Pt(!1), Ft({}), It({}), Lt({}), U(void 0), W(void 0), Ht(!1);
299
309
  }, [
300
310
  v,
301
- k,
302
- Y,
311
+ D,
312
+ J,
303
313
  g
304
- ]), cn = A((e, t) => {
305
- Mt((n) => ({
314
+ ]), fn = O((e, t) => {
315
+ Ft((n) => ({
306
316
  ...n,
307
317
  [e]: t
308
318
  }));
309
- }, []), Q = M(() => {
310
- if (!Y?.route) return "/";
311
- let e = Y.route.split("/");
319
+ }, []), Z = A(() => {
320
+ if (!J?.route) return "/";
321
+ let e = J.route.split("/");
312
322
  return e.pop(), e.join("/") || "/";
313
- }, [Y]), ln = M(() => !_?.screens || !Q || Q === "/" ? !1 : Object.values(_.screens).some((e) => e.route === Q), [_, Q]), un = A(() => {
314
- if (!ln) {
323
+ }, [J]), pn = A(() => !_?.screens || !Z || Z === "/" ? !1 : Object.values(_.screens).some((e) => e.route === Z), [_, Z]), mn = O(() => {
324
+ if (!pn) {
315
325
  g("/");
316
326
  return;
317
327
  }
318
- let e = rn(Q)?.search ?? "";
319
- g(e ? `${Q}?${e}` : Q);
328
+ let e = an(Z)?.search ?? "";
329
+ g(e ? `${Z}?${e}` : Z);
320
330
  }, [
321
- ln,
322
- Q,
323
- rn,
331
+ pn,
332
+ Z,
333
+ an,
324
334
  g
325
- ]), dn = ve({ fallback: un }), fn = !D && (dn.hasOriginBack || dn.allowFallbackBack && !!ln), pn = M(() => {
326
- if (!x) return {};
335
+ ]), Q = be({ fallback: mn }), hn = !T && (Q.hasOriginBack || Q.allowFallbackBack && !!pn), gn = A(() => {
336
+ if (!y) return {};
327
337
  let e = {};
328
- for (let t of He(x, H, k)) an.has(t) && (e[t] = o("record.field.required", "Required"));
329
- for (let t of Ve(x, H)) an.has(t) && (e[t] = oe("record.email_invalid", "This is not a valid email address."));
338
+ for (let t of We(y, z, D)) ln.has(t) && (e[t] = o("record.field.required", "Required"));
339
+ for (let t of Ue(y, z)) ln.has(t) && (e[t] = oe("record.email_invalid", "This is not a valid email address."));
330
340
  return e;
331
341
  }, [
332
342
  o,
333
343
  oe,
334
- x,
335
- H,
336
- k,
337
- an
338
- ]), mn = Object.keys(pn).length > 0, hn = M(() => x ? ct({
339
- entity: x,
340
- formData: H,
341
- record: J,
342
- isNew: k,
343
- pendingStatuses: U,
344
- pendingProperties: Pt,
345
- pendingChildren: W,
346
- childrenSnapshot: Rt
344
+ y,
345
+ z,
346
+ D,
347
+ ln
348
+ ]), _n = Object.keys(gn).length > 0, vn = A(() => y ? dt({
349
+ entity: y,
350
+ formData: z,
351
+ record: q,
352
+ isNew: D,
353
+ pendingStatuses: B,
354
+ pendingProperties: V,
355
+ pendingChildren: H,
356
+ childrenSnapshot: Bt
347
357
  }) : {
348
358
  payload: {},
349
359
  committedFileIds: []
350
360
  }, [
351
- x,
361
+ y,
362
+ z,
363
+ q,
364
+ D,
365
+ B,
366
+ V,
352
367
  H,
353
- J,
354
- k,
355
- U,
356
- Pt,
357
- W,
358
- Rt
359
- ]), gn = Object.keys(hn.payload).length > 0, _n = K && (k || gn);
360
- et(_n);
361
- let vn = A(() => {
362
- if (!S || !x || k && !T || !k && !V || (Vt(!0), mn)) return;
363
- let e = { ...hn.payload }, { committedFileIds: t } = hn;
364
- if (!k && !gn) {
365
- jt(!1), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
368
+ Bt
369
+ ]), yn = Object.keys(vn.payload).length > 0, bn = G && (D || yn);
370
+ nt(bn);
371
+ let xn = O(() => {
372
+ if (!b || !y || D && !C || !D && !R || (Ht(!0), _n)) return;
373
+ let e = { ...vn.payload }, { committedFileIds: t } = vn;
374
+ if (!D && !yn) {
375
+ Pt(!1), It({}), Lt({}), U(void 0), W(void 0), Ht(!1);
366
376
  return;
367
377
  }
368
- !k && X && (e.$row_version = X);
378
+ !D && Y && (e.$row_version = Y);
369
379
  let n = () => {
370
- jt(!1), Lt(!1), Vt(!1), Nt({}), Ft({}), G(void 0), zt(void 0);
380
+ Pt(!1), zt(!1), Ht(!1), It({}), Lt({}), U(void 0), W(void 0);
371
381
  };
372
- k ? xt.mutate(e, { onSuccess: (e) => {
382
+ D ? wt.mutate(e, { onSuccess: (e) => {
373
383
  t.forEach((e) => v.markCommitted(e));
374
- let r = e.data, i = x ? we(x, r) : {}, a = ke(i);
375
- g(a ? `${Q}/${encodeURIComponent(a)}` : Q, { replace: !0 }), n();
376
- } }) : L && St.mutate({
377
- pkValues: L,
384
+ let r = e.data, i = y ? Ee(y, r) : {}, a = je(i);
385
+ g(a ? `${Z}/${encodeURIComponent(a)}` : Z, { replace: !0 }), n();
386
+ } }) : P && Tt.mutate({
387
+ pkValues: P,
378
388
  data: e
379
389
  }, {
380
390
  onSuccess: () => {
381
391
  t.forEach((e) => v.markCommitted(e)), n();
382
392
  },
383
393
  onError: (e) => {
384
- e instanceof se && e.code === "entity.stale_object" && Lt(!0);
394
+ e instanceof se && e.code === "entity.stale_object" && zt(!0);
385
395
  }
386
396
  });
387
397
  }, [
388
398
  v,
389
- k,
390
- T,
391
- V,
392
- S,
393
- mn,
394
- hn,
395
- gn,
396
- xt,
397
- St,
398
- x,
399
+ D,
400
+ C,
401
+ R,
402
+ b,
403
+ _n,
404
+ vn,
405
+ yn,
406
+ wt,
407
+ Tt,
408
+ y,
399
409
  g,
400
- Q,
401
- X,
402
- L
403
- ]), yn = A((e, t) => {
404
- G((n) => ({
410
+ Z,
411
+ Y,
412
+ P
413
+ ]), Sn = O((e, t) => {
414
+ U((n) => ({
405
415
  ...n ?? {},
406
416
  [e]: t
407
417
  }));
408
- }, []), bn = A(() => {
409
- L && !k && Et && Ct.mutate(L);
418
+ }, []), Cn = O(() => {
419
+ P && !D && kt && Et.mutate(P);
410
420
  }, [
411
- L,
412
- k,
413
- Et,
414
- Ct
415
- ]), xn = M(() => Ue(W, _), [W, _]), Sn = Object.keys(xn).length > 0;
416
- if (!Y || !x) return null;
417
- if (!k && z.loading) return /* @__PURE__ */ F(ce, {});
418
- if (vt && !R) return /* @__PURE__ */ I("div", {
421
+ P,
422
+ D,
423
+ kt,
424
+ Et
425
+ ]), wn = A(() => Ge(H, _), [H, _]), Tn = Object.keys(wn).length > 0;
426
+ if (!J || !y) return null;
427
+ if (!D && I.loading) return /* @__PURE__ */ M(ce, {});
428
+ if (xt && !F) return /* @__PURE__ */ N("div", {
419
429
  style: { padding: 24 },
420
- children: [fn && /* @__PURE__ */ F(a, {
421
- icon: /* @__PURE__ */ F(i.back, { size: 14 }),
422
- onClick: dn.goBack,
430
+ children: [hn && /* @__PURE__ */ M(a, {
431
+ icon: /* @__PURE__ */ M(i.back, { size: 14 }),
432
+ onClick: Q.goBack,
423
433
  title: o("record.back", "Back")
424
- }), /* @__PURE__ */ I("p", {
434
+ }), /* @__PURE__ */ N("p", {
425
435
  role: "alert",
426
436
  style: {
427
437
  color: "var(--danger)",
@@ -430,26 +440,26 @@ function dt({ screenCode: r }) {
430
440
  gap: 8
431
441
  },
432
442
  children: [
433
- l(oe, z.error),
443
+ l(oe, I.error),
434
444
  " ",
435
- /* @__PURE__ */ F(s, { onRetry: z.retry })
445
+ /* @__PURE__ */ M(s, { onRetry: I.retry })
436
446
  ]
437
447
  })]
438
448
  });
439
- if ($t) return /* @__PURE__ */ I("div", {
449
+ if (en) return /* @__PURE__ */ N("div", {
440
450
  style: { padding: 24 },
441
- children: [/* @__PURE__ */ I("div", {
451
+ children: [/* @__PURE__ */ N("div", {
442
452
  style: {
443
453
  display: "flex",
444
454
  alignItems: "center",
445
455
  gap: 8,
446
456
  marginBottom: 8
447
457
  },
448
- children: [fn && /* @__PURE__ */ F(a, {
449
- icon: /* @__PURE__ */ F(i.back, { size: 14 }),
450
- onClick: dn.goBack,
458
+ children: [hn && /* @__PURE__ */ M(a, {
459
+ icon: /* @__PURE__ */ M(i.back, { size: 14 }),
460
+ onClick: Q.goBack,
451
461
  title: o("record.back", "Back")
452
- }), /* @__PURE__ */ F("h1", {
462
+ }), /* @__PURE__ */ M("h1", {
453
463
  style: {
454
464
  margin: 0,
455
465
  fontSize: 18,
@@ -458,25 +468,25 @@ function dt({ screenCode: r }) {
458
468
  },
459
469
  children: o("record.create_closed.title", "Not Available")
460
470
  })]
461
- }), /* @__PURE__ */ F("p", {
471
+ }), /* @__PURE__ */ M("p", {
462
472
  style: { color: "var(--text-3)" },
463
473
  children: o("record.create_closed.body", "This record type is not created from a form.")
464
474
  })]
465
475
  });
466
- if (!k && !J || Qt) return /* @__PURE__ */ I("div", {
476
+ if (!D && !q || $t) return /* @__PURE__ */ N("div", {
467
477
  style: { padding: 24 },
468
- children: [/* @__PURE__ */ I("div", {
478
+ children: [/* @__PURE__ */ N("div", {
469
479
  style: {
470
480
  display: "flex",
471
481
  alignItems: "center",
472
482
  gap: 8,
473
483
  marginBottom: 8
474
484
  },
475
- children: [fn && /* @__PURE__ */ F(a, {
476
- icon: /* @__PURE__ */ F(i.back, { size: 14 }),
477
- onClick: dn.goBack,
485
+ children: [hn && /* @__PURE__ */ M(a, {
486
+ icon: /* @__PURE__ */ M(i.back, { size: 14 }),
487
+ onClick: Q.goBack,
478
488
  title: o("record.back", "Back")
479
- }), /* @__PURE__ */ F("h1", {
489
+ }), /* @__PURE__ */ M("h1", {
480
490
  style: {
481
491
  margin: 0,
482
492
  fontSize: 18,
@@ -485,36 +495,36 @@ function dt({ screenCode: r }) {
485
495
  },
486
496
  children: o("record.missing.title", "Not Found")
487
497
  })]
488
- }), /* @__PURE__ */ F("p", {
498
+ }), /* @__PURE__ */ M("p", {
489
499
  style: { color: "var(--text-3)" },
490
500
  children: oe("entity.not_found", "This record does not exist.")
491
501
  })]
492
502
  });
493
- let Cn = x.display, wn = o(Y.display?.name) || o(Cn.name), Tn = Te(o, J, x), En = k ? o("record.new_title", "New {name}", { name: wn }) : Tn ? String(Tn) : wn, Dn = xt.isPending || St.isPending, On = Y.responsive?.[y.category]?.layout, kn = On?.tabs ?? (y.isPhone ? "sections" : void 0), An = On?.header_card === !0 ? Ze({
494
- entity: x,
495
- screen: Y
503
+ let En = y.display, Dn = o(J.display?.name) || o(En.name), On = De(o, q, y), kn = D ? o("record.new_title", "New {name}", { name: Dn }) : On ? String(On) : Dn, An = wt.isPending || Tt.isPending, jn = J.responsive?.[ge.category]?.layout, Mn = jn?.tabs ?? (ge.isPhone ? "sections" : void 0), Nn = jn?.header_card === !0 ? $e({
504
+ entity: y,
505
+ screen: J
496
506
  }) : void 0, $ = {
497
507
  schema: _,
498
- entity: x,
499
- entityCode: S,
500
- recordId: ut ?? O ?? "",
501
- record: K ? {
502
- ...J ?? {},
503
- ...H
504
- } : J ?? {},
505
- isNew: k,
506
- mode: K ? "edit" : "display",
507
- onFieldChange: K ? cn : void 0,
508
- refs: Jt,
509
- headerFields: !k && J ? Pe(Y, x) : void 0,
508
+ entity: y,
509
+ entityCode: b,
510
+ recordId: pt ?? E ?? "",
511
+ record: G ? {
512
+ ...q ?? {},
513
+ ...z
514
+ } : q ?? {},
515
+ isNew: D,
516
+ mode: G ? "edit" : "display",
517
+ onFieldChange: G ? fn : void 0,
518
+ refs: Yt,
519
+ headerFields: !D && q ? Ie(J, y) : void 0,
510
520
  objectProperties: (() => {
511
- let e = Ot ?? [];
512
- if (!K || Object.keys(Pt).length === 0) return e.length > 0 ? e : void 0;
513
- let t = e.map((e) => Pt[e.property_code] === void 0 ? e : {
521
+ let e = jt ?? [];
522
+ if (!G || Object.keys(V).length === 0) return e.length > 0 ? e : void 0;
523
+ let t = e.map((e) => V[e.property_code] === void 0 ? e : {
514
524
  ...e,
515
- value: Pt[e.property_code]
525
+ value: V[e.property_code]
516
526
  });
517
- for (let [n, r] of Object.entries(Pt)) e.some((e) => e.property_code === n) || t.push({
527
+ for (let [n, r] of Object.entries(V)) e.some((e) => e.property_code === n) || t.push({
518
528
  property_code: n,
519
529
  name: {},
520
530
  type: "string",
@@ -522,19 +532,19 @@ function dt({ screenCode: r }) {
522
532
  });
523
533
  return t;
524
534
  })(),
525
- onSetProperty: k || !V ? void 0 : K ? (e, t) => Ft((n) => ({
535
+ onSetProperty: D || !R ? void 0 : G ? (e, t) => Lt((n) => ({
526
536
  ...n,
527
537
  [e]: t
528
538
  })) : void 0,
529
539
  isPropertyPending: !1,
530
540
  objectStatuses: (() => {
531
- let e = Dt ?? [];
532
- if (!K || Object.keys(U).length === 0) return e.length > 0 ? e : void 0;
533
- let t = e.map((e) => U[e.group_code] === void 0 ? e : {
541
+ let e = At ?? [];
542
+ if (!G || Object.keys(B).length === 0) return e.length > 0 ? e : void 0;
543
+ let t = e.map((e) => B[e.group_code] === void 0 ? e : {
534
544
  ...e,
535
- status_code: U[e.group_code]
545
+ status_code: B[e.group_code]
536
546
  });
537
- for (let [r, i] of Object.entries(U)) e.some((e) => e.group_code === r) || t.push({
547
+ for (let [r, i] of Object.entries(B)) e.some((e) => e.group_code === r) || t.push({
538
548
  group_code: r,
539
549
  status_code: i,
540
550
  status_name: {},
@@ -542,144 +552,144 @@ function dt({ screenCode: r }) {
542
552
  });
543
553
  return t;
544
554
  })(),
545
- onSetStatus: k || !V ? void 0 : K ? (e, t) => Nt((n) => ({
555
+ onSetStatus: D || !R ? void 0 : G ? (e, t) => It((n) => ({
546
556
  ...n,
547
557
  [e]: t
548
558
  })) : void 0,
549
559
  isStatusPending: !1,
550
- pendingChildren: K ? W : void 0,
551
- onChildrenChange: K ? yn : void 0,
552
- childValidationErrors: K ? xn : void 0,
553
- fieldErrors: K && Bt ? pn : void 0,
554
- detailTabsPresentation: kn,
555
- relatedRecordsPresentation: On?.related_records
556
- }, jn = !!Y.sidebar && (k ? Y.sidebar.some((e) => tt(e, x, _?.entities ?? {})) : Y.sidebar.length > 0), Mn = On?.sidebar === "hidden", Nn = jn && !Mn && !y.isDesktop, Pn = jn && !Mn && y.isDesktop, Fn = !k && J ? /* @__PURE__ */ F(Ne, {
557
- screen: Y,
558
- entity: x,
559
- entityCode: S,
560
- record: J,
561
- refs: Jt,
562
- objectStatuses: Dt,
560
+ pendingChildren: G ? H : void 0,
561
+ onChildrenChange: G ? Sn : void 0,
562
+ childValidationErrors: G ? wn : void 0,
563
+ fieldErrors: G && Vt ? gn : void 0,
564
+ detailTabsPresentation: Mn,
565
+ relatedRecordsPresentation: jn?.related_records
566
+ }, Pn = !!J.sidebar && (D ? J.sidebar.some((e) => rt(e, y, _?.entities ?? {})) : J.sidebar.length > 0), Fn = jn?.sidebar === "hidden", In = Pn && !Fn && !ge.isDesktop, Ln = Pn && !Fn && ge.isDesktop, Rn = !D && q ? /* @__PURE__ */ M(Fe, {
567
+ screen: J,
568
+ entity: y,
569
+ entityCode: b,
570
+ record: q,
571
+ refs: Yt,
572
+ objectStatuses: At,
563
573
  schema: _
564
- }) : void 0, In = /* @__PURE__ */ F(mt, {
565
- title: En,
566
- editing: K,
567
- isNew: k,
568
- isRecordDeleted: Xt,
569
- dirty: _n,
570
- isSaving: Dn,
571
- hasChildErrors: Sn,
572
- hasFieldErrors: Bt && mn,
573
- canRestore: Et,
574
- entity: x,
575
- screen: Y,
574
+ }) : void 0, zn = /* @__PURE__ */ M(_t, {
575
+ title: kn,
576
+ editing: G,
577
+ isNew: D,
578
+ isRecordDeleted: Zt,
579
+ dirty: bn,
580
+ isSaving: An,
581
+ hasChildErrors: Tn,
582
+ hasFieldErrors: Vt && _n,
583
+ canRestore: kt,
584
+ entity: y,
585
+ screen: J,
576
586
  globalActions: _?.actions,
577
- entityCode: S,
578
- record: J,
579
- id: O,
580
- listRoute: Q,
581
- listRouteExists: !!ln,
582
- highlights: Fn,
583
- showBack: fn,
584
- onBack: dn.goBack,
585
- onCancelEdit: sn,
586
- onSave: vn,
587
- onRestore: bn,
588
- isRestoring: Ct.isPending,
587
+ entityCode: b,
588
+ record: q,
589
+ id: E,
590
+ listRoute: Z,
591
+ listRouteExists: !!pn,
592
+ highlights: Rn,
593
+ showBack: hn,
594
+ onBack: Q.goBack,
595
+ onCancelEdit: dn,
596
+ onSave: xn,
597
+ onRestore: Cn,
598
+ isRestoring: Et.isPending,
589
599
  refreshControl: {
590
- refetch: dt.refetch,
591
- isLoading: dt.isLoading,
592
- isLive: bt
600
+ refetch: mt.refetch,
601
+ isLoading: mt.isLoading,
602
+ isLive: Ct
593
603
  },
594
- isRealtimeEntity: x?.realtime === !0,
595
- canManageTemplates: _e(_)
596
- }), Ln = Xt && /* @__PURE__ */ F(gt, {
604
+ isRealtimeEntity: y?.realtime === !0,
605
+ canManageTemplates: ye(_)
606
+ }), Bn = Zt && /* @__PURE__ */ M(yt, {
597
607
  tone: "danger",
598
- children: o("record.deleted_banner", "This record was deleted on {date}", { date: t(String(J[x.soft_delete]), {
608
+ children: o("record.deleted_banner", "This record was deleted on {date}", { date: t(String(q[y.soft_delete]), {
599
609
  zone: o.timeZone,
600
- declared: !!(x.fields.get(x.soft_delete)?.timezone || x.default_timezone)
610
+ declared: !!(y.fields.get(y.soft_delete)?.timezone || y.default_timezone)
601
611
  }) })
602
- }), Rn = It && /* @__PURE__ */ F(gt, {
612
+ }), Vn = Rt && /* @__PURE__ */ M(yt, {
603
613
  tone: "warn",
604
614
  children: o("record.changed_on_server", "This record changed on the server while you were viewing or editing it.")
605
- }), zn = Tt && J ? _t(o, x, J, Jt) : void 0, Bn = Tt && /* @__PURE__ */ F(gt, {
615
+ }), Hn = Ot && q ? bt(o, y, q, Yt) : void 0, Un = Ot && /* @__PURE__ */ M(yt, {
606
616
  tone: "info",
607
617
  testId: "record-other-tenant-banner",
608
- children: zn ? o("record.other_tenant_banner_named", "This record is set in the tenant {tenant}. Change it from that tenant.", { tenant: zn }) : o("record.other_tenant_banner", "This record is set in another tenant. Change it from that tenant.")
609
- }), Vn = K && Bt && mn && /* @__PURE__ */ F(Me, {
610
- errors: Object.entries(pn).map(([e, t]) => {
611
- let n = x.fields.get(e);
618
+ children: Hn ? o("record.other_tenant_banner_named", "This record is set in the tenant {tenant}. Change it from that tenant.", { tenant: Hn }) : o("record.other_tenant_banner", "This record is set in another tenant. Change it from that tenant.")
619
+ }), Wn = G && Vt && _n && /* @__PURE__ */ M(Pe, {
620
+ errors: Object.entries(gn).map(([e, t]) => {
621
+ let n = y.fields.get(e);
612
622
  return {
613
623
  name: e,
614
- label: n ? w(o, n, e, _?.entities) : e,
624
+ label: n ? S(o, n, e, _?.entities) : e,
615
625
  message: t
616
626
  };
617
627
  }),
618
628
  onJump: (e) => {
619
- let t = document.getElementById(`${S}-${e}`);
629
+ let t = document.getElementById(`${b}-${e}`);
620
630
  t && (t.scrollIntoView({
621
631
  block: "center",
622
632
  behavior: "smooth"
623
633
  }), t.focus?.());
624
634
  }
625
- }), Hn = wt && !k && !(Y.items && Y.items.length > 0) && /* @__PURE__ */ F("div", {
635
+ }), Gn = Dt && !D && !(J.items && J.items.length > 0) && /* @__PURE__ */ M("div", {
626
636
  className: "mb-4",
627
- children: /* @__PURE__ */ F(Ie, {
628
- statusGroups: x.status_groups ?? {},
637
+ children: /* @__PURE__ */ M(Re, {
638
+ statusGroups: y.status_groups ?? {},
629
639
  objectStatuses: $.objectStatuses,
630
- onSetStatus: V && K ? (e, t) => Nt((n) => ({
640
+ onSetStatus: R && G ? (e, t) => It((n) => ({
631
641
  ...n,
632
642
  [e]: t
633
- })) : ot,
643
+ })) : lt,
634
644
  isPending: !1,
635
- mode: K ? "edit" : "display"
645
+ mode: G ? "edit" : "display"
636
646
  })
637
- }), Un = x.evidence_covered && !k && J && /* @__PURE__ */ F("div", {
647
+ }), Kn = y.evidence_covered && !D && q && /* @__PURE__ */ M("div", {
638
648
  className: "mb-4",
639
- children: /* @__PURE__ */ F(Le, { evidence: J.$evidence })
640
- }), Wn = /* @__PURE__ */ I(nt, { children: [
641
- An && (J || k) && /* @__PURE__ */ F(ft, {
642
- card: An,
643
- entity: x,
649
+ children: /* @__PURE__ */ M(ze, { evidence: q.$evidence })
650
+ }), qn = /* @__PURE__ */ N(at, { children: [
651
+ Nn && (q || D) && /* @__PURE__ */ M(ht, {
652
+ card: Nn,
653
+ entity: y,
644
654
  record: $.record,
645
655
  objectStatuses: $.objectStatuses,
646
656
  objectProperties: $.objectProperties
647
657
  }),
648
- Y.items && Y.items.length > 0 && (J || k) && _ && /* @__PURE__ */ F(E, {
649
- nodes: Y.items,
658
+ J.items && J.items.length > 0 && (q || D) && _ && /* @__PURE__ */ M(w, {
659
+ nodes: J.items,
650
660
  ctx: $
651
661
  }),
652
- !k && O && S && x.associations && Object.keys(x.associations).length > 0 && _ && /* @__PURE__ */ F(de, {
653
- entityCode: S,
654
- recordId: ut ?? O ?? "",
655
- associations: x.associations,
662
+ !D && E && b && y.associations && Object.keys(y.associations).length > 0 && _ && /* @__PURE__ */ M(de, {
663
+ entityCode: b,
664
+ recordId: pt ?? E ?? "",
665
+ associations: y.associations,
656
666
  schema: _
657
667
  }),
658
- !k && O && S && /* @__PURE__ */ F(ge, {
659
- entity: x,
660
- entityCode: S,
661
- objectId: ut ?? O,
668
+ !D && E && b && /* @__PURE__ */ M(ve, {
669
+ entity: y,
670
+ entityCode: b,
671
+ objectId: pt ?? E,
662
672
  schema: _
663
673
  }),
664
- !k && J && _ && /* @__PURE__ */ F(Fe, {
665
- screen: Y,
666
- entity: x,
667
- entityCode: S,
668
- record: J,
669
- recordId: ut ?? O,
670
- refs: Jt,
674
+ !D && q && _ && /* @__PURE__ */ M(Le, {
675
+ screen: J,
676
+ entity: y,
677
+ entityCode: b,
678
+ record: q,
679
+ recordId: pt ?? E,
680
+ refs: Yt,
671
681
  schema: _
672
682
  })
673
- ] }), Gn = /* @__PURE__ */ I(nt, { children: [
674
- In,
675
- Rn,
676
- Ln,
677
- Bn,
683
+ ] }), Jn = /* @__PURE__ */ N(at, { children: [
684
+ zn,
678
685
  Vn,
679
- Hn,
680
- Un
686
+ Bn,
687
+ Un,
688
+ Wn,
689
+ Gn,
690
+ Kn
681
691
  ] });
682
- return Pn ? /* @__PURE__ */ I("div", {
692
+ return Ln ? /* @__PURE__ */ N("div", {
683
693
  style: {
684
694
  height: "100%",
685
695
  display: "flex",
@@ -687,23 +697,23 @@ function dt({ screenCode: r }) {
687
697
  background: "var(--background)"
688
698
  },
689
699
  children: [
690
- /* @__PURE__ */ F("div", {
700
+ /* @__PURE__ */ M("div", {
691
701
  style: {
692
702
  flex: 1,
693
703
  minWidth: 0,
694
704
  height: "100%"
695
705
  },
696
- children: /* @__PURE__ */ F(ze, {
697
- scrollRef: Zt,
698
- header: Gn,
699
- children: Wn
706
+ children: /* @__PURE__ */ M(Ve, {
707
+ scrollRef: Qt,
708
+ header: Jn,
709
+ children: qn
700
710
  })
701
711
  }),
702
- /* @__PURE__ */ F("div", {
712
+ /* @__PURE__ */ M("div", {
703
713
  className: "detail-resize-handle",
704
- onMouseDown: qt,
714
+ onMouseDown: Jt,
705
715
  title: o("record.layout.drag_to_resize", "Drag to resize"),
706
- children: /* @__PURE__ */ F("div", { style: {
716
+ children: /* @__PURE__ */ M("div", { style: {
707
717
  position: "absolute",
708
718
  top: 0,
709
719
  bottom: 0,
@@ -713,23 +723,23 @@ function dt({ screenCode: r }) {
713
723
  background: "var(--border)"
714
724
  } })
715
725
  }),
716
- /* @__PURE__ */ F("div", {
717
- ref: Kt,
726
+ /* @__PURE__ */ M("div", {
727
+ ref: qt,
718
728
  style: {
719
729
  flexShrink: 0,
720
730
  height: "100%",
721
- width: `${Wt}px`
731
+ width: `${Gt}px`
722
732
  },
723
- children: (J || k) && _ && /* @__PURE__ */ F(E, {
724
- nodes: Y.sidebar,
733
+ children: (q || D) && _ && /* @__PURE__ */ M(w, {
734
+ nodes: J.sidebar,
725
735
  ctx: $
726
736
  })
727
737
  })
728
738
  ]
729
- }) : /* @__PURE__ */ I(ze, {
730
- scrollRef: Zt,
731
- header: Gn,
732
- children: [Wn, Nn && (J || k) && _ && /* @__PURE__ */ F("div", {
739
+ }) : /* @__PURE__ */ N(Ve, {
740
+ scrollRef: Qt,
741
+ header: Jn,
742
+ children: [qn, In && (q || D) && _ && /* @__PURE__ */ M("div", {
733
743
  "data-testid": "detail-sidebar-inline",
734
744
  style: {
735
745
  display: "flex",
@@ -737,25 +747,25 @@ function dt({ screenCode: r }) {
737
747
  gap: 16,
738
748
  minWidth: 0
739
749
  },
740
- children: /* @__PURE__ */ F(E, {
741
- nodes: Y.sidebar,
750
+ children: /* @__PURE__ */ M(w, {
751
+ nodes: J.sidebar,
742
752
  ctx: $
743
753
  })
744
754
  })]
745
755
  });
746
756
  }
747
- function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
748
- let a = Qe(), o = (e) => {
749
- let o = R(a, t, e, n, r, i);
750
- return o != null && D(o) !== "";
757
+ function ht({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
758
+ let a = et(), o = (e) => {
759
+ let o = F(a, t, e, n, r, i);
760
+ return o != null && T(o) !== "";
751
761
  }, s = (e) => {
752
- let o = R(a, t, e, n, r, i);
753
- return D(o) || /* @__PURE__ */ F("span", {
762
+ let o = F(a, t, e, n, r, i);
763
+ return T(o) || /* @__PURE__ */ M("span", {
754
764
  style: { color: "var(--text-3)" },
755
765
  children: "-"
756
766
  });
757
- }, c = e.titleUsesDisplay ? Te(a, n, t) : e.titleField ? R(a, t, e.titleField, n, r, i) : void 0, l = D(c) || a(t.display?.name) || a("record.fallback_title", "Record"), u = e.badgeFields.filter((t) => !e.hideEmptyFields || o(t)), ee = e.bodyFields.filter((t) => !e.hideEmptyFields || o(t)), d = e.metaFields.filter((t) => !e.hideEmptyFields || o(t));
758
- return /* @__PURE__ */ I("section", {
767
+ }, c = e.titleUsesDisplay ? De(a, n, t) : e.titleField ? F(a, t, e.titleField, n, r, i) : void 0, l = T(c) || a(t.display?.name) || a("record.fallback_title", "Record"), u = e.badgeFields.filter((t) => !e.hideEmptyFields || o(t)), ee = e.bodyFields.filter((t) => !e.hideEmptyFields || o(t)), d = e.metaFields.filter((t) => !e.hideEmptyFields || o(t));
768
+ return /* @__PURE__ */ N("section", {
759
769
  "data-testid": "detail-header-card",
760
770
  style: {
761
771
  width: "100%",
@@ -768,9 +778,9 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
768
778
  boxSizing: "border-box"
769
779
  },
770
780
  children: [
771
- /* @__PURE__ */ I("div", {
781
+ /* @__PURE__ */ N("div", {
772
782
  style: { minWidth: 0 },
773
- children: [/* @__PURE__ */ F("div", {
783
+ children: [/* @__PURE__ */ M("div", {
774
784
  style: {
775
785
  fontSize: 15,
776
786
  lineHeight: 1.25,
@@ -779,7 +789,7 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
779
789
  overflowWrap: "anywhere"
780
790
  },
781
791
  children: l
782
- }), e.subtitleField && /* @__PURE__ */ F("div", {
792
+ }), e.subtitleField && /* @__PURE__ */ M("div", {
783
793
  style: {
784
794
  marginTop: 4,
785
795
  fontSize: 12.5,
@@ -790,14 +800,14 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
790
800
  children: s(e.subtitleField)
791
801
  })]
792
802
  }),
793
- u.length > 0 && /* @__PURE__ */ F("div", {
803
+ u.length > 0 && /* @__PURE__ */ M("div", {
794
804
  style: {
795
805
  display: "flex",
796
806
  flexWrap: "wrap",
797
807
  gap: 6,
798
808
  marginTop: 10
799
809
  },
800
- children: u.map((e) => /* @__PURE__ */ F("span", {
810
+ children: u.map((e) => /* @__PURE__ */ M("span", {
801
811
  style: {
802
812
  minWidth: 0,
803
813
  maxWidth: "100%",
@@ -812,7 +822,7 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
812
822
  children: s(e)
813
823
  }, e))
814
824
  }),
815
- ee.length > 0 && /* @__PURE__ */ F("dl", {
825
+ ee.length > 0 && /* @__PURE__ */ M("dl", {
816
826
  style: {
817
827
  display: "grid",
818
828
  gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
@@ -821,12 +831,12 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
821
831
  fontSize: 12.5,
822
832
  lineHeight: 1.35
823
833
  },
824
- children: ee.map((e) => /* @__PURE__ */ I("div", {
834
+ children: ee.map((e) => /* @__PURE__ */ N("div", {
825
835
  style: { display: "contents" },
826
- children: [/* @__PURE__ */ F("dt", {
836
+ children: [/* @__PURE__ */ M("dt", {
827
837
  style: { color: "var(--text-3)" },
828
- children: pt(a, t, e)
829
- }), /* @__PURE__ */ F("dd", {
838
+ children: gt(a, t, e)
839
+ }), /* @__PURE__ */ M("dd", {
830
840
  style: {
831
841
  margin: 0,
832
842
  color: "var(--text-2)",
@@ -837,7 +847,7 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
837
847
  })]
838
848
  }, e))
839
849
  }),
840
- d.length > 0 && /* @__PURE__ */ F("div", {
850
+ d.length > 0 && /* @__PURE__ */ M("div", {
841
851
  style: {
842
852
  display: "flex",
843
853
  flexWrap: "wrap",
@@ -846,13 +856,13 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
846
856
  color: "var(--text-3)",
847
857
  fontSize: 11.5
848
858
  },
849
- children: d.map((e) => /* @__PURE__ */ I("span", {
859
+ children: d.map((e) => /* @__PURE__ */ N("span", {
850
860
  style: {
851
861
  minWidth: 0,
852
862
  overflowWrap: "anywhere"
853
863
  },
854
864
  children: [
855
- pt(a, t, e),
865
+ gt(a, t, e),
856
866
  ": ",
857
867
  s(e)
858
868
  ]
@@ -861,7 +871,7 @@ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
861
871
  ]
862
872
  });
863
873
  }
864
- function R(e, t, n, r, i, a) {
874
+ function F(e, t, n, r, i, a) {
865
875
  if (n.startsWith("$status.")) {
866
876
  let t = n.slice(8), r = i?.find((e) => e.group_code === t);
867
877
  return e(r?.status_name) || r?.status_code;
@@ -870,16 +880,16 @@ function R(e, t, n, r, i, a) {
870
880
  let e = n.slice(10);
871
881
  return a?.find((t) => t.property_code === e)?.value;
872
882
  }
873
- return Xe(t, r, n);
883
+ return Qe(t, r, n);
874
884
  }
875
- function pt(e, t, n) {
885
+ function gt(e, t, n) {
876
886
  if (n.startsWith("$status.")) return n.slice(8);
877
887
  if (n.startsWith("$property.")) return n.slice(10);
878
888
  let r = t.fields.get(n);
879
- return r ? w(e, r, n) : n;
889
+ return r ? S(e, r, n) : n;
880
890
  }
881
- function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSaving: c, hasChildErrors: l, hasFieldErrors: u, canRestore: ee, entity: d, screen: f, globalActions: p, entityCode: te, record: m, id: h, listRoute: ie, listRouteExists: ae, highlights: se, showBack: ce, onBack: de, onCancelEdit: fe, onSave: me, onRestore: ge, isRestoring: _e, refreshControl: ve, isRealtimeEntity: ye, canManageTemplates: xe }) {
882
- let C = Qe(), Se = Qe("errors"), Ce = $e(d), { run: we } = le(), w = oe("detail"), Te = S(), Ee = be(), De = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail_toolbar"), Oe = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail"), ke = pe(C, Oe, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), T = pe(C, De, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), Ae = M(() => {
891
+ function _t({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSaving: c, hasChildErrors: l, hasFieldErrors: u, canRestore: ee, entity: d, screen: f, globalActions: p, entityCode: te, record: m, id: h, listRoute: ie, listRouteExists: ae, highlights: se, showBack: ce, onBack: de, onCancelEdit: fe, onSave: me, onRestore: ve, isRestoring: ye, refreshControl: be, isRealtimeEntity: xe, canManageTemplates: Ce }) {
892
+ let x = et(), we = et("errors"), Te = tt(d), { run: Ee } = le(), S = oe("detail"), De = b(), Oe = Se(), ke = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail_toolbar"), Ae = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail"), je = pe(x, Ae, d?.actions, p, m ?? {}, [], Te, he(d, m ?? {})), C = pe(x, ke, d?.actions, p, m ?? {}, [], Te, he(d, m ?? {})), Me = A(() => {
883
893
  if (!d) return;
884
894
  let e = h ? [h] : [];
885
895
  return {
@@ -889,8 +899,8 @@ function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSa
889
899
  screenRoute: f?.route ?? "",
890
900
  selectedRows: m ? [m] : [],
891
901
  selectedIds: e,
892
- t: C,
893
- tabNavigate: (e, t) => Te(e, {
902
+ t: x,
903
+ tabNavigate: (e, t) => De(e, {
894
904
  title: t?.title,
895
905
  icon: t?.icon,
896
906
  search: t?.search
@@ -904,34 +914,34 @@ function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSa
904
914
  f,
905
915
  h,
906
916
  m,
907
- C,
908
- Te
909
- ]), je = (e, t) => {
910
- let n = v(Se, e, t, { row: m ?? void 0 });
917
+ x,
918
+ De
919
+ ]), Ne = (e, t) => {
920
+ let n = v(we, e, t, { row: m ?? void 0 });
911
921
  if (n === null) return;
912
922
  let r = h ? [h] : [], i = e === "__delete" && ae ? ie : null;
913
- return we({
923
+ return Ee({
914
924
  action: t,
915
- title: C(t.display?.name) || e,
925
+ title: x(t.display?.name) || e,
916
926
  row: m ?? void 0,
917
927
  execute: (e) => ue(n, g(e, r)),
918
928
  onSuccess: i ? () => {
919
- re.getState().kill(ne(location)), Ee(i, { replace: !0 });
929
+ re.getState().kill(ne(location)), Oe(i, { replace: !0 });
920
930
  } : void 0
921
931
  });
922
- }, E = w.isVisible("show_actions") && !n && h && ke.length > 0 ? /* @__PURE__ */ F(y, {
923
- layout: ke,
932
+ }, w = S.isVisible("show_actions") && !n && h && je.length > 0 ? /* @__PURE__ */ M(ge, {
933
+ layout: je,
924
934
  row: m,
925
- onRun: je,
935
+ onRun: Ne,
926
936
  kind: "detail",
927
937
  entityActions: d?.actions,
928
938
  globalActions: p,
929
939
  reservedRightWidth: 0,
930
- widgetContext: Ae
931
- }) : null, Me = !n && h ? /* @__PURE__ */ F(b, {
932
- liveObject: ve,
933
- realtime: ye
934
- }) : null, Ne = w.isVisible("show_actions") && !n && h && T.length > 0 ? /* @__PURE__ */ I("div", {
940
+ widgetContext: Me
941
+ }) : null, Pe = !n && h ? /* @__PURE__ */ M(_e, {
942
+ liveObject: be,
943
+ realtime: xe
944
+ }) : null, Fe = S.isVisible("show_actions") && !n && h && C.length > 0 ? /* @__PURE__ */ N("div", {
935
945
  style: {
936
946
  display: "flex",
937
947
  justifyContent: "flex-end",
@@ -939,63 +949,63 @@ function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSa
939
949
  gap: 8,
940
950
  marginTop: 10
941
951
  },
942
- children: [E ? null : Me, /* @__PURE__ */ F(y, {
943
- layout: T,
952
+ children: [w ? null : Pe, /* @__PURE__ */ M(ge, {
953
+ layout: C,
944
954
  row: m,
945
- onRun: je,
955
+ onRun: Ne,
946
956
  kind: "detail",
947
957
  entityActions: d?.actions,
948
958
  globalActions: p,
949
959
  reservedRightWidth: 0,
950
- widgetContext: Ae,
951
- ariaLabel: E ? C("record.toolbar_actions", "Detail toolbar actions") : C("record.page_actions", "Page actions")
960
+ widgetContext: Me,
961
+ ariaLabel: w ? x("record.toolbar_actions", "Detail toolbar actions") : x("record.page_actions", "Page actions")
952
962
  })]
953
- }) : null, Pe = w.isVisible("show_actions") && !n && h && te ? /* @__PURE__ */ F(x, {
963
+ }) : null, Ie = S.isVisible("show_actions") && !n && h && te ? /* @__PURE__ */ M(y, {
954
964
  entityCode: te,
955
965
  scope: "detail",
956
966
  objectIds: [h],
957
967
  capability: d?.documents,
958
- canManageTemplates: xe
959
- }) : null, Fe = a ? ee ? /* @__PURE__ */ F(r, {
968
+ canManageTemplates: Ce
969
+ }) : null, Le = a ? ee ? /* @__PURE__ */ M(r, {
960
970
  kind: "primary",
961
- icon: F(_e ? o : i.refresh, { size: 13 }),
962
- onClick: ge,
963
- disabled: _e,
964
- children: _e ? C("record.restoring", "Restoring…") : C("record.restore", "Restore")
965
- }) : null : t ? /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(r, {
966
- icon: /* @__PURE__ */ F(i.x, { size: 13 }),
971
+ icon: M(ye ? o : i.refresh, { size: 13 }),
972
+ onClick: ve,
973
+ disabled: ye,
974
+ children: ye ? x("record.restoring", "Restoring…") : x("record.restore", "Restore")
975
+ }) : null : t ? /* @__PURE__ */ N(at, { children: [/* @__PURE__ */ M(r, {
976
+ icon: /* @__PURE__ */ M(i.x, { size: 13 }),
967
977
  onClick: fe,
968
978
  disabled: c,
969
- children: C("dialog.cancel", "Cancel")
970
- }), /* @__PURE__ */ F(r, {
979
+ children: x("dialog.cancel", "Cancel")
980
+ }), /* @__PURE__ */ M(r, {
971
981
  kind: "primary",
972
- icon: F(c ? o : i.save, { size: 13 }),
982
+ icon: M(c ? o : i.save, { size: 13 }),
973
983
  onClick: me,
974
984
  disabled: c || l || u,
975
- title: l ? C("record.save.fix_child_rows", "Fix errors in child rows") : u ? C("record.save.fix_fields", "Fix the highlighted fields") : void 0,
976
- children: c ? C("dialog.saving", "Saving…") : C("dialog.save", "Save")
977
- })] }) : !n && h ? E ? /* @__PURE__ */ I("span", {
985
+ title: l ? x("record.save.fix_child_rows", "Fix errors in child rows") : u ? x("record.save.fix_fields", "Fix the highlighted fields") : void 0,
986
+ children: c ? x("dialog.saving", "Saving…") : x("dialog.save", "Save")
987
+ })] }) : !n && h ? w ? /* @__PURE__ */ N("span", {
978
988
  style: { display: "contents" },
979
- children: [Pe, E]
980
- }) : Pe : null;
981
- return /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(Re, {
982
- icon: d?.display.icon ? /* @__PURE__ */ F(Be, {
989
+ children: [Ie, w]
990
+ }) : Ie : null;
991
+ return /* @__PURE__ */ N(at, { children: [/* @__PURE__ */ M(Be, {
992
+ icon: d?.display.icon ? /* @__PURE__ */ M(He, {
983
993
  name: d.display.icon,
984
994
  size: 16
985
995
  }) : void 0,
986
996
  title: e,
987
- description: C(f?.display?.description) || C(d?.display?.description),
997
+ description: x(f?.display?.description) || x(d?.display?.description),
988
998
  highlights: se,
989
- identityControls: !a && !t && !n ? Me : null,
999
+ identityControls: !a && !t && !n ? Pe : null,
990
1000
  mode: n ? "create" : t ? "edit" : "display",
991
1001
  dirty: s,
992
1002
  showBack: ce,
993
1003
  onBack: de,
994
- right: Fe,
995
- showTitle: w.isVisible("show_title")
996
- }), Ne] });
1004
+ right: Le,
1005
+ showTitle: S.isVisible("show_title")
1006
+ }), Fe] });
997
1007
  }
998
- var ht = {
1008
+ var vt = {
999
1009
  danger: {
1000
1010
  border: "var(--danger)",
1001
1011
  background: "var(--danger-soft)",
@@ -1012,9 +1022,9 @@ var ht = {
1012
1022
  color: "var(--accent)"
1013
1023
  }
1014
1024
  };
1015
- function gt({ tone: e, testId: t, children: n }) {
1016
- let r = ht[e];
1017
- return /* @__PURE__ */ I("div", {
1025
+ function yt({ tone: e, testId: t, children: n }) {
1026
+ let r = vt[e];
1027
+ return /* @__PURE__ */ N("div", {
1018
1028
  "data-testid": t,
1019
1029
  style: {
1020
1030
  display: "flex",
@@ -1028,13 +1038,13 @@ function gt({ tone: e, testId: t, children: n }) {
1028
1038
  color: r.color,
1029
1039
  fontSize: 12.5
1030
1040
  },
1031
- children: [F(e === "info" ? i.info : i.warning, { size: 14 }), /* @__PURE__ */ F("span", { children: n })]
1041
+ children: [M(e === "info" ? i.info : i.warning, { size: 14 }), /* @__PURE__ */ M("span", { children: n })]
1032
1042
  });
1033
1043
  }
1034
- function _t(e, t, n, r) {
1044
+ function bt(e, t, n, r) {
1035
1045
  let i = t.tenant_key, a = i ? t.fields.get(i) : void 0;
1036
1046
  if (!i || !a?.ref?.entity) return;
1037
1047
  let o = r?.[a.ref.entity]?.[String(n[i])];
1038
- if (o) return T(e, o, a.display?.ref_display_field || "$display", "") || void 0;
1048
+ if (o) return C(e, o, a.display?.ref_display_field || "$display", "") || void 0;
1039
1049
  }
1040
- export { ut as SmartDetailPage };
1050
+ export { pt as SmartDetailPage };