@declarion/react 0.45.0 → 0.48.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.
- package/dist-lib/{DraggableChildrenTable-BDnJK0AU.js → DraggableChildrenTable-p2ZSdwzj.js} +2 -2
- package/dist-lib/{DynamicIcon-DeRpAaXm.js → DynamicIcon-Dc2j-rg_.js} +19 -17
- package/dist-lib/{Grid-CcCveEE7.js → Grid-CjLFAKMZ.js} +2 -2
- package/dist-lib/{LayoutRenderer-BReuhVdX.js → LayoutRenderer-X3p4yfo_.js} +598 -585
- package/dist-lib/{MarkdownRenderer-DPKDFR60.js → MarkdownRenderer-Sb7zcvj0.js} +10 -10
- package/dist-lib/{RefreshControl-KddgOhUG.js → RefreshControl-Cnl9nE0x.js} +268 -238
- package/dist-lib/{SmartDetailPage.impl-D_hMxiHy.js → SmartDetailPage.impl-bb0UNOII.js} +545 -532
- package/dist-lib/{SmartRecordListPage.impl-GIo_mPIJ.js → SmartRecordListPage.impl-BFh8auUZ.js} +171 -158
- package/dist-lib/api/agents.d.ts +47 -18
- package/dist-lib/components/agents/AgentChatPanel.d.ts +7 -1
- package/dist-lib/components/agents/AgentPicker.d.ts +9 -0
- package/dist-lib/components/agents/transcript-runs.d.ts +29 -0
- package/dist-lib/components/file-widgets/host.d.ts +1 -0
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +4 -2
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -1
- package/dist-lib/components/primitives/Tooltip.d.ts +4 -0
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +10 -5
- package/dist-lib/components/shared/RowActionsKebab.d.ts +3 -2
- package/dist-lib/components/views/ViewSwitcher.d.ts +2 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useAgentConversation.d.ts +10 -24
- package/dist-lib/hooks/useBrandingChrome.d.ts +11 -0
- package/dist-lib/hooks/useFilters.d.ts +1 -0
- package/dist-lib/hooks/useLongPress.d.ts +29 -0
- package/dist-lib/hooks/useResponsiveMode.d.ts +2 -21
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.d.ts +10 -3
- package/dist-lib/index.js +3305 -2741
- package/dist-lib/lib/actions.d.ts +13 -5
- package/dist-lib/lib/filter-evaluator.d.ts +16 -0
- package/dist-lib/lib/filters.d.ts +10 -4
- package/dist-lib/lib/longPressGesture.d.ts +55 -0
- package/dist-lib/lib/messages.d.ts +1 -0
- package/dist-lib/lib/page-inset.d.ts +3 -0
- package/dist-lib/lib/variants.d.ts +7 -0
- package/dist-lib/lib/viewport-category.d.ts +44 -0
- package/dist-lib/{registry-DJKp0yaV.js → registry-CWDnxiLJ.js} +1291 -1008
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +15 -2
- package/dist-lib/types/schema.d.ts +26 -0
- package/dist-lib/{useCurrentScreen-A3xZDs7U.js → useCurrentScreen-BshVTPVq.js} +1124 -1088
- package/dist-lib/{useProperties-TlltWwLv.js → useProperties-B5p9mIH8.js} +92 -61
- package/dist-lib/{value-CHY7LgZ-.js → value-B1O6QikE.js} +1 -1
- package/dist-lib/vite/index.js +23 -22
- package/package.json +12 -12
- package/dist-lib/components/agents/AgentVisualHints.d.ts +0 -6
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { s as e, t } from "./DynamicIcon-
|
|
2
|
-
import { $ as n, A as r, At as i, C as a, Cn as o, Ct as s, D as c, Dn as l, F as u, Fn as d, In as f, L as p, Ln as m, N as h, Q as g, Sn as _, Tn as v, Zn as y, _ as b, bn as x, bt as S, cr as C, dt as ee, gt as w, i as T, it as te, j as ne, jt as re, kn as ie, lr as ae, pt as oe,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { useLocation as
|
|
9
|
-
import { useQuery as
|
|
10
|
-
import { Fragment as
|
|
1
|
+
import { s as e, t } from "./DynamicIcon-Dc2j-rg_.js";
|
|
2
|
+
import { $ as n, A as r, At as i, C as a, Cn as o, Ct as s, D as c, Dn as l, F as u, Fn as d, In as f, L as p, Ln as m, N as h, Q as g, Sn as _, Tn as v, Zn as y, _ as b, bn as x, bt as S, cr as C, dt as ee, gt as w, i as T, it as te, j as ne, jt as re, kn as ie, lr as ae, pt as oe, tr as se, un as ce, ur as E, wn as le, wt as D, xn as ue, yn as de } from "./useCurrentScreen-BshVTPVq.js";
|
|
3
|
+
import { D as fe, H as O, R as k, T as pe, c as me, d as he, f as A, h as ge, n as j, o as _e, r as ve, t as ye, v as M, x as be, z as xe } from "./RefreshControl-Cnl9nE0x.js";
|
|
4
|
+
import { $ as Se, A as Ce, D as we, H as Te, L as Ee, M as De, P as Oe, Q as ke, St as Ae, T as je, U as Me, X as Ne, Z as Pe, a as Fe, dt as Ie, et as Le, ft as Re, i as ze, k as Be, nt as Ve, s as He, tt as Ue, v as We, vt as Ge, z as Ke } from "./registry-CWDnxiLJ.js";
|
|
5
|
+
import { n as qe, r as Je, t as N } from "./dataTableStyles-vwD1mVOP.js";
|
|
6
|
+
import { n as Ye, t as Xe } from "./LayoutRenderer-X3p4yfo_.js";
|
|
7
|
+
import { Fragment as Ze, useCallback as P, useEffect as F, useMemo as I, useRef as Qe, useState as L } from "react";
|
|
8
|
+
import { useLocation as $e, useParams as et, useSearchParams as tt } from "react-router";
|
|
9
|
+
import { useQuery as R, useQueryClient as nt } from "@tanstack/react-query";
|
|
10
|
+
import { Fragment as rt, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/shared/AssociationTabs.tsx
|
|
12
|
-
function
|
|
13
|
-
let a =
|
|
12
|
+
function it({ entityCode: e, recordId: n, associations: r, schema: i }) {
|
|
13
|
+
let a = I(() => Object.entries(r), [r]), [o, s] = L(0);
|
|
14
14
|
if (a.length === 0) return null;
|
|
15
15
|
let [c, l] = a[o];
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
title: /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ z(Ae, {
|
|
17
|
+
title: /* @__PURE__ */ z("div", {
|
|
18
18
|
style: {
|
|
19
19
|
display: "flex",
|
|
20
20
|
alignItems: "center",
|
|
@@ -25,7 +25,7 @@ function nt({ entityCode: e, recordId: n, associations: r, schema: i }) {
|
|
|
25
25
|
},
|
|
26
26
|
children: a.map(([e, n], r) => {
|
|
27
27
|
let i = r === o;
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ B("button", {
|
|
29
29
|
onClick: (e) => {
|
|
30
30
|
e.stopPropagation(), s(r);
|
|
31
31
|
},
|
|
@@ -43,7 +43,7 @@ function nt({ entityCode: e, recordId: n, associations: r, schema: i }) {
|
|
|
43
43
|
cursor: "pointer",
|
|
44
44
|
fontWeight: i ? 600 : 500
|
|
45
45
|
},
|
|
46
|
-
children: [n.display?.icon && /* @__PURE__ */
|
|
46
|
+
children: [n.display?.icon && /* @__PURE__ */ z(t, {
|
|
47
47
|
name: n.display.icon,
|
|
48
48
|
size: 13
|
|
49
49
|
}), v(n.display?.name) || e]
|
|
@@ -52,7 +52,7 @@ function nt({ entityCode: e, recordId: n, associations: r, schema: i }) {
|
|
|
52
52
|
}),
|
|
53
53
|
collapsible: !1,
|
|
54
54
|
padding: "0",
|
|
55
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ z(V, {
|
|
56
56
|
entityCode: e,
|
|
57
57
|
recordId: n,
|
|
58
58
|
assocKey: c,
|
|
@@ -61,15 +61,15 @@ function nt({ entityCode: e, recordId: n, associations: r, schema: i }) {
|
|
|
61
61
|
})
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let l =
|
|
64
|
+
function V({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c }) {
|
|
65
|
+
let l = Re(), u = r(), d = `${t}.${i}`, { data: f, isLoading: p } = R({
|
|
66
66
|
queryKey: [
|
|
67
67
|
"association",
|
|
68
68
|
d,
|
|
69
69
|
n
|
|
70
70
|
],
|
|
71
71
|
queryFn: () => D(d, [n])
|
|
72
|
-
}), m = f?.target_entity ?? o.target, h = c.entities[m], g =
|
|
72
|
+
}), m = f?.target_entity ?? o.target, h = c.entities[m], g = I(() => f?.ids ?? [], [f?.ids]), y = I(() => h?.fields.names().find((e) => h.fields.get(e)?.primary) ?? "id", [h]), b = I(() => g.slice(0, 50), [g]), { data: x, isLoading: S } = R({
|
|
73
73
|
queryKey: [
|
|
74
74
|
"association-records",
|
|
75
75
|
m,
|
|
@@ -84,7 +84,7 @@ function rt({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c
|
|
|
84
84
|
}]
|
|
85
85
|
}),
|
|
86
86
|
enabled: b.length > 0 && !!h
|
|
87
|
-
}), C = x?.data ?? [], ee = x?.$refs, w =
|
|
87
|
+
}), C = x?.data ?? [], ee = x?.$refs, w = I(() => h ? h.fields.names().filter((e) => {
|
|
88
88
|
let t = h.fields.get(e);
|
|
89
89
|
return t && !t.primary && !t.auto && t.display?.is_listable !== !1;
|
|
90
90
|
}).slice(0, 6) : [], [h]), T = () => {
|
|
@@ -105,31 +105,31 @@ function rt({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c
|
|
|
105
105
|
color: "var(--text-3)",
|
|
106
106
|
padding: "14px 16px"
|
|
107
107
|
};
|
|
108
|
-
if (p || S) return /* @__PURE__ */
|
|
108
|
+
if (p || S) return /* @__PURE__ */ z("div", {
|
|
109
109
|
style: te,
|
|
110
110
|
children: "Loading…"
|
|
111
111
|
});
|
|
112
|
-
if (!h) return /* @__PURE__ */
|
|
112
|
+
if (!h) return /* @__PURE__ */ z("div", {
|
|
113
113
|
style: te,
|
|
114
114
|
children: "Entity not found."
|
|
115
115
|
});
|
|
116
|
-
if (g.length === 0) return /* @__PURE__ */
|
|
116
|
+
if (g.length === 0) return /* @__PURE__ */ z("div", {
|
|
117
117
|
style: te,
|
|
118
118
|
children: "No related records."
|
|
119
119
|
});
|
|
120
120
|
let re = a(c, m);
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ B("div", {
|
|
122
122
|
style: { padding: "8px 0" },
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
style:
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
-
style:
|
|
124
|
+
/* @__PURE__ */ B("table", {
|
|
125
|
+
style: Je,
|
|
126
|
+
children: [/* @__PURE__ */ z("thead", { children: /* @__PURE__ */ z("tr", { children: w.map((e) => /* @__PURE__ */ z("th", {
|
|
127
|
+
style: qe,
|
|
128
128
|
children: _(h.fields.get(e), e, c.entities)
|
|
129
|
-
}, e)) }) }), /* @__PURE__ */
|
|
129
|
+
}, e)) }) }), /* @__PURE__ */ z("tbody", { children: C.map((e, t) => /* @__PURE__ */ z("tr", { children: w.map((t) => {
|
|
130
130
|
let n = h.fields.get(t);
|
|
131
|
-
return n ? /* @__PURE__ */
|
|
132
|
-
style:
|
|
131
|
+
return n ? /* @__PURE__ */ z("td", {
|
|
132
|
+
style: N,
|
|
133
133
|
children: ne({
|
|
134
134
|
field: n,
|
|
135
135
|
fieldName: t,
|
|
@@ -139,16 +139,16 @@ function rt({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c
|
|
|
139
139
|
refs: ee,
|
|
140
140
|
locale: u
|
|
141
141
|
})
|
|
142
|
-
}, t) : /* @__PURE__ */
|
|
142
|
+
}, t) : /* @__PURE__ */ z("td", {}, t);
|
|
143
143
|
}) }, t)) })]
|
|
144
144
|
}),
|
|
145
|
-
re && f && f.count > C.length && /* @__PURE__ */
|
|
145
|
+
re && f && f.count > C.length && /* @__PURE__ */ z("div", {
|
|
146
146
|
style: {
|
|
147
147
|
padding: "10px 16px",
|
|
148
148
|
textAlign: "center"
|
|
149
149
|
},
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
icon: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ B(E, {
|
|
151
|
+
icon: /* @__PURE__ */ z(e.external, { size: 12 }),
|
|
152
152
|
onClick: T,
|
|
153
153
|
children: [
|
|
154
154
|
"View all ",
|
|
@@ -157,14 +157,14 @@ function rt({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c
|
|
|
157
157
|
]
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
re && C.length > 0 && f && f.count <= C.length && /* @__PURE__ */
|
|
160
|
+
re && C.length > 0 && f && f.count <= C.length && /* @__PURE__ */ z("div", {
|
|
161
161
|
style: {
|
|
162
162
|
padding: "10px 16px",
|
|
163
163
|
textAlign: "center"
|
|
164
164
|
},
|
|
165
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ z(E, {
|
|
166
166
|
kind: "ghost",
|
|
167
|
-
icon: /* @__PURE__ */
|
|
167
|
+
icon: /* @__PURE__ */ z(e.external, { size: 12 }),
|
|
168
168
|
onClick: T,
|
|
169
169
|
children: "Open in list view"
|
|
170
170
|
})
|
|
@@ -174,14 +174,14 @@ function rt({ entityCode: t, recordId: n, assocKey: i, association: o, schema: c
|
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/components/pages/RecordDocumentsPanel.tsx
|
|
177
|
-
var
|
|
178
|
-
function
|
|
179
|
-
return e?.some((e) => e.status === "pending") ?
|
|
177
|
+
var H = 4e3;
|
|
178
|
+
function U(e) {
|
|
179
|
+
return e?.some((e) => e.status === "pending") ? H : !1;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
let { data: a, isLoading: o, error: s } =
|
|
181
|
+
function at({ entityCode: t, objectId: n, canGenerateOne: r, canManageTemplates: i }) {
|
|
182
|
+
let { data: a, isLoading: o, error: s } = R({
|
|
183
183
|
queryKey: [
|
|
184
|
-
|
|
184
|
+
M,
|
|
185
185
|
t,
|
|
186
186
|
n
|
|
187
187
|
],
|
|
@@ -190,31 +190,31 @@ function it({ entityCode: t, objectId: n, canGenerateOne: r, canManageTemplates:
|
|
|
190
190
|
object_id: n
|
|
191
191
|
})).result?.documents ?? [],
|
|
192
192
|
enabled: !!(t && n) && (!!r || !!i),
|
|
193
|
-
refetchInterval: (e) =>
|
|
193
|
+
refetchInterval: (e) => U(e.state.data)
|
|
194
194
|
}), c = (a?.length ?? 0) > 0;
|
|
195
|
-
return !r && !c ? null : /* @__PURE__ */
|
|
196
|
-
title: /* @__PURE__ */
|
|
195
|
+
return !r && !c ? null : /* @__PURE__ */ B(Ae, {
|
|
196
|
+
title: /* @__PURE__ */ z(ot, {}),
|
|
197
197
|
collapsible: !1,
|
|
198
198
|
padding: "0",
|
|
199
199
|
children: [
|
|
200
|
-
o && /* @__PURE__ */
|
|
201
|
-
icon: /* @__PURE__ */
|
|
200
|
+
o && /* @__PURE__ */ z(G, {
|
|
201
|
+
icon: /* @__PURE__ */ z(e.loader, { size: 14 }),
|
|
202
202
|
text: "Loading documents..."
|
|
203
203
|
}),
|
|
204
|
-
s && /* @__PURE__ */
|
|
205
|
-
icon: /* @__PURE__ */
|
|
204
|
+
s && /* @__PURE__ */ z(G, {
|
|
205
|
+
icon: /* @__PURE__ */ z(e.warning, { size: 14 }),
|
|
206
206
|
text: s instanceof Error ? s.message : String(s)
|
|
207
207
|
}),
|
|
208
|
-
!o && !s && (a?.length ?? 0) === 0 && /* @__PURE__ */
|
|
209
|
-
icon: /* @__PURE__ */
|
|
208
|
+
!o && !s && (a?.length ?? 0) === 0 && /* @__PURE__ */ z(G, {
|
|
209
|
+
icon: /* @__PURE__ */ z(e.file, { size: 14 }),
|
|
210
210
|
text: "No generated documents"
|
|
211
211
|
}),
|
|
212
|
-
!o && !s && a && a.length > 0 && /* @__PURE__ */
|
|
212
|
+
!o && !s && a && a.length > 0 && /* @__PURE__ */ z("div", {
|
|
213
213
|
style: {
|
|
214
214
|
display: "flex",
|
|
215
215
|
flexDirection: "column"
|
|
216
216
|
},
|
|
217
|
-
children: a.map((e) => /* @__PURE__ */
|
|
217
|
+
children: a.map((e) => /* @__PURE__ */ z(W, {
|
|
218
218
|
entityCode: t,
|
|
219
219
|
objectId: n,
|
|
220
220
|
doc: e
|
|
@@ -223,8 +223,8 @@ function it({ entityCode: t, objectId: n, canGenerateOne: r, canManageTemplates:
|
|
|
223
223
|
]
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
return /* @__PURE__ */
|
|
226
|
+
function ot() {
|
|
227
|
+
return /* @__PURE__ */ B("div", {
|
|
228
228
|
style: {
|
|
229
229
|
display: "flex",
|
|
230
230
|
alignItems: "center",
|
|
@@ -235,11 +235,11 @@ function H() {
|
|
|
235
235
|
fontWeight: 600,
|
|
236
236
|
color: "var(--text)"
|
|
237
237
|
},
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ z(e.file, { size: 13 }), "Documents"]
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
let a =
|
|
241
|
+
function W({ entityCode: t, objectId: r, doc: i }) {
|
|
242
|
+
let a = nt(), [o, s] = L(!1), [c, l] = L(!1), [u, d] = L(!1), [f, p] = L(!1), [m, h] = L(null), _ = v(i.title) || i.filename || i.template_code, y = i.status === "ready" && i.download_url && !f;
|
|
243
243
|
async function b() {
|
|
244
244
|
s(!0), h(null);
|
|
245
245
|
try {
|
|
@@ -275,7 +275,7 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
275
275
|
template_source: i.template_source,
|
|
276
276
|
output_format: i.output_format
|
|
277
277
|
}), await a.invalidateQueries({ queryKey: [
|
|
278
|
-
|
|
278
|
+
M,
|
|
279
279
|
t,
|
|
280
280
|
r
|
|
281
281
|
] });
|
|
@@ -285,7 +285,7 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
285
285
|
d(!1);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ B("div", {
|
|
289
289
|
style: {
|
|
290
290
|
display: "grid",
|
|
291
291
|
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
@@ -294,10 +294,10 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
294
294
|
padding: "11px 14px",
|
|
295
295
|
borderTop: "1px solid var(--divider)"
|
|
296
296
|
},
|
|
297
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ B("div", {
|
|
298
298
|
style: { minWidth: 0 },
|
|
299
299
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ z("div", {
|
|
301
301
|
style: {
|
|
302
302
|
fontSize: 13,
|
|
303
303
|
fontWeight: 600,
|
|
@@ -308,7 +308,7 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
308
308
|
},
|
|
309
309
|
children: _
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ B("div", {
|
|
312
312
|
style: {
|
|
313
313
|
marginTop: 3,
|
|
314
314
|
display: "flex",
|
|
@@ -318,12 +318,12 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
318
318
|
fontSize: 11.5
|
|
319
319
|
},
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ z("span", { children: i.output_format.toUpperCase() }),
|
|
322
|
+
/* @__PURE__ */ z("span", { children: f ? "artifact unavailable" : i.status }),
|
|
323
|
+
/* @__PURE__ */ z("span", { children: i.ready_at || i.created_at })
|
|
324
324
|
]
|
|
325
325
|
}),
|
|
326
|
-
i.status === "failed" && i.error_text && /* @__PURE__ */
|
|
326
|
+
i.status === "failed" && i.error_text && /* @__PURE__ */ z("div", {
|
|
327
327
|
style: {
|
|
328
328
|
marginTop: 5,
|
|
329
329
|
color: "var(--danger)",
|
|
@@ -331,7 +331,7 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
331
331
|
},
|
|
332
332
|
children: i.error_text
|
|
333
333
|
}),
|
|
334
|
-
m && /* @__PURE__ */
|
|
334
|
+
m && /* @__PURE__ */ z("div", {
|
|
335
335
|
style: {
|
|
336
336
|
marginTop: 5,
|
|
337
337
|
color: "var(--danger)",
|
|
@@ -340,34 +340,34 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
340
340
|
children: m
|
|
341
341
|
})
|
|
342
342
|
]
|
|
343
|
-
}), y ? /* @__PURE__ */
|
|
343
|
+
}), y ? /* @__PURE__ */ B("div", {
|
|
344
344
|
style: {
|
|
345
345
|
display: "flex",
|
|
346
346
|
gap: 6
|
|
347
347
|
},
|
|
348
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ z(E, {
|
|
349
349
|
kind: "ghost",
|
|
350
350
|
size: "sm",
|
|
351
|
-
icon:
|
|
351
|
+
icon: z(o ? e.loader : e.file, { size: 12 }),
|
|
352
352
|
onClick: b,
|
|
353
353
|
disabled: o,
|
|
354
354
|
children: "PDF"
|
|
355
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ z(E, {
|
|
356
356
|
kind: "default",
|
|
357
357
|
size: "sm",
|
|
358
|
-
icon:
|
|
358
|
+
icon: z(c ? e.loader : e.download, { size: 12 }),
|
|
359
359
|
onClick: x,
|
|
360
360
|
disabled: c,
|
|
361
361
|
children: "Download"
|
|
362
362
|
})]
|
|
363
|
-
}) : f ? /* @__PURE__ */
|
|
363
|
+
}) : f ? /* @__PURE__ */ z(E, {
|
|
364
364
|
kind: "ghost",
|
|
365
365
|
size: "sm",
|
|
366
|
-
icon:
|
|
366
|
+
icon: z(u ? e.loader : e.file, { size: 12 }),
|
|
367
367
|
onClick: C,
|
|
368
368
|
disabled: u,
|
|
369
369
|
children: "Regenerate"
|
|
370
|
-
}) : /* @__PURE__ */
|
|
370
|
+
}) : /* @__PURE__ */ z(E, {
|
|
371
371
|
kind: "ghost",
|
|
372
372
|
size: "sm",
|
|
373
373
|
disabled: !0,
|
|
@@ -375,8 +375,8 @@ function at({ entityCode: t, objectId: r, doc: i }) {
|
|
|
375
375
|
})]
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
return /* @__PURE__ */
|
|
378
|
+
function G({ icon: e, text: t }) {
|
|
379
|
+
return /* @__PURE__ */ B("div", {
|
|
380
380
|
style: {
|
|
381
381
|
display: "flex",
|
|
382
382
|
alignItems: "center",
|
|
@@ -390,10 +390,10 @@ function U({ icon: e, text: t }) {
|
|
|
390
390
|
}
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region src/components/detail-layout/ErrorSummary.tsx
|
|
393
|
-
function
|
|
393
|
+
function st({ errors: t, onJump: n }) {
|
|
394
394
|
if (t.length === 0) return null;
|
|
395
395
|
let r = t.length !== 1;
|
|
396
|
-
return /* @__PURE__ */
|
|
396
|
+
return /* @__PURE__ */ B("div", {
|
|
397
397
|
role: "alert",
|
|
398
398
|
style: {
|
|
399
399
|
display: "flex",
|
|
@@ -405,19 +405,19 @@ function ot({ errors: t, onJump: n }) {
|
|
|
405
405
|
border: "1px solid var(--danger-border)",
|
|
406
406
|
color: "var(--text)"
|
|
407
407
|
},
|
|
408
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ z("span", {
|
|
409
409
|
style: {
|
|
410
410
|
color: "var(--danger)",
|
|
411
411
|
marginTop: 1,
|
|
412
412
|
display: "flex"
|
|
413
413
|
},
|
|
414
|
-
children: /* @__PURE__ */
|
|
415
|
-
}), /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ z(e.warning, { size: 14 })
|
|
415
|
+
}), /* @__PURE__ */ B("div", {
|
|
416
416
|
style: {
|
|
417
417
|
flex: 1,
|
|
418
418
|
minWidth: 0
|
|
419
419
|
},
|
|
420
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ B("div", {
|
|
421
421
|
style: {
|
|
422
422
|
fontSize: 12.5,
|
|
423
423
|
fontWeight: 600,
|
|
@@ -429,7 +429,7 @@ function ot({ errors: t, onJump: n }) {
|
|
|
429
429
|
r ? "fields need" : "field needs",
|
|
430
430
|
" attention"
|
|
431
431
|
]
|
|
432
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ z("ul", {
|
|
433
433
|
style: {
|
|
434
434
|
margin: 0,
|
|
435
435
|
padding: 0,
|
|
@@ -438,7 +438,7 @@ function ot({ errors: t, onJump: n }) {
|
|
|
438
438
|
flexDirection: "column",
|
|
439
439
|
gap: 2
|
|
440
440
|
},
|
|
441
|
-
children: t.map((e) => /* @__PURE__ */
|
|
441
|
+
children: t.map((e) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ B("button", {
|
|
442
442
|
type: "button",
|
|
443
443
|
onClick: n ? () => n(e.name) : void 0,
|
|
444
444
|
style: {
|
|
@@ -451,21 +451,21 @@ function ot({ errors: t, onJump: n }) {
|
|
|
451
451
|
fontFamily: "inherit"
|
|
452
452
|
},
|
|
453
453
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ z("span", {
|
|
455
455
|
style: {
|
|
456
456
|
color: "var(--danger)",
|
|
457
457
|
marginRight: 6
|
|
458
458
|
},
|
|
459
459
|
children: "•"
|
|
460
460
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ z("span", {
|
|
462
462
|
style: {
|
|
463
463
|
fontWeight: 500,
|
|
464
464
|
color: "var(--text-2)"
|
|
465
465
|
},
|
|
466
466
|
children: e.label
|
|
467
467
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ B("span", {
|
|
469
469
|
style: { color: "var(--text-3)" },
|
|
470
470
|
children: [" - ", e.message]
|
|
471
471
|
})
|
|
@@ -477,8 +477,8 @@ function ot({ errors: t, onJump: n }) {
|
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/components/shared/HighlightsStrip.tsx
|
|
480
|
-
function
|
|
481
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
480
|
+
function ct({ items: e }) {
|
|
481
|
+
return e.length === 0 ? null : /* @__PURE__ */ z("div", {
|
|
482
482
|
style: {
|
|
483
483
|
display: "flex",
|
|
484
484
|
alignItems: "center",
|
|
@@ -486,25 +486,25 @@ function W({ items: e }) {
|
|
|
486
486
|
gap: "6px 0",
|
|
487
487
|
fontSize: 12
|
|
488
488
|
},
|
|
489
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
489
|
+
children: e.map((e, t) => /* @__PURE__ */ B(Ze, { children: [t > 0 && /* @__PURE__ */ z("span", { style: {
|
|
490
490
|
width: 1,
|
|
491
491
|
height: 12,
|
|
492
492
|
background: "var(--divider)",
|
|
493
493
|
marginInline: 12
|
|
494
|
-
} }), /* @__PURE__ */
|
|
494
|
+
} }), /* @__PURE__ */ B("span", {
|
|
495
495
|
style: {
|
|
496
496
|
display: "inline-flex",
|
|
497
497
|
alignItems: "center",
|
|
498
498
|
gap: 6,
|
|
499
499
|
lineHeight: 1.3
|
|
500
500
|
},
|
|
501
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ z("span", {
|
|
502
502
|
style: {
|
|
503
503
|
color: "var(--text-3)",
|
|
504
504
|
fontSize: 11.5
|
|
505
505
|
},
|
|
506
506
|
children: e.label
|
|
507
|
-
}), /* @__PURE__ */
|
|
507
|
+
}), /* @__PURE__ */ z("span", {
|
|
508
508
|
style: { color: "var(--text)" },
|
|
509
509
|
children: e.value
|
|
510
510
|
})]
|
|
@@ -513,7 +513,7 @@ function W({ items: e }) {
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/components/detail-layout/DetailHighlights.tsx
|
|
516
|
-
function
|
|
516
|
+
function lt({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectStatuses: a, schema: o, locale: s }) {
|
|
517
517
|
let c = e.highlights;
|
|
518
518
|
if (!c || c.length === 0) return null;
|
|
519
519
|
let l = [];
|
|
@@ -523,11 +523,11 @@ function st({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectSta
|
|
|
523
523
|
let t = a?.find((t) => t.group_code === e), n = t ? c.statuses.find((e) => e.code === t.status_code) : void 0;
|
|
524
524
|
l.push({
|
|
525
525
|
label: v(c.name),
|
|
526
|
-
value: n ? /* @__PURE__ */
|
|
526
|
+
value: n ? /* @__PURE__ */ z(C, {
|
|
527
527
|
tone: n.color ?? "slate",
|
|
528
528
|
size: "xs",
|
|
529
529
|
children: v(n.name)
|
|
530
|
-
}) : /* @__PURE__ */
|
|
530
|
+
}) : /* @__PURE__ */ z("span", {
|
|
531
531
|
style: { color: "var(--text-4)" },
|
|
532
532
|
children: "—"
|
|
533
533
|
})
|
|
@@ -535,7 +535,7 @@ function st({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectSta
|
|
|
535
535
|
continue;
|
|
536
536
|
}
|
|
537
537
|
if (t.fields.get(e) || t.files?.get(e)) {
|
|
538
|
-
let a =
|
|
538
|
+
let a = Le({
|
|
539
539
|
entity: t,
|
|
540
540
|
entityCode: n,
|
|
541
541
|
fieldName: e,
|
|
@@ -548,22 +548,22 @@ function st({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectSta
|
|
|
548
548
|
locale: s
|
|
549
549
|
});
|
|
550
550
|
l.push({
|
|
551
|
-
label:
|
|
551
|
+
label: Ue(t, e, o.entities),
|
|
552
552
|
value: a
|
|
553
553
|
});
|
|
554
554
|
continue;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
return l.length === 0 ? null : /* @__PURE__ */
|
|
557
|
+
return l.length === 0 ? null : /* @__PURE__ */ z(ct, { items: l });
|
|
558
558
|
}
|
|
559
559
|
//#endregion
|
|
560
560
|
//#region src/components/shared/AuditMetaStrip.tsx
|
|
561
|
-
function
|
|
561
|
+
function ut(e) {
|
|
562
562
|
return e.by != null || e.at != null;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
let t = e.filter(
|
|
566
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
564
|
+
function dt({ lines: e }) {
|
|
565
|
+
let t = e.filter(ut);
|
|
566
|
+
return t.length === 0 ? null : /* @__PURE__ */ z("div", {
|
|
567
567
|
style: {
|
|
568
568
|
display: "flex",
|
|
569
569
|
flexWrap: "wrap",
|
|
@@ -575,18 +575,18 @@ function lt({ lines: e }) {
|
|
|
575
575
|
fontSize: 11.5,
|
|
576
576
|
color: "var(--text-3)"
|
|
577
577
|
},
|
|
578
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
578
|
+
children: t.map((e, t) => /* @__PURE__ */ z(K, { line: e }, t))
|
|
579
579
|
});
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
return /* @__PURE__ */
|
|
581
|
+
function K({ line: e }) {
|
|
582
|
+
return /* @__PURE__ */ B("div", {
|
|
583
583
|
style: {
|
|
584
584
|
display: "flex",
|
|
585
585
|
alignItems: "center",
|
|
586
586
|
gap: 8,
|
|
587
587
|
minWidth: 0
|
|
588
588
|
},
|
|
589
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ z("span", {
|
|
590
590
|
style: {
|
|
591
591
|
fontSize: 11,
|
|
592
592
|
fontWeight: 600,
|
|
@@ -594,7 +594,7 @@ function ut({ line: e }) {
|
|
|
594
594
|
flexShrink: 0
|
|
595
595
|
},
|
|
596
596
|
children: e.label
|
|
597
|
-
}), /* @__PURE__ */
|
|
597
|
+
}), /* @__PURE__ */ B("span", {
|
|
598
598
|
style: {
|
|
599
599
|
display: "inline-flex",
|
|
600
600
|
alignItems: "center",
|
|
@@ -602,15 +602,15 @@ function ut({ line: e }) {
|
|
|
602
602
|
minWidth: 0
|
|
603
603
|
},
|
|
604
604
|
children: [
|
|
605
|
-
e.by != null && /* @__PURE__ */
|
|
605
|
+
e.by != null && /* @__PURE__ */ z("span", {
|
|
606
606
|
style: { color: "var(--text-2)" },
|
|
607
607
|
children: e.by
|
|
608
608
|
}),
|
|
609
|
-
e.by != null && e.at != null && /* @__PURE__ */
|
|
609
|
+
e.by != null && e.at != null && /* @__PURE__ */ z("span", {
|
|
610
610
|
style: { color: "var(--text-4)" },
|
|
611
611
|
children: "·"
|
|
612
612
|
}),
|
|
613
|
-
e.at != null && /* @__PURE__ */
|
|
613
|
+
e.at != null && /* @__PURE__ */ z("span", {
|
|
614
614
|
className: "num",
|
|
615
615
|
children: e.at
|
|
616
616
|
})
|
|
@@ -620,13 +620,13 @@ function ut({ line: e }) {
|
|
|
620
620
|
}
|
|
621
621
|
//#endregion
|
|
622
622
|
//#region src/components/detail-layout/DetailAuditStrip.tsx
|
|
623
|
-
function
|
|
623
|
+
function ft({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a, locale: o }) {
|
|
624
624
|
let s = e.audit;
|
|
625
625
|
if (s?.enabled === !1) return null;
|
|
626
626
|
let c = (e) => {
|
|
627
627
|
if (!e || !t.fields.get(e)) return;
|
|
628
628
|
let s = r[e];
|
|
629
|
-
if (
|
|
629
|
+
if (s != null && s !== "") return Le({
|
|
630
630
|
entity: t,
|
|
631
631
|
entityCode: n,
|
|
632
632
|
fieldName: e,
|
|
@@ -638,8 +638,7 @@ function dt({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
638
638
|
surface: "list",
|
|
639
639
|
locale: o
|
|
640
640
|
});
|
|
641
|
-
}
|
|
642
|
-
return /* @__PURE__ */ R(lt, { lines: s?.lines && s.lines.length > 0 ? s.lines.map((e) => ({
|
|
641
|
+
}, l = s?.lines && s.lines.length > 0 ? s.lines.map((e) => ({
|
|
643
642
|
label: v(e.label),
|
|
644
643
|
at: c(e.at),
|
|
645
644
|
by: c(e.by)
|
|
@@ -651,24 +650,25 @@ function dt({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: a
|
|
|
651
650
|
label: "Updated",
|
|
652
651
|
at: c("updated_at"),
|
|
653
652
|
by: c("updated_by")
|
|
654
|
-
}]
|
|
653
|
+
}];
|
|
654
|
+
return /* @__PURE__ */ z(dt, { lines: l });
|
|
655
655
|
}
|
|
656
656
|
//#endregion
|
|
657
657
|
//#region src/components/detail-layout/EvidenceBlock.tsx
|
|
658
|
-
function
|
|
658
|
+
function pt(e) {
|
|
659
659
|
if (!e) return;
|
|
660
660
|
let t = new Date(e);
|
|
661
661
|
if (!Number.isNaN(t.getTime())) return t.toLocaleString();
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
let t = e?.verdict ?? "unverified", n =
|
|
665
|
-
return n && r.push(`Verified ${n}`), e?.seq && r.push(`chain #${e.seq}`), e?.checkpoint_number && r.push(`checkpoint ${e.checkpoint_number}`), e?.generation && r.push(`generation ${e.generation}`), /* @__PURE__ */
|
|
663
|
+
function mt({ evidence: e }) {
|
|
664
|
+
let t = e?.verdict ?? "unverified", n = pt(e?.verified_at), r = [];
|
|
665
|
+
return n && r.push(`Verified ${n}`), e?.seq && r.push(`chain #${e.seq}`), e?.checkpoint_number && r.push(`checkpoint ${e.checkpoint_number}`), e?.generation && r.push(`generation ${e.generation}`), /* @__PURE__ */ B("div", {
|
|
666
666
|
style: {
|
|
667
667
|
display: "flex",
|
|
668
668
|
flexDirection: "column",
|
|
669
669
|
gap: 6
|
|
670
670
|
},
|
|
671
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ B("div", {
|
|
672
672
|
style: {
|
|
673
673
|
display: "flex",
|
|
674
674
|
alignItems: "center",
|
|
@@ -676,7 +676,7 @@ function ft({ evidence: e }) {
|
|
|
676
676
|
flexWrap: "wrap"
|
|
677
677
|
},
|
|
678
678
|
children: [
|
|
679
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ z("span", {
|
|
680
680
|
style: {
|
|
681
681
|
fontSize: 12,
|
|
682
682
|
fontWeight: 600,
|
|
@@ -684,13 +684,13 @@ function ft({ evidence: e }) {
|
|
|
684
684
|
},
|
|
685
685
|
children: "Evidence"
|
|
686
686
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
tone:
|
|
687
|
+
/* @__PURE__ */ z(C, {
|
|
688
|
+
tone: ve(t),
|
|
689
689
|
size: "sm",
|
|
690
690
|
dot: !0,
|
|
691
|
-
children:
|
|
691
|
+
children: j(t)
|
|
692
692
|
}),
|
|
693
|
-
r.length > 0 && /* @__PURE__ */
|
|
693
|
+
r.length > 0 && /* @__PURE__ */ z("span", {
|
|
694
694
|
style: {
|
|
695
695
|
fontSize: 12,
|
|
696
696
|
color: "var(--muted-foreground)"
|
|
@@ -698,7 +698,7 @@ function ft({ evidence: e }) {
|
|
|
698
698
|
children: r.join(" · ")
|
|
699
699
|
})
|
|
700
700
|
]
|
|
701
|
-
}), e?.reason && /* @__PURE__ */
|
|
701
|
+
}), e?.reason && /* @__PURE__ */ z("span", {
|
|
702
702
|
style: {
|
|
703
703
|
fontSize: 12,
|
|
704
704
|
color: "var(--destructive)"
|
|
@@ -709,38 +709,38 @@ function ft({ evidence: e }) {
|
|
|
709
709
|
}
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region src/components/shared/RecordHeader.tsx
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
return /* @__PURE__ */
|
|
712
|
+
var ht = 180, gt = 160;
|
|
713
|
+
function q({ icon: t, avatarName: n, title: r, recordId: i, description: a, highlights: o, mode: s, dirty: c = !1, showBack: l = !1, onBack: u, right: d, identityControls: f, showTitle: p = !0 }) {
|
|
714
|
+
return /* @__PURE__ */ B("div", {
|
|
715
715
|
style: {
|
|
716
716
|
display: "flex",
|
|
717
717
|
alignItems: "flex-start",
|
|
718
718
|
gap: 10,
|
|
719
|
-
flexWrap:
|
|
719
|
+
flexWrap: "wrap",
|
|
720
720
|
minWidth: 0
|
|
721
721
|
},
|
|
722
722
|
children: [
|
|
723
|
-
p && l && /* @__PURE__ */
|
|
723
|
+
p && l && /* @__PURE__ */ z("div", {
|
|
724
724
|
style: {
|
|
725
725
|
paddingTop: 4,
|
|
726
726
|
flexShrink: 0
|
|
727
727
|
},
|
|
728
|
-
children: /* @__PURE__ */
|
|
728
|
+
children: /* @__PURE__ */ z(ae, {
|
|
729
729
|
size: 26,
|
|
730
|
-
icon: /* @__PURE__ */
|
|
730
|
+
icon: /* @__PURE__ */ z(e.back, { size: 14 }),
|
|
731
731
|
title: "Back",
|
|
732
732
|
onClick: u
|
|
733
733
|
})
|
|
734
734
|
}),
|
|
735
|
-
p && (n || t) && /* @__PURE__ */
|
|
735
|
+
p && (n || t) && /* @__PURE__ */ z("div", {
|
|
736
736
|
style: {
|
|
737
737
|
flexShrink: 0,
|
|
738
738
|
paddingTop: 2
|
|
739
739
|
},
|
|
740
|
-
children: n ? /* @__PURE__ */
|
|
740
|
+
children: n ? /* @__PURE__ */ z(O, {
|
|
741
741
|
name: n,
|
|
742
742
|
size: 32
|
|
743
|
-
}) : /* @__PURE__ */
|
|
743
|
+
}) : /* @__PURE__ */ z("span", {
|
|
744
744
|
style: {
|
|
745
745
|
width: 32,
|
|
746
746
|
height: 32,
|
|
@@ -754,89 +754,85 @@ function pt({ icon: t, avatarName: n, title: r, recordId: i, description: a, hig
|
|
|
754
754
|
children: t
|
|
755
755
|
})
|
|
756
756
|
}),
|
|
757
|
-
p && /* @__PURE__ */
|
|
758
|
-
|
|
759
|
-
flex: "1 1 0",
|
|
760
|
-
minWidth: 0
|
|
761
|
-
},
|
|
762
|
-
children: [/* @__PURE__ */ z("div", {
|
|
757
|
+
p && /* @__PURE__ */ B(rt, { children: [
|
|
758
|
+
/* @__PURE__ */ z("h1", {
|
|
763
759
|
style: {
|
|
764
|
-
|
|
760
|
+
margin: 0,
|
|
761
|
+
fontSize: "var(--page-title-size, var(--page-title-size-detail))",
|
|
762
|
+
fontWeight: 600,
|
|
763
|
+
letterSpacing: 0,
|
|
764
|
+
lineHeight: "var(--page-title-line-height, var(--page-title-line-height-detail))",
|
|
765
|
+
color: "var(--text)",
|
|
766
|
+
minWidth: gt,
|
|
767
|
+
overflow: "hidden",
|
|
768
|
+
textOverflow: "ellipsis",
|
|
769
|
+
whiteSpace: "nowrap",
|
|
770
|
+
overflowWrap: "anywhere",
|
|
771
|
+
maxWidth: "100%",
|
|
772
|
+
flexGrow: 0,
|
|
773
|
+
flexShrink: 1,
|
|
774
|
+
flexBasis: "auto"
|
|
775
|
+
},
|
|
776
|
+
children: r
|
|
777
|
+
}),
|
|
778
|
+
i && /* @__PURE__ */ z(k, { value: i }),
|
|
779
|
+
a && /* @__PURE__ */ z(xe, {
|
|
780
|
+
label: a,
|
|
781
|
+
"data-testid": "detail-description-info"
|
|
782
|
+
}),
|
|
783
|
+
f,
|
|
784
|
+
s === "edit" && c && /* @__PURE__ */ B("span", {
|
|
785
|
+
style: {
|
|
786
|
+
display: "inline-flex",
|
|
765
787
|
alignItems: "center",
|
|
766
|
-
gap:
|
|
767
|
-
|
|
788
|
+
gap: 5,
|
|
789
|
+
fontSize: 11,
|
|
790
|
+
color: "var(--warn)"
|
|
768
791
|
},
|
|
769
|
-
children: [
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
},
|
|
785
|
-
children: r
|
|
786
|
-
}),
|
|
787
|
-
i && /* @__PURE__ */ R(O, { value: i }),
|
|
788
|
-
a && /* @__PURE__ */ R(k, {
|
|
789
|
-
label: a,
|
|
790
|
-
"data-testid": "detail-description-info"
|
|
791
|
-
}),
|
|
792
|
-
f,
|
|
793
|
-
s === "edit" && c && /* @__PURE__ */ z("span", {
|
|
794
|
-
style: {
|
|
795
|
-
display: "inline-flex",
|
|
796
|
-
alignItems: "center",
|
|
797
|
-
gap: 5,
|
|
798
|
-
fontSize: 11,
|
|
799
|
-
color: "var(--warn)"
|
|
800
|
-
},
|
|
801
|
-
children: [/* @__PURE__ */ R("span", { style: {
|
|
802
|
-
width: 6,
|
|
803
|
-
height: 6,
|
|
804
|
-
borderRadius: 999,
|
|
805
|
-
background: "var(--warn)"
|
|
806
|
-
} }), "Unsaved"]
|
|
807
|
-
}),
|
|
808
|
-
s === "create" && /* @__PURE__ */ R(C, {
|
|
809
|
-
tone: "violet",
|
|
810
|
-
size: "xs",
|
|
811
|
-
dot: !0,
|
|
812
|
-
children: "New record"
|
|
813
|
-
})
|
|
814
|
-
]
|
|
815
|
-
}), o && s === "display" && /* @__PURE__ */ R("div", {
|
|
816
|
-
style: { marginTop: 8 },
|
|
817
|
-
children: o
|
|
818
|
-
})]
|
|
819
|
-
}),
|
|
820
|
-
d && /* @__PURE__ */ R("div", {
|
|
792
|
+
children: [/* @__PURE__ */ z("span", { style: {
|
|
793
|
+
width: 6,
|
|
794
|
+
height: 6,
|
|
795
|
+
borderRadius: 999,
|
|
796
|
+
background: "var(--warn)"
|
|
797
|
+
} }), "Unsaved"]
|
|
798
|
+
}),
|
|
799
|
+
s === "create" && /* @__PURE__ */ z(C, {
|
|
800
|
+
tone: "violet",
|
|
801
|
+
size: "xs",
|
|
802
|
+
dot: !0,
|
|
803
|
+
children: "New record"
|
|
804
|
+
})
|
|
805
|
+
] }),
|
|
806
|
+
d && /* @__PURE__ */ z("div", {
|
|
821
807
|
role: "toolbar",
|
|
822
808
|
"aria-label": "Page actions",
|
|
823
809
|
style: {
|
|
824
810
|
display: "flex",
|
|
825
811
|
alignItems: "center",
|
|
826
812
|
gap: 6,
|
|
827
|
-
|
|
813
|
+
flexGrow: 1,
|
|
814
|
+
flexShrink: 1,
|
|
815
|
+
flexBasis: "auto",
|
|
816
|
+
marginLeft: "auto",
|
|
817
|
+
minWidth: ht,
|
|
828
818
|
flexWrap: "wrap",
|
|
829
|
-
justifyContent:
|
|
830
|
-
minWidth: 0
|
|
819
|
+
justifyContent: "flex-end"
|
|
831
820
|
},
|
|
832
821
|
children: d
|
|
822
|
+
}),
|
|
823
|
+
o && s === "display" && /* @__PURE__ */ z("div", {
|
|
824
|
+
style: {
|
|
825
|
+
flexBasis: "100%",
|
|
826
|
+
minWidth: 0
|
|
827
|
+
},
|
|
828
|
+
children: o
|
|
833
829
|
})
|
|
834
830
|
]
|
|
835
831
|
});
|
|
836
832
|
}
|
|
837
833
|
//#endregion
|
|
838
834
|
//#region src/lib/children-validation.ts
|
|
839
|
-
function
|
|
835
|
+
function _t(e, t, n) {
|
|
840
836
|
let r = [];
|
|
841
837
|
for (let [i, a] of e.fields) {
|
|
842
838
|
if (!a.required || a.auto || n && a.primary || e.tenant_key && i === e.tenant_key || a.default !== void 0 && a.default !== null) continue;
|
|
@@ -845,17 +841,17 @@ function mt(e, t, n) {
|
|
|
845
841
|
}
|
|
846
842
|
return r;
|
|
847
843
|
}
|
|
848
|
-
var
|
|
849
|
-
function
|
|
844
|
+
var vt = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
|
|
845
|
+
function yt(e, t) {
|
|
850
846
|
let n = [];
|
|
851
847
|
for (let [r, i] of e.fields) {
|
|
852
848
|
if (i.type !== "email") continue;
|
|
853
849
|
let e = t[r];
|
|
854
|
-
typeof e == "string" && e !== "" && !
|
|
850
|
+
typeof e == "string" && e !== "" && !vt.test(e) && n.push(r);
|
|
855
851
|
}
|
|
856
852
|
return n;
|
|
857
853
|
}
|
|
858
|
-
function
|
|
854
|
+
function bt(e, t) {
|
|
859
855
|
let n = /* @__PURE__ */ new Set();
|
|
860
856
|
for (let r of Object.values(t.entities)) if (r.children) {
|
|
861
857
|
for (let t of r.children) if (t.entity === e && t.foreign_key) {
|
|
@@ -865,13 +861,13 @@ function _t(e, t) {
|
|
|
865
861
|
}
|
|
866
862
|
return n;
|
|
867
863
|
}
|
|
868
|
-
function
|
|
864
|
+
function xt(e, t) {
|
|
869
865
|
if (!e || !t) return {};
|
|
870
866
|
let n = {};
|
|
871
867
|
for (let [r, i] of Object.entries(e)) {
|
|
872
868
|
let e = t.entities[r];
|
|
873
869
|
if (!e) continue;
|
|
874
|
-
let a =
|
|
870
|
+
let a = bt(r, t), o = [];
|
|
875
871
|
for (let [t, n] of e.fields) e.tenant_key && t === e.tenant_key || n.required && !n.auto && !n.primary && !a.has(t) && o.push(t);
|
|
876
872
|
if (o.length !== 0) for (let e of i) {
|
|
877
873
|
if (e._deleted) continue;
|
|
@@ -887,29 +883,29 @@ function vt(e, t) {
|
|
|
887
883
|
}
|
|
888
884
|
//#endregion
|
|
889
885
|
//#region src/components/pages/SmartDetailPage.impl.tsx
|
|
890
|
-
var
|
|
891
|
-
function
|
|
886
|
+
var St = () => {};
|
|
887
|
+
function Ct(e, t) {
|
|
892
888
|
return e.length === t.length && JSON.stringify(e) === JSON.stringify(t);
|
|
893
889
|
}
|
|
894
|
-
function
|
|
890
|
+
function wt(e, t) {
|
|
895
891
|
if (e) {
|
|
896
|
-
let n =
|
|
897
|
-
if (
|
|
892
|
+
let n = ue(e, t), r = ie(n);
|
|
893
|
+
if (r.replace(/^\|+|\|+$/g, "")) return r;
|
|
898
894
|
}
|
|
899
895
|
return t.id == null ? crypto.randomUUID() : m(t.id);
|
|
900
896
|
}
|
|
901
|
-
function
|
|
902
|
-
return /* @__PURE__ */
|
|
897
|
+
function Tt({ screenCode: e }) {
|
|
898
|
+
return /* @__PURE__ */ z(h, { children: /* @__PURE__ */ z(Et, { screenCode: e }) });
|
|
903
899
|
}
|
|
904
|
-
function
|
|
905
|
-
let { id: n } =
|
|
900
|
+
function Et({ screenCode: t }) {
|
|
901
|
+
let { id: n } = et(), a = te(), [s, c] = tt(), { data: m } = i(), h = re((e) => e.user), g = u(), y = se(), b = m?.screens[t], S = b?.entity ? m?.entities[b.entity] : void 0, C = b?.entity, w = x(S, "create"), T = x(S, "update"), ne = x(S, "restore"), E = (() => {
|
|
906
902
|
if (!S || !S.singleton || !S.prefilter) return;
|
|
907
903
|
let e = le(S);
|
|
908
904
|
if (e.length !== 1) return;
|
|
909
905
|
let t = S.prefilter[e[0]];
|
|
910
906
|
if (t === "$caller.user_id") return h?.id;
|
|
911
907
|
if (t === "$caller.tenant_id") return h?.tenant?.id;
|
|
912
|
-
})(), D = E !== void 0, O = D ? E : n, k = !D && O === "new", A =
|
|
908
|
+
})(), D = E !== void 0, O = D ? E : n, k = !D && O === "new", A = I(() => {
|
|
913
909
|
if (!O || k) return;
|
|
914
910
|
if (!S) return O;
|
|
915
911
|
let e = le(S);
|
|
@@ -923,16 +919,16 @@ function q({ screenCode: t }) {
|
|
|
923
919
|
O,
|
|
924
920
|
k,
|
|
925
921
|
S
|
|
926
|
-
]),
|
|
922
|
+
]), ge = I(() => {
|
|
927
923
|
if (A) return typeof A == "string" ? A : ie(A);
|
|
928
|
-
}, [A]),
|
|
929
|
-
|
|
930
|
-
let
|
|
931
|
-
ee(
|
|
932
|
-
let [
|
|
924
|
+
}, [A]), j = Fe(C, A), { data: ve, isLoading: ye, error: M } = j, xe = Me((e) => e.degradedEntities), Ee = C ? Te(S?.realtime, xe, C) : !1;
|
|
925
|
+
be(ze(C, A), !k);
|
|
926
|
+
let De = we(C ?? ""), Ae = Ce(C ?? ""), Le = Be(C ?? ""), Re = Object.keys(S?.status_groups ?? {}).length > 0, Ue = ve?.data, Ke = Ue?.$statuses, qe = Ue?.$properties, Je = s.get("edit") === "true", [N, Ze] = L(k || Je), [R, nt] = L({}), [V, H] = L({}), [U, ot] = L({}), [W, G] = L(void 0), [ct, ut] = L(!1), [dt, K] = L(void 0), [pt, ht] = L(!1), gt = k ? w : T, q = N && gt, vt = oe();
|
|
927
|
+
ee(q && !k, vt.enabled);
|
|
928
|
+
let [bt, Tt] = L(() => {
|
|
933
929
|
let e = parseInt(b?.sidebar_width || "380", 10);
|
|
934
930
|
return isNaN(e) ? 380 : e;
|
|
935
|
-
}), Et =
|
|
931
|
+
}), Et = Qe(null), J = Qe(null), Ot = P((e) => {
|
|
936
932
|
e.preventDefault();
|
|
937
933
|
let t = Et.current;
|
|
938
934
|
if (!t) return;
|
|
@@ -946,28 +942,33 @@ function q({ screenCode: t }) {
|
|
|
946
942
|
let n = J.current.startX - e.clientX, r = Math.max(280, Math.min(800, J.current.startW + n));
|
|
947
943
|
t.style.width = `${r}px`;
|
|
948
944
|
}, i = () => {
|
|
949
|
-
J.current && t &&
|
|
945
|
+
J.current && t && Tt(parseInt(t.style.width, 10) || J.current.startW), J.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
|
|
950
946
|
};
|
|
951
947
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
|
|
952
|
-
}, []), Y =
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
948
|
+
}, []), Y = ve?.data, X = Oe(S, b, Y ?? {});
|
|
949
|
+
F(() => {
|
|
950
|
+
let e = parseInt(X?.sidebar_width || "380", 10);
|
|
951
|
+
Tt(Number.isNaN(e) ? 380 : e);
|
|
952
|
+
}, [X?.sidebar_width]);
|
|
953
|
+
let Z = typeof Y?.$row_version == "string" ? Y.$row_version : void 0, At = Y?.$refs, jt = Qe(Z);
|
|
954
|
+
F(() => {
|
|
955
|
+
if (!Z) return;
|
|
956
|
+
let e = jt.current;
|
|
957
|
+
jt.current = Z, e && e !== Z && N && ut(!0);
|
|
958
|
+
}, [N, Z]);
|
|
959
|
+
let Mt = !!S?.soft_delete && Y != null && Y[S.soft_delete] != null, Nt = $e(), Pt = Qe(null);
|
|
960
|
+
me({ scrollElementRef: Pt });
|
|
961
|
+
let Ft = !k && M instanceof ce && M.status === 404, It = k && !de(S), Lt = Qe(null);
|
|
962
|
+
F(() => {
|
|
963
|
+
if (!Ft) return;
|
|
964
|
+
let e = pe(Nt);
|
|
965
|
+
Lt.current !== e && (Lt.current = e, fe.getState().kill(e));
|
|
966
|
+
}, [Ft, Nt]);
|
|
967
|
+
let { openTab: Rt, updateTabTitle: zt, findTabByPathname: Bt } = Ge();
|
|
968
|
+
F(() => {
|
|
969
|
+
if (!S || D || vt.enabled) return;
|
|
970
|
+
let e = Nt.pathname, t = v(X?.display?.name) || v(S.display.name), n = X?.display?.icon || S.display.icon;
|
|
971
|
+
Bt(e) || Rt({
|
|
971
972
|
pathname: e,
|
|
972
973
|
search: "",
|
|
973
974
|
title: k ? `New ${t}` : t,
|
|
@@ -975,63 +976,66 @@ function q({ screenCode: t }) {
|
|
|
975
976
|
closable: !0
|
|
976
977
|
});
|
|
977
978
|
}, [
|
|
978
|
-
|
|
979
|
-
|
|
979
|
+
Nt.pathname,
|
|
980
|
+
X?.display?.name?.en,
|
|
980
981
|
S?.display.name?.en,
|
|
981
|
-
|
|
982
|
+
X?.display?.icon,
|
|
982
983
|
S?.display.icon,
|
|
983
984
|
k,
|
|
984
985
|
D,
|
|
985
|
-
|
|
986
|
-
]),
|
|
987
|
-
if (!Y || !S || D ||
|
|
988
|
-
let e =
|
|
986
|
+
vt.enabled
|
|
987
|
+
]), F(() => {
|
|
988
|
+
if (!Y || !S || D || vt.enabled) return;
|
|
989
|
+
let e = Bt(Nt.pathname);
|
|
989
990
|
if (e) {
|
|
990
|
-
let t = v(
|
|
991
|
-
|
|
991
|
+
let t = v(X?.display?.name) || v(S.display.name), n = o(Y, S), r = n && !String(n).startsWith("/") ? String(n) : t;
|
|
992
|
+
zt(e.id, r);
|
|
992
993
|
}
|
|
993
994
|
}, [
|
|
994
995
|
Y,
|
|
995
996
|
S?.display.name?.en,
|
|
996
997
|
S?.display.display_field,
|
|
997
|
-
|
|
998
|
+
Nt.pathname,
|
|
998
999
|
D,
|
|
999
|
-
|
|
1000
|
+
vt.enabled
|
|
1000
1001
|
]);
|
|
1001
|
-
let
|
|
1002
|
-
if (!S || !
|
|
1002
|
+
let Vt = I(() => {
|
|
1003
|
+
if (!S || !gt) return /* @__PURE__ */ new Set();
|
|
1003
1004
|
let e = /* @__PURE__ */ new Set();
|
|
1004
1005
|
for (let [t, n] of S.fields) !n.auto && !n.primary && e.add(t);
|
|
1005
1006
|
for (let [t] of S.files ?? []) e.add(t);
|
|
1006
1007
|
return e;
|
|
1007
|
-
}, [S,
|
|
1008
|
-
|
|
1009
|
-
if (!(!
|
|
1010
|
-
if (
|
|
1011
|
-
let e = O ?
|
|
1012
|
-
e
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
g.registerDraft({
|
|
1019
|
-
fileId: e,
|
|
1020
|
-
discard: () => p(e)
|
|
1008
|
+
}, [S, gt]);
|
|
1009
|
+
F(() => {
|
|
1010
|
+
if (!(!Je || !Y || !S || !T)) {
|
|
1011
|
+
if (N || Ze(!0), Object.keys(R).length === 0) {
|
|
1012
|
+
let e = O ? _e(O) : null;
|
|
1013
|
+
if (e) {
|
|
1014
|
+
let t = Ne({
|
|
1015
|
+
entity: S,
|
|
1016
|
+
formData: e,
|
|
1017
|
+
record: void 0,
|
|
1018
|
+
isNew: !0
|
|
1021
1019
|
});
|
|
1022
|
-
|
|
1020
|
+
Pe(t).forEach((e) => {
|
|
1021
|
+
g.registerDraft({
|
|
1022
|
+
fileId: e,
|
|
1023
|
+
discard: () => p(e)
|
|
1024
|
+
});
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1023
1027
|
let t = {};
|
|
1024
|
-
|
|
1028
|
+
Vt.forEach((n) => {
|
|
1025
1029
|
let r = e ? e[n] : void 0;
|
|
1026
1030
|
if (r !== void 0) {
|
|
1027
1031
|
t[n] = r;
|
|
1028
1032
|
return;
|
|
1029
1033
|
}
|
|
1030
|
-
let i =
|
|
1031
|
-
t[n] =
|
|
1032
|
-
}),
|
|
1034
|
+
let i = Se(S, Y, n);
|
|
1035
|
+
t[n] = ke(S, n) ? i ?? null : i ?? "";
|
|
1036
|
+
}), nt(t);
|
|
1033
1037
|
}
|
|
1034
|
-
if (S.children !== void 0 && S.children.length > 0 &&
|
|
1038
|
+
if (S.children !== void 0 && S.children.length > 0 && W === void 0) {
|
|
1035
1039
|
let e = Y.$children;
|
|
1036
1040
|
if (e && Object.keys(e).length > 0) {
|
|
1037
1041
|
let t = {};
|
|
@@ -1039,11 +1043,11 @@ function q({ screenCode: t }) {
|
|
|
1039
1043
|
let e = m?.entities[n];
|
|
1040
1044
|
t[n] = r.map((t) => ({
|
|
1041
1045
|
...t,
|
|
1042
|
-
_key:
|
|
1046
|
+
_key: wt(e, t)
|
|
1043
1047
|
}));
|
|
1044
1048
|
}
|
|
1045
|
-
|
|
1046
|
-
} else
|
|
1049
|
+
G(t), K(e);
|
|
1050
|
+
} else G({}), K({});
|
|
1047
1051
|
}
|
|
1048
1052
|
c((e) => {
|
|
1049
1053
|
let t = new URLSearchParams(e);
|
|
@@ -1051,112 +1055,112 @@ function q({ screenCode: t }) {
|
|
|
1051
1055
|
}, { replace: !0 });
|
|
1052
1056
|
}
|
|
1053
1057
|
}, [
|
|
1054
|
-
|
|
1058
|
+
Je,
|
|
1055
1059
|
Y,
|
|
1056
|
-
|
|
1060
|
+
Vt,
|
|
1057
1061
|
T,
|
|
1058
1062
|
S,
|
|
1059
|
-
|
|
1063
|
+
W,
|
|
1060
1064
|
m
|
|
1061
|
-
]),
|
|
1062
|
-
!k || !w || !S?.children || S.children.length === 0 ||
|
|
1065
|
+
]), F(() => {
|
|
1066
|
+
!k || !w || !S?.children || S.children.length === 0 || W === void 0 && (G({}), K({}));
|
|
1063
1067
|
}, [
|
|
1064
1068
|
k,
|
|
1065
1069
|
w,
|
|
1066
1070
|
S?.children
|
|
1067
1071
|
]);
|
|
1068
|
-
let
|
|
1072
|
+
let Ht = P(async () => {
|
|
1069
1073
|
if (await g.flushAllDrafts(), k) {
|
|
1070
|
-
let e =
|
|
1074
|
+
let e = X?.route?.replace("/:id", "") ?? "/";
|
|
1071
1075
|
a(e);
|
|
1072
|
-
} else
|
|
1076
|
+
} else Ze(!1), nt({}), H({}), ot({}), G(void 0), K(void 0), ht(!1);
|
|
1073
1077
|
}, [
|
|
1074
1078
|
g,
|
|
1075
1079
|
k,
|
|
1076
|
-
|
|
1080
|
+
X,
|
|
1077
1081
|
a
|
|
1078
|
-
]),
|
|
1079
|
-
|
|
1082
|
+
]), Ut = P((e, t) => {
|
|
1083
|
+
nt((n) => ({
|
|
1080
1084
|
...n,
|
|
1081
1085
|
[e]: t
|
|
1082
1086
|
}));
|
|
1083
|
-
}, []), Q =
|
|
1084
|
-
if (!
|
|
1085
|
-
let e =
|
|
1087
|
+
}, []), Q = I(() => {
|
|
1088
|
+
if (!X?.route) return "/";
|
|
1089
|
+
let e = X.route.split("/");
|
|
1086
1090
|
return e.pop(), e.join("/") || "/";
|
|
1087
|
-
}, [
|
|
1088
|
-
if (!
|
|
1091
|
+
}, [X]), Wt = I(() => !m?.screens || !Q || Q === "/" ? !1 : Object.values(m.screens).some((e) => e.route === Q), [m, Q]), Gt = P(() => {
|
|
1092
|
+
if (!Wt) {
|
|
1089
1093
|
a("/");
|
|
1090
1094
|
return;
|
|
1091
1095
|
}
|
|
1092
|
-
let e =
|
|
1096
|
+
let e = Bt(Q)?.search ?? "";
|
|
1093
1097
|
a(e ? `${Q}?${e}` : Q);
|
|
1094
1098
|
}, [
|
|
1095
|
-
|
|
1099
|
+
Wt,
|
|
1096
1100
|
Q,
|
|
1097
|
-
|
|
1101
|
+
Bt,
|
|
1098
1102
|
a
|
|
1099
|
-
]) }),
|
|
1103
|
+
]), Kt = We({ fallback: Gt }), qt = !D && (Kt.hasOriginBack || Kt.allowFallbackBack && !!Wt), Jt = r(), Yt = I(() => {
|
|
1100
1104
|
if (!S) return {};
|
|
1101
1105
|
let e = {};
|
|
1102
|
-
for (let t of
|
|
1103
|
-
for (let t of
|
|
1106
|
+
for (let t of _t(S, R, k)) Vt.has(t) && (e[t] = "Required");
|
|
1107
|
+
for (let t of yt(S, R)) Vt.has(t) && (e[t] = "Invalid email address");
|
|
1104
1108
|
return e;
|
|
1105
1109
|
}, [
|
|
1106
1110
|
S,
|
|
1107
|
-
|
|
1111
|
+
R,
|
|
1108
1112
|
k,
|
|
1109
|
-
|
|
1110
|
-
]),
|
|
1111
|
-
if (!C || !S || k && !w || !k && !T || (ht(!0),
|
|
1112
|
-
let e = {}, t =
|
|
1113
|
+
Vt
|
|
1114
|
+
]), Xt = Object.keys(Yt).length > 0, Zt = P(() => {
|
|
1115
|
+
if (!C || !S || k && !w || !k && !T || (ht(!0), Xt)) return;
|
|
1116
|
+
let e = {}, t = Ne({
|
|
1113
1117
|
entity: S,
|
|
1114
|
-
formData:
|
|
1118
|
+
formData: R,
|
|
1115
1119
|
record: Y,
|
|
1116
1120
|
isNew: k
|
|
1117
|
-
}), n =
|
|
1118
|
-
if (k) for (let [t, n] of Object.entries(
|
|
1121
|
+
}), n = Pe(t);
|
|
1122
|
+
if (k) for (let [t, n] of Object.entries(R)) {
|
|
1119
1123
|
if (S.files?.has(t)) continue;
|
|
1120
|
-
let r =
|
|
1124
|
+
let r = Ve(S, t, n);
|
|
1121
1125
|
r !== "" && r != null && (e[t] = r);
|
|
1122
1126
|
}
|
|
1123
1127
|
else {
|
|
1124
|
-
for (let [t, n] of Object.entries(
|
|
1128
|
+
for (let [t, n] of Object.entries(R)) {
|
|
1125
1129
|
if (S.files?.has(t)) continue;
|
|
1126
|
-
let r = Y ?
|
|
1130
|
+
let r = Y ? Se(S, Y, t) : void 0, i = Ve(S, t, n), a = Ve(S, t, r);
|
|
1127
1131
|
(i === "" ? null : i) !== (a === "" || a === void 0 ? null : a) && (e[t] = i);
|
|
1128
1132
|
}
|
|
1129
|
-
|
|
1133
|
+
Z && (e.$row_version = Z);
|
|
1130
1134
|
}
|
|
1131
|
-
if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(
|
|
1135
|
+
if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(V).length > 0 && (e.$statuses = Object.entries(V).map(([e, t]) => ({
|
|
1132
1136
|
status_group_code: e,
|
|
1133
1137
|
status_code: t
|
|
1134
|
-
}))), Object.keys(
|
|
1138
|
+
}))), Object.keys(U).length > 0 && (e.$properties = Object.entries(U).map(([e, t]) => ({
|
|
1135
1139
|
property_code: e,
|
|
1136
1140
|
value: t
|
|
1137
|
-
}))),
|
|
1141
|
+
}))), W) {
|
|
1138
1142
|
let t = {};
|
|
1139
|
-
for (let [e, n] of Object.entries(
|
|
1143
|
+
for (let [e, n] of Object.entries(W)) {
|
|
1140
1144
|
let r = n.filter((e) => !e._deleted).map((e) => {
|
|
1141
1145
|
let { _key: t, _deleted: n, _dirty: r, ...i } = e;
|
|
1142
1146
|
return i;
|
|
1143
|
-
}), i =
|
|
1144
|
-
(k || !
|
|
1147
|
+
}), i = dt?.[e] ?? [];
|
|
1148
|
+
(k || !Ct(r, i)) && (t[e] = r);
|
|
1145
1149
|
}
|
|
1146
1150
|
Object.keys(t).length > 0 && (e.$children = t);
|
|
1147
1151
|
}
|
|
1148
1152
|
if (!k && Object.keys(e).length === 0) {
|
|
1149
|
-
|
|
1153
|
+
Ze(!1), H({}), ot({}), G(void 0), K(void 0), ht(!1);
|
|
1150
1154
|
return;
|
|
1151
1155
|
}
|
|
1152
1156
|
let r = () => {
|
|
1153
|
-
|
|
1157
|
+
Ze(!1), ut(!1), ht(!1), H({}), ot({}), G(void 0), K(void 0);
|
|
1154
1158
|
};
|
|
1155
|
-
k ?
|
|
1159
|
+
k ? De.mutate(e, { onSuccess: (e) => {
|
|
1156
1160
|
n.forEach((e) => g.markCommitted(e));
|
|
1157
|
-
let t = e.data, i =
|
|
1158
|
-
a(
|
|
1159
|
-
} }) : A &&
|
|
1161
|
+
let t = e.data, i = S ? ue(S, t) : {}, o = ie(i);
|
|
1162
|
+
a(o ? `${Q}/${encodeURIComponent(o)}` : Q, { replace: !0 }), r();
|
|
1163
|
+
} }) : A && Ae.mutate({
|
|
1160
1164
|
pkValues: A,
|
|
1161
1165
|
data: e
|
|
1162
1166
|
}, {
|
|
@@ -1164,7 +1168,7 @@ function q({ screenCode: t }) {
|
|
|
1164
1168
|
n.forEach((e) => g.markCommitted(e)), r();
|
|
1165
1169
|
},
|
|
1166
1170
|
onError: (e) => {
|
|
1167
|
-
e instanceof ce && e.code === "STALE_OBJECT" &&
|
|
1171
|
+
e instanceof ce && e.code === "STALE_OBJECT" && ut(!0);
|
|
1168
1172
|
}
|
|
1169
1173
|
});
|
|
1170
1174
|
}, [
|
|
@@ -1173,49 +1177,49 @@ function q({ screenCode: t }) {
|
|
|
1173
1177
|
w,
|
|
1174
1178
|
T,
|
|
1175
1179
|
C,
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
H,
|
|
1180
|
+
R,
|
|
1181
|
+
Xt,
|
|
1182
|
+
V,
|
|
1180
1183
|
U,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
+
W,
|
|
1185
|
+
dt,
|
|
1186
|
+
De,
|
|
1187
|
+
Ae,
|
|
1184
1188
|
S,
|
|
1185
1189
|
a,
|
|
1186
1190
|
Q,
|
|
1187
1191
|
Y,
|
|
1188
|
-
|
|
1192
|
+
Z,
|
|
1189
1193
|
A
|
|
1190
|
-
]),
|
|
1191
|
-
|
|
1194
|
+
]), Qt = P((e, t) => {
|
|
1195
|
+
G((n) => ({
|
|
1192
1196
|
...n ?? {},
|
|
1193
1197
|
[e]: t
|
|
1194
1198
|
}));
|
|
1195
|
-
}, []),
|
|
1196
|
-
!A || k || !ne ||
|
|
1199
|
+
}, []), $t = P(() => {
|
|
1200
|
+
!A || k || !ne || Le.mutate(A);
|
|
1197
1201
|
}, [
|
|
1198
1202
|
A,
|
|
1199
1203
|
k,
|
|
1200
1204
|
ne,
|
|
1201
|
-
|
|
1202
|
-
]),
|
|
1203
|
-
if (!
|
|
1204
|
-
if (!k &&
|
|
1205
|
-
if (
|
|
1205
|
+
Le
|
|
1206
|
+
]), en = I(() => xt(W, m), [W, m]), tn = Object.keys(en).length > 0;
|
|
1207
|
+
if (!X || !S) return null;
|
|
1208
|
+
if (!k && ye) return /* @__PURE__ */ z(je, {});
|
|
1209
|
+
if (It) return /* @__PURE__ */ B("div", {
|
|
1206
1210
|
style: { padding: 24 },
|
|
1207
|
-
children: [/* @__PURE__ */
|
|
1211
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1208
1212
|
style: {
|
|
1209
1213
|
display: "flex",
|
|
1210
1214
|
alignItems: "center",
|
|
1211
1215
|
gap: 8,
|
|
1212
1216
|
marginBottom: 8
|
|
1213
1217
|
},
|
|
1214
|
-
children: [
|
|
1215
|
-
icon: /* @__PURE__ */
|
|
1216
|
-
onClick:
|
|
1218
|
+
children: [qt && /* @__PURE__ */ z(ae, {
|
|
1219
|
+
icon: /* @__PURE__ */ z(e.back, { size: 14 }),
|
|
1220
|
+
onClick: Kt.goBack,
|
|
1217
1221
|
title: "Back"
|
|
1218
|
-
}), /* @__PURE__ */
|
|
1222
|
+
}), /* @__PURE__ */ z("h1", {
|
|
1219
1223
|
style: {
|
|
1220
1224
|
margin: 0,
|
|
1221
1225
|
fontSize: 18,
|
|
@@ -1224,25 +1228,25 @@ function q({ screenCode: t }) {
|
|
|
1224
1228
|
},
|
|
1225
1229
|
children: "Not Available"
|
|
1226
1230
|
})]
|
|
1227
|
-
}), /* @__PURE__ */
|
|
1231
|
+
}), /* @__PURE__ */ z("p", {
|
|
1228
1232
|
style: { color: "var(--text-3)" },
|
|
1229
1233
|
children: "This record type is not created from a form."
|
|
1230
1234
|
})]
|
|
1231
1235
|
});
|
|
1232
|
-
if (!k && !Y ||
|
|
1236
|
+
if (!k && !Y || Ft) return /* @__PURE__ */ B("div", {
|
|
1233
1237
|
style: { padding: 24 },
|
|
1234
|
-
children: [/* @__PURE__ */
|
|
1238
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1235
1239
|
style: {
|
|
1236
1240
|
display: "flex",
|
|
1237
1241
|
alignItems: "center",
|
|
1238
1242
|
gap: 8,
|
|
1239
1243
|
marginBottom: 8
|
|
1240
1244
|
},
|
|
1241
|
-
children: [
|
|
1242
|
-
icon: /* @__PURE__ */
|
|
1243
|
-
onClick:
|
|
1245
|
+
children: [qt && /* @__PURE__ */ z(ae, {
|
|
1246
|
+
icon: /* @__PURE__ */ z(e.back, { size: 14 }),
|
|
1247
|
+
onClick: Kt.goBack,
|
|
1244
1248
|
title: "Back"
|
|
1245
|
-
}), /* @__PURE__ */
|
|
1249
|
+
}), /* @__PURE__ */ z("h1", {
|
|
1246
1250
|
style: {
|
|
1247
1251
|
margin: 0,
|
|
1248
1252
|
fontSize: 18,
|
|
@@ -1251,35 +1255,35 @@ function q({ screenCode: t }) {
|
|
|
1251
1255
|
},
|
|
1252
1256
|
children: "Not Found"
|
|
1253
1257
|
})]
|
|
1254
|
-
}), /* @__PURE__ */
|
|
1258
|
+
}), /* @__PURE__ */ z("p", {
|
|
1255
1259
|
style: { color: "var(--text-3)" },
|
|
1256
1260
|
children: "Record not found."
|
|
1257
1261
|
})]
|
|
1258
1262
|
});
|
|
1259
|
-
let
|
|
1263
|
+
let nn = S.display, rn = v(X.display?.name) || v(nn.name), an = o(Y, S), on = k ? `New ${rn}` : an ? String(an) : rn, sn = De.isPending || Ae.isPending, cn = X.responsive?.[y.category]?.layout, ln = cn?.tabs ?? (y.isPhone ? "sections" : void 0), un = cn?.header_card === !0 ? He({
|
|
1260
1264
|
entity: S,
|
|
1261
|
-
screen:
|
|
1265
|
+
screen: X
|
|
1262
1266
|
}) : void 0, $ = {
|
|
1263
1267
|
schema: m,
|
|
1264
1268
|
entity: S,
|
|
1265
1269
|
entityCode: C,
|
|
1266
|
-
recordId:
|
|
1267
|
-
record:
|
|
1270
|
+
recordId: ge ?? O ?? "",
|
|
1271
|
+
record: q ? {
|
|
1268
1272
|
...Y ?? {},
|
|
1269
|
-
...
|
|
1273
|
+
...R
|
|
1270
1274
|
} : Y ?? {},
|
|
1271
1275
|
isNew: k,
|
|
1272
|
-
mode:
|
|
1273
|
-
onFieldChange:
|
|
1274
|
-
refs:
|
|
1276
|
+
mode: q ? "edit" : "display",
|
|
1277
|
+
onFieldChange: q ? Ut : void 0,
|
|
1278
|
+
refs: At,
|
|
1275
1279
|
objectProperties: (() => {
|
|
1276
|
-
let e =
|
|
1277
|
-
if (!
|
|
1278
|
-
let t = e.map((e) =>
|
|
1280
|
+
let e = qe ?? [];
|
|
1281
|
+
if (!q || Object.keys(U).length === 0) return e.length > 0 ? e : void 0;
|
|
1282
|
+
let t = e.map((e) => U[e.property_code] === void 0 ? e : {
|
|
1279
1283
|
...e,
|
|
1280
|
-
value:
|
|
1284
|
+
value: U[e.property_code]
|
|
1281
1285
|
});
|
|
1282
|
-
for (let [n, r] of Object.entries(
|
|
1286
|
+
for (let [n, r] of Object.entries(U)) e.some((e) => e.property_code === n) || t.push({
|
|
1283
1287
|
property_code: n,
|
|
1284
1288
|
name: {},
|
|
1285
1289
|
type: "string",
|
|
@@ -1287,19 +1291,19 @@ function q({ screenCode: t }) {
|
|
|
1287
1291
|
});
|
|
1288
1292
|
return t;
|
|
1289
1293
|
})(),
|
|
1290
|
-
onSetProperty: k || !T ? void 0 :
|
|
1294
|
+
onSetProperty: k || !T ? void 0 : q ? (e, t) => ot((n) => ({
|
|
1291
1295
|
...n,
|
|
1292
1296
|
[e]: t
|
|
1293
1297
|
})) : void 0,
|
|
1294
1298
|
isPropertyPending: !1,
|
|
1295
1299
|
objectStatuses: (() => {
|
|
1296
|
-
let e =
|
|
1297
|
-
if (!
|
|
1298
|
-
let t = e.map((e) =>
|
|
1300
|
+
let e = Ke ?? [];
|
|
1301
|
+
if (!q || Object.keys(V).length === 0) return e.length > 0 ? e : void 0;
|
|
1302
|
+
let t = e.map((e) => V[e.group_code] === void 0 ? e : {
|
|
1299
1303
|
...e,
|
|
1300
|
-
status_code:
|
|
1304
|
+
status_code: V[e.group_code]
|
|
1301
1305
|
});
|
|
1302
|
-
for (let [n, r] of Object.entries(
|
|
1306
|
+
for (let [n, r] of Object.entries(V)) e.some((e) => e.group_code === n) || t.push({
|
|
1303
1307
|
group_code: n,
|
|
1304
1308
|
status_code: r,
|
|
1305
1309
|
status_name: {},
|
|
@@ -1307,61 +1311,61 @@ function q({ screenCode: t }) {
|
|
|
1307
1311
|
});
|
|
1308
1312
|
return t;
|
|
1309
1313
|
})(),
|
|
1310
|
-
onSetStatus: k || !T ? void 0 :
|
|
1314
|
+
onSetStatus: k || !T ? void 0 : q ? (e, t) => H((n) => ({
|
|
1311
1315
|
...n,
|
|
1312
1316
|
[e]: t
|
|
1313
1317
|
})) : void 0,
|
|
1314
1318
|
isStatusPending: !1,
|
|
1315
|
-
pendingChildren:
|
|
1316
|
-
onChildrenChange:
|
|
1317
|
-
childValidationErrors:
|
|
1318
|
-
fieldErrors:
|
|
1319
|
-
detailTabsPresentation:
|
|
1320
|
-
relatedRecordsPresentation:
|
|
1321
|
-
},
|
|
1322
|
-
screen:
|
|
1319
|
+
pendingChildren: q ? W : void 0,
|
|
1320
|
+
onChildrenChange: q ? Qt : void 0,
|
|
1321
|
+
childValidationErrors: q ? en : void 0,
|
|
1322
|
+
fieldErrors: q && pt ? Yt : void 0,
|
|
1323
|
+
detailTabsPresentation: ln,
|
|
1324
|
+
relatedRecordsPresentation: cn?.related_records
|
|
1325
|
+
}, dn = !!X.sidebar && X.sidebar.length > 0, fn = cn?.sidebar === "hidden", pn = dn && !fn && !y.isDesktop, mn = dn && !fn && y.isDesktop, hn = !k && Y ? /* @__PURE__ */ z(lt, {
|
|
1326
|
+
screen: X,
|
|
1323
1327
|
entity: S,
|
|
1324
1328
|
entityCode: C,
|
|
1325
1329
|
record: Y,
|
|
1326
|
-
refs:
|
|
1327
|
-
objectStatuses:
|
|
1330
|
+
refs: At,
|
|
1331
|
+
objectStatuses: Ke,
|
|
1328
1332
|
schema: m,
|
|
1329
|
-
locale:
|
|
1330
|
-
}) : void 0,
|
|
1331
|
-
title:
|
|
1333
|
+
locale: Jt
|
|
1334
|
+
}) : void 0, gn = /* @__PURE__ */ z(kt, {
|
|
1335
|
+
title: on,
|
|
1332
1336
|
recordId: O,
|
|
1333
|
-
editing:
|
|
1337
|
+
editing: q,
|
|
1334
1338
|
isNew: k,
|
|
1335
|
-
isRecordDeleted:
|
|
1336
|
-
dirty:
|
|
1337
|
-
isSaving:
|
|
1338
|
-
hasChildErrors:
|
|
1339
|
-
hasFieldErrors: pt &&
|
|
1339
|
+
isRecordDeleted: Mt,
|
|
1340
|
+
dirty: N,
|
|
1341
|
+
isSaving: sn,
|
|
1342
|
+
hasChildErrors: tn,
|
|
1343
|
+
hasFieldErrors: pt && Xt,
|
|
1340
1344
|
canRestore: ne,
|
|
1341
1345
|
entity: S,
|
|
1342
|
-
screen:
|
|
1346
|
+
screen: X,
|
|
1343
1347
|
globalActions: m?.actions,
|
|
1344
1348
|
entityCode: C,
|
|
1345
1349
|
record: Y,
|
|
1346
1350
|
id: O,
|
|
1347
1351
|
listRoute: Q,
|
|
1348
|
-
listRouteExists: !!
|
|
1349
|
-
highlights:
|
|
1350
|
-
showBack:
|
|
1351
|
-
onBack:
|
|
1352
|
-
onCancelEdit:
|
|
1353
|
-
onSave:
|
|
1354
|
-
onRestore:
|
|
1355
|
-
isRestoring:
|
|
1352
|
+
listRouteExists: !!Wt,
|
|
1353
|
+
highlights: hn,
|
|
1354
|
+
showBack: qt,
|
|
1355
|
+
onBack: Kt.goBack,
|
|
1356
|
+
onCancelEdit: Ht,
|
|
1357
|
+
onSave: Zt,
|
|
1358
|
+
onRestore: $t,
|
|
1359
|
+
isRestoring: Le.isPending,
|
|
1356
1360
|
refreshControl: {
|
|
1357
|
-
refetch:
|
|
1358
|
-
isFetching:
|
|
1359
|
-
isLoading:
|
|
1360
|
-
isLive:
|
|
1361
|
+
refetch: j.refetch,
|
|
1362
|
+
isFetching: j.isFetching,
|
|
1363
|
+
isLoading: j.isLoading,
|
|
1364
|
+
isLive: Ee
|
|
1361
1365
|
},
|
|
1362
1366
|
isRealtimeEntity: S?.realtime === !0,
|
|
1363
1367
|
canManageTemplates: he(m)
|
|
1364
|
-
}),
|
|
1368
|
+
}), _n = Mt && /* @__PURE__ */ B("div", {
|
|
1365
1369
|
style: {
|
|
1366
1370
|
display: "flex",
|
|
1367
1371
|
alignItems: "center",
|
|
@@ -1374,8 +1378,8 @@ function q({ screenCode: t }) {
|
|
|
1374
1378
|
color: "var(--danger)",
|
|
1375
1379
|
fontSize: 12.5
|
|
1376
1380
|
},
|
|
1377
|
-
children: [/* @__PURE__ */
|
|
1378
|
-
}),
|
|
1381
|
+
children: [/* @__PURE__ */ z(e.warning, { size: 14 }), /* @__PURE__ */ B("span", { children: ["This record was deleted on ", d(String(Y[S.soft_delete]))] })]
|
|
1382
|
+
}), vn = ct && /* @__PURE__ */ B("div", {
|
|
1379
1383
|
style: {
|
|
1380
1384
|
display: "flex",
|
|
1381
1385
|
alignItems: "center",
|
|
@@ -1388,9 +1392,9 @@ function q({ screenCode: t }) {
|
|
|
1388
1392
|
color: "var(--warn)",
|
|
1389
1393
|
fontSize: 12.5
|
|
1390
1394
|
},
|
|
1391
|
-
children: [/* @__PURE__ */
|
|
1392
|
-
}),
|
|
1393
|
-
errors: Object.entries(
|
|
1395
|
+
children: [/* @__PURE__ */ z(e.warning, { size: 14 }), /* @__PURE__ */ z("span", { children: "This record changed on the server while you were viewing or editing it." })]
|
|
1396
|
+
}), yn = q && pt && Xt && /* @__PURE__ */ z(st, {
|
|
1397
|
+
errors: Object.entries(Yt).map(([e, t]) => {
|
|
1394
1398
|
let n = S.fields.get(e);
|
|
1395
1399
|
return {
|
|
1396
1400
|
name: e,
|
|
@@ -1405,56 +1409,56 @@ function q({ screenCode: t }) {
|
|
|
1405
1409
|
behavior: "smooth"
|
|
1406
1410
|
}), t.focus?.());
|
|
1407
1411
|
}
|
|
1408
|
-
}),
|
|
1412
|
+
}), bn = Re && !k && !(X.items && X.items.length > 0) && /* @__PURE__ */ z("div", {
|
|
1409
1413
|
className: "mb-4",
|
|
1410
|
-
children: /* @__PURE__ */
|
|
1414
|
+
children: /* @__PURE__ */ z(Ye, {
|
|
1411
1415
|
statusGroups: S.status_groups ?? {},
|
|
1412
1416
|
objectStatuses: $.objectStatuses,
|
|
1413
|
-
onSetStatus: T &&
|
|
1417
|
+
onSetStatus: T && q ? (e, t) => H((n) => ({
|
|
1414
1418
|
...n,
|
|
1415
1419
|
[e]: t
|
|
1416
|
-
})) :
|
|
1420
|
+
})) : St,
|
|
1417
1421
|
isPending: !1,
|
|
1418
|
-
mode:
|
|
1422
|
+
mode: q ? "edit" : "display"
|
|
1419
1423
|
})
|
|
1420
|
-
}),
|
|
1424
|
+
}), xn = S.evidence_covered && !k && Y && /* @__PURE__ */ z("div", {
|
|
1421
1425
|
className: "mb-4",
|
|
1422
|
-
children: /* @__PURE__ */
|
|
1423
|
-
}),
|
|
1424
|
-
|
|
1425
|
-
card:
|
|
1426
|
+
children: /* @__PURE__ */ z(mt, { evidence: Y.$evidence })
|
|
1427
|
+
}), Sn = /* @__PURE__ */ B(rt, { children: [
|
|
1428
|
+
un && (Y || k) && /* @__PURE__ */ z(Dt, {
|
|
1429
|
+
card: un,
|
|
1426
1430
|
entity: S,
|
|
1427
1431
|
record: $.record,
|
|
1428
1432
|
objectStatuses: $.objectStatuses,
|
|
1429
1433
|
objectProperties: $.objectProperties
|
|
1430
1434
|
}),
|
|
1431
|
-
|
|
1432
|
-
nodes:
|
|
1435
|
+
X.items && X.items.length > 0 && (Y || k) && m && /* @__PURE__ */ z(Xe, {
|
|
1436
|
+
nodes: X.items,
|
|
1433
1437
|
ctx: $
|
|
1434
1438
|
}),
|
|
1435
|
-
!k && O && C && S.associations && Object.keys(S.associations).length > 0 && m && /* @__PURE__ */
|
|
1439
|
+
!k && O && C && S.associations && Object.keys(S.associations).length > 0 && m && /* @__PURE__ */ z(it, {
|
|
1436
1440
|
entityCode: C,
|
|
1437
|
-
recordId:
|
|
1441
|
+
recordId: ge ?? O ?? "",
|
|
1438
1442
|
associations: S.associations,
|
|
1439
1443
|
schema: m
|
|
1440
1444
|
}),
|
|
1441
|
-
!k && O && C && /* @__PURE__ */
|
|
1445
|
+
!k && O && C && /* @__PURE__ */ z(at, {
|
|
1442
1446
|
entityCode: C,
|
|
1443
|
-
objectId:
|
|
1447
|
+
objectId: ge ?? O,
|
|
1444
1448
|
canGenerateOne: !!S?.documents?.generate_one,
|
|
1445
1449
|
canManageTemplates: he(m)
|
|
1446
1450
|
}),
|
|
1447
|
-
!k && Y && m && /* @__PURE__ */
|
|
1448
|
-
screen:
|
|
1451
|
+
!k && Y && m && /* @__PURE__ */ z(ft, {
|
|
1452
|
+
screen: X,
|
|
1449
1453
|
entity: S,
|
|
1450
1454
|
entityCode: C,
|
|
1451
1455
|
record: Y,
|
|
1452
|
-
refs:
|
|
1456
|
+
refs: At,
|
|
1453
1457
|
schema: m,
|
|
1454
|
-
locale:
|
|
1458
|
+
locale: Jt
|
|
1455
1459
|
})
|
|
1456
1460
|
] });
|
|
1457
|
-
if (
|
|
1461
|
+
if (mn) return /* @__PURE__ */ B("div", {
|
|
1458
1462
|
style: {
|
|
1459
1463
|
height: "100%",
|
|
1460
1464
|
display: "flex",
|
|
@@ -1462,7 +1466,7 @@ function q({ screenCode: t }) {
|
|
|
1462
1466
|
background: "var(--background)"
|
|
1463
1467
|
},
|
|
1464
1468
|
children: [
|
|
1465
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ B("div", {
|
|
1466
1470
|
style: {
|
|
1467
1471
|
flex: 1,
|
|
1468
1472
|
minWidth: 0,
|
|
@@ -1470,21 +1474,21 @@ function q({ screenCode: t }) {
|
|
|
1470
1474
|
flexDirection: "column",
|
|
1471
1475
|
height: "100%"
|
|
1472
1476
|
},
|
|
1473
|
-
children: [/* @__PURE__ */
|
|
1477
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1474
1478
|
style: {
|
|
1475
1479
|
flexShrink: 0,
|
|
1476
1480
|
padding: "14px 20px 8px"
|
|
1477
1481
|
},
|
|
1478
1482
|
children: [
|
|
1479
|
-
fn,
|
|
1480
|
-
mn,
|
|
1481
|
-
pn,
|
|
1482
|
-
hn,
|
|
1483
1483
|
gn,
|
|
1484
|
-
|
|
1484
|
+
vn,
|
|
1485
|
+
_n,
|
|
1486
|
+
yn,
|
|
1487
|
+
bn,
|
|
1488
|
+
xn
|
|
1485
1489
|
]
|
|
1486
|
-
}), /* @__PURE__ */
|
|
1487
|
-
ref:
|
|
1490
|
+
}), /* @__PURE__ */ z("div", {
|
|
1491
|
+
ref: Pt,
|
|
1488
1492
|
style: {
|
|
1489
1493
|
flex: 1,
|
|
1490
1494
|
minHeight: 0,
|
|
@@ -1494,14 +1498,14 @@ function q({ screenCode: t }) {
|
|
|
1494
1498
|
flexDirection: "column",
|
|
1495
1499
|
gap: 16
|
|
1496
1500
|
},
|
|
1497
|
-
children:
|
|
1501
|
+
children: Sn
|
|
1498
1502
|
})]
|
|
1499
1503
|
}),
|
|
1500
|
-
/* @__PURE__ */
|
|
1504
|
+
/* @__PURE__ */ z("div", {
|
|
1501
1505
|
className: "detail-resize-handle",
|
|
1502
|
-
onMouseDown:
|
|
1506
|
+
onMouseDown: Ot,
|
|
1503
1507
|
title: "Drag to resize",
|
|
1504
|
-
children: /* @__PURE__ */
|
|
1508
|
+
children: /* @__PURE__ */ z("div", { style: {
|
|
1505
1509
|
position: "absolute",
|
|
1506
1510
|
top: 0,
|
|
1507
1511
|
bottom: 0,
|
|
@@ -1511,22 +1515,25 @@ function q({ screenCode: t }) {
|
|
|
1511
1515
|
background: "var(--border)"
|
|
1512
1516
|
} })
|
|
1513
1517
|
}),
|
|
1514
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ z("div", {
|
|
1515
1519
|
ref: Et,
|
|
1516
1520
|
style: {
|
|
1517
1521
|
flexShrink: 0,
|
|
1518
1522
|
height: "100%",
|
|
1519
|
-
width: `${
|
|
1523
|
+
width: `${bt}px`
|
|
1520
1524
|
},
|
|
1521
|
-
children: (Y || k) && m && /* @__PURE__ */
|
|
1522
|
-
nodes:
|
|
1525
|
+
children: (Y || k) && m && /* @__PURE__ */ z(Xe, {
|
|
1526
|
+
nodes: X.sidebar,
|
|
1523
1527
|
ctx: $
|
|
1524
1528
|
})
|
|
1525
1529
|
})
|
|
1526
1530
|
]
|
|
1527
1531
|
});
|
|
1528
|
-
let
|
|
1529
|
-
|
|
1532
|
+
let Cn = y.isPhone ? Ie(12) : {
|
|
1533
|
+
paddingLeft: "24px",
|
|
1534
|
+
paddingRight: "24px"
|
|
1535
|
+
};
|
|
1536
|
+
return /* @__PURE__ */ B("div", {
|
|
1530
1537
|
style: {
|
|
1531
1538
|
height: "100%",
|
|
1532
1539
|
display: "flex",
|
|
@@ -1534,33 +1541,37 @@ function q({ screenCode: t }) {
|
|
|
1534
1541
|
overflow: "hidden",
|
|
1535
1542
|
background: "var(--background)"
|
|
1536
1543
|
},
|
|
1537
|
-
children: [/* @__PURE__ */
|
|
1544
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1538
1545
|
style: {
|
|
1539
1546
|
flexShrink: 0,
|
|
1540
|
-
|
|
1547
|
+
paddingTop: y.isPhone ? 14 : 24,
|
|
1548
|
+
paddingBottom: 8,
|
|
1549
|
+
...Cn
|
|
1541
1550
|
},
|
|
1542
1551
|
children: [
|
|
1543
|
-
fn,
|
|
1544
|
-
mn,
|
|
1545
|
-
pn,
|
|
1546
|
-
hn,
|
|
1547
1552
|
gn,
|
|
1548
|
-
|
|
1553
|
+
vn,
|
|
1554
|
+
_n,
|
|
1555
|
+
yn,
|
|
1556
|
+
bn,
|
|
1557
|
+
xn
|
|
1549
1558
|
]
|
|
1550
|
-
}), /* @__PURE__ */
|
|
1551
|
-
ref:
|
|
1559
|
+
}), /* @__PURE__ */ B("div", {
|
|
1560
|
+
ref: Pt,
|
|
1552
1561
|
style: {
|
|
1553
1562
|
flex: 1,
|
|
1554
1563
|
minHeight: 0,
|
|
1555
1564
|
overflowY: "auto",
|
|
1556
|
-
|
|
1565
|
+
paddingTop: 4,
|
|
1566
|
+
paddingBottom: "calc(24px + var(--safe-area-bottom))",
|
|
1567
|
+
...Cn,
|
|
1557
1568
|
display: "flex",
|
|
1558
1569
|
flexDirection: "column",
|
|
1559
1570
|
gap: 16,
|
|
1560
1571
|
minWidth: 0,
|
|
1561
1572
|
WebkitOverflowScrolling: "touch"
|
|
1562
1573
|
},
|
|
1563
|
-
children: [
|
|
1574
|
+
children: [Sn, pn && (Y || k) && m && /* @__PURE__ */ z("div", {
|
|
1564
1575
|
"data-testid": "detail-sidebar-inline",
|
|
1565
1576
|
style: {
|
|
1566
1577
|
display: "flex",
|
|
@@ -1568,23 +1579,26 @@ function q({ screenCode: t }) {
|
|
|
1568
1579
|
gap: 16,
|
|
1569
1580
|
minWidth: 0
|
|
1570
1581
|
},
|
|
1571
|
-
children: /* @__PURE__ */
|
|
1572
|
-
nodes:
|
|
1582
|
+
children: /* @__PURE__ */ z(Xe, {
|
|
1583
|
+
nodes: X.sidebar,
|
|
1573
1584
|
ctx: $
|
|
1574
1585
|
})
|
|
1575
1586
|
})]
|
|
1576
1587
|
})]
|
|
1577
1588
|
});
|
|
1578
1589
|
}
|
|
1579
|
-
function
|
|
1590
|
+
function Dt({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
|
|
1580
1591
|
let a = (e) => {
|
|
1581
|
-
let a =
|
|
1592
|
+
let a = J(t, e, n, r, i);
|
|
1582
1593
|
return a != null && m(a) !== "";
|
|
1583
|
-
}, s = (e) =>
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1594
|
+
}, s = (e) => {
|
|
1595
|
+
let a = J(t, e, n, r, i);
|
|
1596
|
+
return m(a) || /* @__PURE__ */ z("span", {
|
|
1597
|
+
style: { color: "var(--text-3)" },
|
|
1598
|
+
children: "-"
|
|
1599
|
+
});
|
|
1600
|
+
}, c = e.titleUsesDisplay ? o(n, t) : e.titleField ? J(t, e.titleField, n, r, i) : void 0, l = m(c) || v(t.display?.name) || "Record", u = e.badgeFields.filter((t) => !e.hideEmptyFields || a(t)), d = e.bodyFields.filter((t) => !e.hideEmptyFields || a(t)), f = e.metaFields.filter((t) => !e.hideEmptyFields || a(t));
|
|
1601
|
+
return /* @__PURE__ */ B("section", {
|
|
1588
1602
|
"data-testid": "detail-header-card",
|
|
1589
1603
|
style: {
|
|
1590
1604
|
width: "100%",
|
|
@@ -1597,9 +1611,9 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1597
1611
|
boxSizing: "border-box"
|
|
1598
1612
|
},
|
|
1599
1613
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ B("div", {
|
|
1601
1615
|
style: { minWidth: 0 },
|
|
1602
|
-
children: [/* @__PURE__ */
|
|
1616
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1603
1617
|
style: {
|
|
1604
1618
|
fontSize: 15,
|
|
1605
1619
|
lineHeight: 1.25,
|
|
@@ -1607,8 +1621,8 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1607
1621
|
color: "var(--text)",
|
|
1608
1622
|
overflowWrap: "anywhere"
|
|
1609
1623
|
},
|
|
1610
|
-
children:
|
|
1611
|
-
}), e.subtitleField && /* @__PURE__ */
|
|
1624
|
+
children: l
|
|
1625
|
+
}), e.subtitleField && /* @__PURE__ */ z("div", {
|
|
1612
1626
|
style: {
|
|
1613
1627
|
marginTop: 4,
|
|
1614
1628
|
fontSize: 12.5,
|
|
@@ -1619,14 +1633,14 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1619
1633
|
children: s(e.subtitleField)
|
|
1620
1634
|
})]
|
|
1621
1635
|
}),
|
|
1622
|
-
|
|
1636
|
+
u.length > 0 && /* @__PURE__ */ z("div", {
|
|
1623
1637
|
style: {
|
|
1624
1638
|
display: "flex",
|
|
1625
1639
|
flexWrap: "wrap",
|
|
1626
1640
|
gap: 6,
|
|
1627
1641
|
marginTop: 10
|
|
1628
1642
|
},
|
|
1629
|
-
children:
|
|
1643
|
+
children: u.map((e) => /* @__PURE__ */ z("span", {
|
|
1630
1644
|
style: {
|
|
1631
1645
|
minWidth: 0,
|
|
1632
1646
|
maxWidth: "100%",
|
|
@@ -1641,7 +1655,7 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1641
1655
|
children: s(e)
|
|
1642
1656
|
}, e))
|
|
1643
1657
|
}),
|
|
1644
|
-
|
|
1658
|
+
d.length > 0 && /* @__PURE__ */ z("dl", {
|
|
1645
1659
|
style: {
|
|
1646
1660
|
display: "grid",
|
|
1647
1661
|
gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
|
|
@@ -1650,12 +1664,12 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1650
1664
|
fontSize: 12.5,
|
|
1651
1665
|
lineHeight: 1.35
|
|
1652
1666
|
},
|
|
1653
|
-
children:
|
|
1667
|
+
children: d.map((e) => /* @__PURE__ */ B("div", {
|
|
1654
1668
|
style: { display: "contents" },
|
|
1655
|
-
children: [/* @__PURE__ */
|
|
1669
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
1656
1670
|
style: { color: "var(--text-3)" },
|
|
1657
|
-
children:
|
|
1658
|
-
}), /* @__PURE__ */
|
|
1671
|
+
children: Ot(t, e)
|
|
1672
|
+
}), /* @__PURE__ */ z("dd", {
|
|
1659
1673
|
style: {
|
|
1660
1674
|
margin: 0,
|
|
1661
1675
|
color: "var(--text-2)",
|
|
@@ -1666,7 +1680,7 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1666
1680
|
})]
|
|
1667
1681
|
}, e))
|
|
1668
1682
|
}),
|
|
1669
|
-
|
|
1683
|
+
f.length > 0 && /* @__PURE__ */ z("div", {
|
|
1670
1684
|
style: {
|
|
1671
1685
|
display: "flex",
|
|
1672
1686
|
flexWrap: "wrap",
|
|
@@ -1675,13 +1689,13 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1675
1689
|
color: "var(--text-3)",
|
|
1676
1690
|
fontSize: 11.5
|
|
1677
1691
|
},
|
|
1678
|
-
children:
|
|
1692
|
+
children: f.map((e) => /* @__PURE__ */ B("span", {
|
|
1679
1693
|
style: {
|
|
1680
1694
|
minWidth: 0,
|
|
1681
1695
|
overflowWrap: "anywhere"
|
|
1682
1696
|
},
|
|
1683
1697
|
children: [
|
|
1684
|
-
|
|
1698
|
+
Ot(t, e),
|
|
1685
1699
|
": ",
|
|
1686
1700
|
s(e)
|
|
1687
1701
|
]
|
|
@@ -1690,7 +1704,7 @@ function St({ card: e, entity: t, record: n, objectStatuses: r, objectProperties
|
|
|
1690
1704
|
]
|
|
1691
1705
|
});
|
|
1692
1706
|
}
|
|
1693
|
-
function
|
|
1707
|
+
function J(e, t, n, r, i) {
|
|
1694
1708
|
if (t.startsWith("$status.")) {
|
|
1695
1709
|
let e = t.slice(8), n = r?.find((t) => t.group_code === e);
|
|
1696
1710
|
return v(n?.status_name) || n?.status_code;
|
|
@@ -1699,16 +1713,16 @@ function Ct(e, t, n, r, i) {
|
|
|
1699
1713
|
let e = t.slice(10);
|
|
1700
1714
|
return i?.find((t) => t.property_code === e)?.value;
|
|
1701
1715
|
}
|
|
1702
|
-
return
|
|
1716
|
+
return Se(e, n, t);
|
|
1703
1717
|
}
|
|
1704
|
-
function
|
|
1718
|
+
function Ot(e, t) {
|
|
1705
1719
|
if (t.startsWith("$status.")) return t.slice(8);
|
|
1706
1720
|
if (t.startsWith("$property.")) return t.slice(10);
|
|
1707
1721
|
let n = e.fields.get(t);
|
|
1708
1722
|
return n ? _(n, t) : t;
|
|
1709
1723
|
}
|
|
1710
|
-
function
|
|
1711
|
-
let { run: O } = T(), k =
|
|
1724
|
+
function kt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, dirty: l, isSaving: u, hasChildErrors: d, hasFieldErrors: f, canRestore: p, entity: m, screen: h, globalActions: g, entityCode: _, record: x, id: C, listRoute: ee, listRouteExists: ne, highlights: re, showBack: ie, onBack: ae, onCancelEdit: oe, onSave: se, onRestore: ce, isRestoring: le, refreshControl: D, isRealtimeEntity: ue, canManageTemplates: de }) {
|
|
1725
|
+
let { run: O } = T(), k = ge("detail"), me = Re(), he = te(), j = r(), _e = c(h?.action_layout, m?.action_layout, m?.actions, g, "detail_toolbar"), ve = c(h?.action_layout, m?.action_layout, m?.actions, g, "detail"), M = b(ve, m?.actions, g, x ?? {}, [], Ee(m, x ?? {})), be = b(_e, m?.actions, g, x ?? {}, [], Ee(m, x ?? {})), xe = I(() => {
|
|
1712
1726
|
if (!m) return;
|
|
1713
1727
|
let e = C ? [C] : [];
|
|
1714
1728
|
return {
|
|
@@ -1718,8 +1732,8 @@ function Tt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1718
1732
|
screenRoute: h?.route ?? "",
|
|
1719
1733
|
selectedRows: x ? [x] : [],
|
|
1720
1734
|
selectedIds: e,
|
|
1721
|
-
locale:
|
|
1722
|
-
tabNavigate: (e, t) =>
|
|
1735
|
+
locale: j,
|
|
1736
|
+
tabNavigate: (e, t) => me(e, {
|
|
1723
1737
|
title: t?.title,
|
|
1724
1738
|
icon: t?.icon,
|
|
1725
1739
|
search: t?.search
|
|
@@ -1732,10 +1746,10 @@ function Tt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1732
1746
|
h,
|
|
1733
1747
|
C,
|
|
1734
1748
|
x,
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
]),
|
|
1738
|
-
let n =
|
|
1749
|
+
j,
|
|
1750
|
+
me
|
|
1751
|
+
]), Se = (e, t) => {
|
|
1752
|
+
let n = De(e, t, { row: x ?? void 0 });
|
|
1739
1753
|
if (n === null) return;
|
|
1740
1754
|
let r = C ? [C] : [], i = e === "__delete" && ne ? ee : null;
|
|
1741
1755
|
return O({
|
|
@@ -1744,23 +1758,22 @@ function Tt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1744
1758
|
row: x ?? void 0,
|
|
1745
1759
|
execute: (e) => S(n, w(e, r)),
|
|
1746
1760
|
onSuccess: i ? () => {
|
|
1747
|
-
fe.getState().kill(
|
|
1761
|
+
fe.getState().kill(pe(location)), he(i, { replace: !0 });
|
|
1748
1762
|
} : void 0
|
|
1749
1763
|
});
|
|
1750
|
-
}, Ce = k.isVisible("show_actions") && !o && C &&
|
|
1751
|
-
layout:
|
|
1764
|
+
}, Ce = k.isVisible("show_actions") && !o && C && M.length > 0 ? /* @__PURE__ */ z(Ke, {
|
|
1765
|
+
layout: M,
|
|
1752
1766
|
row: x,
|
|
1753
|
-
onRun:
|
|
1767
|
+
onRun: Se,
|
|
1754
1768
|
kind: "detail",
|
|
1755
1769
|
entityActions: m?.actions,
|
|
1756
1770
|
globalActions: g,
|
|
1757
1771
|
reservedRightWidth: 0,
|
|
1758
|
-
widgetContext:
|
|
1759
|
-
|
|
1760
|
-
}) : null, we = !o && C ? /* @__PURE__ */ R(xe, {
|
|
1772
|
+
widgetContext: xe
|
|
1773
|
+
}) : null, we = !o && C ? /* @__PURE__ */ z(ye, {
|
|
1761
1774
|
liveObject: D,
|
|
1762
1775
|
realtime: ue
|
|
1763
|
-
}) : null, Te = k.isVisible("show_actions") && !o && C &&
|
|
1776
|
+
}) : null, Te = k.isVisible("show_actions") && !o && C && be.length > 0 ? /* @__PURE__ */ B("div", {
|
|
1764
1777
|
style: {
|
|
1765
1778
|
display: "flex",
|
|
1766
1779
|
justifyContent: "flex-end",
|
|
@@ -1768,47 +1781,47 @@ function Tt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1768
1781
|
gap: 8,
|
|
1769
1782
|
marginTop: 10
|
|
1770
1783
|
},
|
|
1771
|
-
children: [Ce ? null : we, /* @__PURE__ */
|
|
1772
|
-
layout:
|
|
1784
|
+
children: [Ce ? null : we, /* @__PURE__ */ z(Ke, {
|
|
1785
|
+
layout: be,
|
|
1773
1786
|
row: x,
|
|
1774
|
-
onRun:
|
|
1787
|
+
onRun: Se,
|
|
1775
1788
|
kind: "detail",
|
|
1776
1789
|
entityActions: m?.actions,
|
|
1777
1790
|
globalActions: g,
|
|
1778
1791
|
reservedRightWidth: 0,
|
|
1779
|
-
widgetContext:
|
|
1792
|
+
widgetContext: xe,
|
|
1780
1793
|
ariaLabel: Ce ? "Detail toolbar actions" : "Page actions"
|
|
1781
1794
|
})]
|
|
1782
|
-
}) : null,
|
|
1795
|
+
}) : null, Oe = k.isVisible("show_actions") && !o && C && _ ? /* @__PURE__ */ z(A, {
|
|
1783
1796
|
entityCode: _,
|
|
1784
1797
|
scope: "detail",
|
|
1785
1798
|
objectIds: [C],
|
|
1786
1799
|
capability: m?.documents,
|
|
1787
1800
|
canManageTemplates: de
|
|
1788
|
-
}) : null,
|
|
1801
|
+
}) : null, ke = s ? p ? /* @__PURE__ */ z(E, {
|
|
1789
1802
|
kind: "primary",
|
|
1790
|
-
icon:
|
|
1803
|
+
icon: z(le ? y : e.refresh, { size: 13 }),
|
|
1791
1804
|
onClick: ce,
|
|
1792
1805
|
disabled: le,
|
|
1793
1806
|
children: le ? "Restoring…" : "Restore"
|
|
1794
|
-
}) : null : a ? /* @__PURE__ */
|
|
1795
|
-
icon: /* @__PURE__ */
|
|
1807
|
+
}) : null : a ? /* @__PURE__ */ B(rt, { children: [/* @__PURE__ */ z(E, {
|
|
1808
|
+
icon: /* @__PURE__ */ z(e.x, { size: 13 }),
|
|
1796
1809
|
onClick: oe,
|
|
1797
1810
|
disabled: u,
|
|
1798
1811
|
children: "Cancel"
|
|
1799
|
-
}), /* @__PURE__ */
|
|
1812
|
+
}), /* @__PURE__ */ z(E, {
|
|
1800
1813
|
kind: "primary",
|
|
1801
|
-
icon:
|
|
1814
|
+
icon: z(u ? y : e.save, { size: 13 }),
|
|
1802
1815
|
onClick: se,
|
|
1803
1816
|
disabled: u || d || f,
|
|
1804
1817
|
title: d ? "Fix errors in child rows" : f ? "Fix the highlighted fields" : void 0,
|
|
1805
1818
|
children: u ? "Saving…" : "Save"
|
|
1806
|
-
})] }) : !o && C ? Ce ? /* @__PURE__ */
|
|
1819
|
+
})] }) : !o && C ? Ce ? /* @__PURE__ */ B("span", {
|
|
1807
1820
|
style: { display: "contents" },
|
|
1808
|
-
children: [
|
|
1809
|
-
}) :
|
|
1810
|
-
return /* @__PURE__ */
|
|
1811
|
-
icon: m?.display.icon ? /* @__PURE__ */
|
|
1821
|
+
children: [Oe, Ce]
|
|
1822
|
+
}) : Oe : null;
|
|
1823
|
+
return /* @__PURE__ */ B(rt, { children: [/* @__PURE__ */ z(q, {
|
|
1824
|
+
icon: m?.display.icon ? /* @__PURE__ */ z(t, {
|
|
1812
1825
|
name: m.display.icon,
|
|
1813
1826
|
size: 16
|
|
1814
1827
|
}) : void 0,
|
|
@@ -1821,9 +1834,9 @@ function Tt({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1821
1834
|
dirty: l,
|
|
1822
1835
|
showBack: ie,
|
|
1823
1836
|
onBack: ae,
|
|
1824
|
-
right:
|
|
1837
|
+
right: ke,
|
|
1825
1838
|
showTitle: k.isVisible("show_title")
|
|
1826
1839
|
}), Te] });
|
|
1827
1840
|
}
|
|
1828
1841
|
//#endregion
|
|
1829
|
-
export {
|
|
1842
|
+
export { Tt as SmartDetailPage };
|