@declarion/react 0.40.4 → 0.42.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-BkqtkJuz.js → DraggableChildrenTable-G4Sw1XAD.js} +43 -43
- package/dist-lib/{Grid-CTxov4x2.js → Grid-CXn-IK3H.js} +2 -2
- package/dist-lib/{LayoutRenderer-Cbh-pY26.js → LayoutRenderer-DX8pFS5A.js} +906 -861
- package/dist-lib/MarkdownRenderer-CreI9x2m.js +85 -0
- package/dist-lib/{MonacoJson-BfpzZ1iT.js → MonacoJson-BG3S3GHX.js} +1 -1
- package/dist-lib/{RefreshControl-DG2kMABB.js → RefreshControl-DFh0-gCb.js} +59 -61
- package/dist-lib/{SmartDetailPage.impl-DCJ_V-Nh.js → SmartDetailPage.impl-K6Jj1-9z.js} +545 -545
- package/dist-lib/{SmartRecordListPage.impl-sYCMQw8V.js → SmartRecordListPage.impl-DQW_uVfL.js} +250 -250
- package/dist-lib/declarion-react.css +2 -2
- package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
- package/dist-lib/hooks/usePageStateTtl.d.ts +1 -1
- package/dist-lib/index.d.ts +1 -1
- package/dist-lib/index.js +1217 -1217
- package/dist-lib/lib/brand-tokens.d.ts +1 -1
- package/dist-lib/lib/evidence-verdict.d.ts +0 -1
- package/dist-lib/lib/safe-url.d.ts +14 -0
- package/dist-lib/{registry-DbZX1hy8.js → registry-r4hiflwC.js} +502 -502
- package/dist-lib/testing.js +43 -43
- package/dist-lib/types/api.d.ts +1 -1
- package/dist-lib/{useCurrentScreen-C33VZcNn.js → useCurrentScreen-CpQjVmrT.js} +1409 -1292
- package/dist-lib/{useProperties-BgAEk8X9.js → useProperties-CULxrNT4.js} +44 -44
- package/dist-lib/{value-VOi8Svry.js → value-fUHxMV4r.js} +20 -20
- package/package.json +23 -23
- package/dist-lib/MarkdownRenderer-DeguFsZL.js +0 -98
package/dist-lib/{SmartRecordListPage.impl-sYCMQw8V.js → SmartRecordListPage.impl-DQW_uVfL.js}
RENAMED
|
@@ -1,138 +1,138 @@
|
|
|
1
1
|
import { s as e } from "./DynamicIcon-DeRpAaXm.js";
|
|
2
|
-
import { A as t,
|
|
3
|
-
import { G as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { t as
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { useSearchParams as
|
|
8
|
-
import { Fragment as
|
|
2
|
+
import { A as t, At as n, F as r, Gn as i, In as a, Jn as o, N as s, Nn as c, Sn as l, X as u, Xn as d, cr as ee, lr as f, nr as te, q as p, rt as m, wn as h, xn as g, yn as _ } from "./useCurrentScreen-CpQjVmrT.js";
|
|
3
|
+
import { G as v, K as y, U as ne, W as b, Y as x, _ as re, a as S, c as C, k as w, q as T, s as E, w as ie } from "./registry-r4hiflwC.js";
|
|
4
|
+
import { _ as D, c as O, f as k, h as A, m as ae, n as j, p as M, r as N, x as P } from "./useProperties-CULxrNT4.js";
|
|
5
|
+
import { t as F } from "./LayoutRenderer-DX8pFS5A.js";
|
|
6
|
+
import { useCallback as I, useEffect as L, useMemo as R, useRef as z, useState as oe } from "react";
|
|
7
|
+
import { useSearchParams as se } from "react-router";
|
|
8
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/pages/SmartRecordListPage.impl.tsx
|
|
10
|
-
function
|
|
11
|
-
let [
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
let e =
|
|
10
|
+
function U({ screenCode: t }) {
|
|
11
|
+
let [r, s] = se(), { data: c } = n(), l = te(), d = c?.screens[t], f = d?.entity ? c?.entities[d.entity] : void 0, m = d?.entity;
|
|
12
|
+
A(d, f, r.toString()), D(d?.route);
|
|
13
|
+
let _ = re(), v = r.get("selected") ?? null, y = r.get("search") ?? "", ne = p(y, 300), b = r.get("sort") ?? d?.sort_default ?? "", x = R(() => {
|
|
14
|
+
let e = k(r);
|
|
15
15
|
return e.length > 0 ? e : void 0;
|
|
16
|
-
}, [
|
|
17
|
-
let e = d?.responsive?.[
|
|
18
|
-
return
|
|
19
|
-
}, [d?.responsive,
|
|
20
|
-
let e = d?.responsive?.[
|
|
21
|
-
return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation :
|
|
22
|
-
}, [d?.responsive,
|
|
16
|
+
}, [r]), S = R(() => d?.columns ?? f?.fields.names().filter((e) => !f.fields.get(e)?.primary && !f.fields.get(e)?.auto && f.fields.get(e)?.display?.is_listable !== !1).slice(0, 4) ?? [], [d?.columns, f]), w = R(() => {
|
|
17
|
+
let e = d?.responsive?.[l.category]?.presentation;
|
|
18
|
+
return l.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
|
|
19
|
+
}, [d?.responsive, l.category]), T = R(() => {
|
|
20
|
+
let e = d?.responsive?.[l.category];
|
|
21
|
+
return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : l.category === "phone" ? "cards" : "table";
|
|
22
|
+
}, [d?.responsive, l.category]), ie = d?.responsive?.[l.category]?.layout?.related_records, j = R(() => E({
|
|
23
23
|
entity: f,
|
|
24
24
|
screen: d
|
|
25
|
-
}), [f, d]),
|
|
25
|
+
}), [f, d]), N = R(() => C({
|
|
26
26
|
entity: f,
|
|
27
27
|
screen: d,
|
|
28
|
-
presentation:
|
|
29
|
-
visibleColumns:
|
|
30
|
-
card:
|
|
31
|
-
sort:
|
|
28
|
+
presentation: T,
|
|
29
|
+
visibleColumns: S,
|
|
30
|
+
card: j,
|
|
31
|
+
sort: b
|
|
32
32
|
}), [
|
|
33
33
|
f,
|
|
34
34
|
d,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
]),
|
|
35
|
+
T,
|
|
36
|
+
S,
|
|
37
|
+
j,
|
|
38
|
+
b
|
|
39
|
+
]), F = f?.list_pagination === "cursor", { data: U, isLoading: W } = u(m, {
|
|
40
40
|
page: 1,
|
|
41
41
|
per_page: 200,
|
|
42
|
-
sort:
|
|
43
|
-
search:
|
|
44
|
-
filters:
|
|
45
|
-
select:
|
|
46
|
-
expand:
|
|
42
|
+
sort: b || void 0,
|
|
43
|
+
search: ne || void 0,
|
|
44
|
+
filters: x,
|
|
45
|
+
select: N.selectFields,
|
|
46
|
+
expand: N.expandFields,
|
|
47
47
|
preview: !0,
|
|
48
48
|
screen: d?.fixed_filters ? t : void 0
|
|
49
|
-
}, !
|
|
50
|
-
sort:
|
|
51
|
-
search:
|
|
52
|
-
filters:
|
|
53
|
-
select:
|
|
54
|
-
expand:
|
|
49
|
+
}, !F), G = P(m, {
|
|
50
|
+
sort: b || void 0,
|
|
51
|
+
search: ne || void 0,
|
|
52
|
+
filters: x,
|
|
53
|
+
select: N.selectFields,
|
|
54
|
+
expand: N.expandFields,
|
|
55
55
|
preview: !0,
|
|
56
56
|
screen: d?.fixed_filters ? t : void 0,
|
|
57
57
|
limit: 200
|
|
58
|
-
},
|
|
59
|
-
|
|
58
|
+
}, F), K = F ? G.rows : U?.data ?? [], J = F ? G.refs : U?.$refs, le = F ? G.isLoading : W, ue = R(() => f?.fields.names().find((e) => f.fields.get(e)?.primary) ?? "id", [f]), de = I((e, t) => {
|
|
59
|
+
s((t) => {
|
|
60
60
|
let n = new URLSearchParams(t);
|
|
61
61
|
return e ? n.set("selected", e) : n.delete("selected"), n;
|
|
62
62
|
}, { replace: t?.replace ?? !0 });
|
|
63
|
-
}, [
|
|
64
|
-
|
|
63
|
+
}, [s]), fe = I((e) => {
|
|
64
|
+
s((t) => {
|
|
65
65
|
let n = new URLSearchParams(t);
|
|
66
66
|
return e ? n.set("search", e) : n.delete("search"), n;
|
|
67
67
|
}, { replace: !0 });
|
|
68
|
-
}, [
|
|
69
|
-
|
|
70
|
-
let r = new URLSearchParams(n), i =
|
|
71
|
-
return a = t && t !== "__all__" ? [...
|
|
68
|
+
}, [s]), pe = I((e, t) => {
|
|
69
|
+
s((n) => {
|
|
70
|
+
let r = new URLSearchParams(n), i = k(n), a;
|
|
71
|
+
return a = t && t !== "__all__" ? [...M(i, e), O(e, t)] : M(i, e), ae(a, r), r;
|
|
72
72
|
}, { replace: !0 });
|
|
73
|
-
}, [
|
|
74
|
-
|
|
75
|
-
!
|
|
73
|
+
}, [s]), Y = (d?.list_resizable ?? !1) && w === "split" && l.category !== "phone" && !l.touch, me = z(null), [X, Z] = oe(null), Q = z(!1), $ = d?.list_width;
|
|
74
|
+
L(() => {
|
|
75
|
+
!Y || !$?.endsWith("%") || Z(null);
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
Y,
|
|
78
78
|
$,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
]),
|
|
82
|
-
if (!
|
|
83
|
-
let e =
|
|
79
|
+
l.width,
|
|
80
|
+
l.height
|
|
81
|
+
]), L(() => {
|
|
82
|
+
if (!Y || X !== null) return;
|
|
83
|
+
let e = me.current;
|
|
84
84
|
if (e) if ($ && $.endsWith("%")) {
|
|
85
85
|
let t = parseFloat($) / 100;
|
|
86
86
|
Z(Math.round(e.getBoundingClientRect().width * t));
|
|
87
87
|
} else Z($ && parseInt($, 10) || 320);
|
|
88
88
|
}, [
|
|
89
|
-
|
|
89
|
+
Y,
|
|
90
90
|
$,
|
|
91
91
|
X,
|
|
92
92
|
f
|
|
93
93
|
]);
|
|
94
|
-
let he =
|
|
95
|
-
|
|
94
|
+
let he = z(null);
|
|
95
|
+
L(() => () => {
|
|
96
96
|
he.current?.();
|
|
97
97
|
}, []);
|
|
98
|
-
let ge =
|
|
98
|
+
let ge = I((e) => {
|
|
99
99
|
e.preventDefault(), Q.current = !0;
|
|
100
100
|
let t = e.clientX, n = X ?? 320, r = (e) => {
|
|
101
101
|
if (!Q.current) return;
|
|
102
|
-
let r = (
|
|
102
|
+
let r = (me.current?.getBoundingClientRect().width ?? window.innerWidth) - 300, i = Math.max(200, Math.min(r, n + e.clientX - t));
|
|
103
103
|
Z(i);
|
|
104
104
|
}, i = () => {
|
|
105
105
|
Q.current = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", he.current = null;
|
|
106
106
|
};
|
|
107
107
|
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), he.current = i;
|
|
108
108
|
}, [X]);
|
|
109
|
-
if (!
|
|
110
|
-
let _e =
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
ref:
|
|
113
|
-
"data-record-list-presentation":
|
|
109
|
+
if (!c || !d || !f) return null;
|
|
110
|
+
let _e = x?.length ?? 0, ve = w === "split" || w === "stacked" || !v, ye = w === "split" || w === "stacked" || !!v, be = w !== "split" && v ? () => de(null, { replace: !0 }) : void 0, xe = w === "split" ? Y && X !== null ? X : d.list_width ?? "320px" : "100%";
|
|
111
|
+
return /* @__PURE__ */ H("div", {
|
|
112
|
+
ref: me,
|
|
113
|
+
"data-record-list-presentation": w,
|
|
114
114
|
style: {
|
|
115
115
|
display: "flex",
|
|
116
|
-
flexDirection:
|
|
116
|
+
flexDirection: w === "stacked" ? "column" : "row",
|
|
117
117
|
height: "100%",
|
|
118
118
|
minWidth: 0,
|
|
119
119
|
overflow: "hidden"
|
|
120
120
|
},
|
|
121
121
|
children: [
|
|
122
|
-
ve && /* @__PURE__ */
|
|
122
|
+
ve && /* @__PURE__ */ H("div", {
|
|
123
123
|
"data-testid": "record-list-panel",
|
|
124
124
|
style: {
|
|
125
|
-
flex:
|
|
125
|
+
flex: w === "split" ? "none" : "1 1 auto",
|
|
126
126
|
display: "flex",
|
|
127
127
|
flexDirection: "column",
|
|
128
128
|
overflow: "hidden",
|
|
129
|
-
borderRight:
|
|
130
|
-
borderBottom:
|
|
129
|
+
borderRight: w === "split" && !Y ? "1px solid var(--divider)" : "none",
|
|
130
|
+
borderBottom: w === "stacked" ? "1px solid var(--divider)" : "none",
|
|
131
131
|
width: xe,
|
|
132
132
|
minWidth: 0,
|
|
133
|
-
height:
|
|
133
|
+
height: w === "stacked" ? "50%" : "100%"
|
|
134
134
|
},
|
|
135
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ H("div", {
|
|
136
136
|
style: {
|
|
137
137
|
padding: 12,
|
|
138
138
|
display: "flex",
|
|
@@ -141,32 +141,32 @@ function V({ screenCode: t }) {
|
|
|
141
141
|
borderBottom: "1px solid var(--divider)"
|
|
142
142
|
},
|
|
143
143
|
children: [
|
|
144
|
-
|
|
144
|
+
_.hasOriginBack && /* @__PURE__ */ H("div", {
|
|
145
145
|
style: {
|
|
146
146
|
display: "flex",
|
|
147
147
|
alignItems: "center",
|
|
148
148
|
gap: 8
|
|
149
149
|
},
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
-
icon: /* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ V(ee, {
|
|
151
|
+
icon: /* @__PURE__ */ V(e.back, { size: 14 }),
|
|
152
152
|
title: "Back",
|
|
153
|
-
onClick:
|
|
154
|
-
}), /* @__PURE__ */
|
|
153
|
+
onClick: _.goBack
|
|
154
|
+
}), /* @__PURE__ */ V("span", {
|
|
155
155
|
style: {
|
|
156
156
|
fontSize: 12.5,
|
|
157
157
|
fontWeight: 600,
|
|
158
158
|
color: "var(--text)"
|
|
159
159
|
},
|
|
160
|
-
children:
|
|
160
|
+
children: h(d.display?.name) || h(f.display.name_plural)
|
|
161
161
|
})]
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
value:
|
|
165
|
-
onChange:
|
|
166
|
-
placeholder: `Search ${
|
|
167
|
-
prefix: /* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ V(o, {
|
|
164
|
+
value: y,
|
|
165
|
+
onChange: fe,
|
|
166
|
+
placeholder: `Search ${h(f.display.name_plural)}…`,
|
|
167
|
+
prefix: /* @__PURE__ */ V(e.search, { size: 13 })
|
|
168
168
|
}),
|
|
169
|
-
d.filters && d.filters.length > 0 && /* @__PURE__ */
|
|
169
|
+
d.filters && d.filters.length > 0 && /* @__PURE__ */ V("div", {
|
|
170
170
|
style: {
|
|
171
171
|
display: "flex",
|
|
172
172
|
flexWrap: "wrap",
|
|
@@ -175,25 +175,25 @@ function V({ screenCode: t }) {
|
|
|
175
175
|
children: d.filters.map((e) => {
|
|
176
176
|
let t = f.fields.get(e);
|
|
177
177
|
if (!t?.values) return null;
|
|
178
|
-
let n =
|
|
179
|
-
return /* @__PURE__ */
|
|
178
|
+
let n = x?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", r = g(t, e, c.entities);
|
|
179
|
+
return /* @__PURE__ */ V("div", {
|
|
180
180
|
style: { minWidth: 120 },
|
|
181
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ V(i, {
|
|
182
182
|
value: n,
|
|
183
183
|
options: [{
|
|
184
184
|
value: "__all__",
|
|
185
185
|
label: `All ${r}`
|
|
186
186
|
}, ...t.values.map((e) => ({
|
|
187
187
|
value: e.code,
|
|
188
|
-
label:
|
|
188
|
+
label: h(e.name) || e.code
|
|
189
189
|
}))],
|
|
190
|
-
onChange: (t) =>
|
|
190
|
+
onChange: (t) => pe(e, t),
|
|
191
191
|
placeholder: r
|
|
192
192
|
})
|
|
193
193
|
}, e);
|
|
194
194
|
})
|
|
195
195
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ H("div", {
|
|
197
197
|
style: {
|
|
198
198
|
display: "flex",
|
|
199
199
|
alignItems: "center",
|
|
@@ -201,8 +201,8 @@ function V({ screenCode: t }) {
|
|
|
201
201
|
fontSize: 11,
|
|
202
202
|
color: "var(--text-3)"
|
|
203
203
|
},
|
|
204
|
-
children: [/* @__PURE__ */
|
|
205
|
-
onClick: () =>
|
|
204
|
+
children: [/* @__PURE__ */ V("span", { children: le ? "Loading…" : `${K.length} ${h(f.display.name_plural)}` }), _e > 0 && /* @__PURE__ */ V("button", {
|
|
205
|
+
onClick: () => s((e) => {
|
|
206
206
|
let t = new URLSearchParams(e);
|
|
207
207
|
return t.delete("filters"), t;
|
|
208
208
|
}, { replace: !0 }),
|
|
@@ -219,28 +219,28 @@ function V({ screenCode: t }) {
|
|
|
219
219
|
})]
|
|
220
220
|
})
|
|
221
221
|
]
|
|
222
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ V("div", {
|
|
223
223
|
style: {
|
|
224
224
|
flex: 1,
|
|
225
225
|
overflowY: "auto",
|
|
226
|
-
padding:
|
|
227
|
-
display:
|
|
226
|
+
padding: T === "cards" ? 10 : 0,
|
|
227
|
+
display: T === "cards" ? "flex" : "block",
|
|
228
228
|
flexDirection: "column",
|
|
229
|
-
gap:
|
|
229
|
+
gap: T === "cards" ? 10 : void 0
|
|
230
230
|
},
|
|
231
|
-
children:
|
|
231
|
+
children: le ? /* @__PURE__ */ V("div", {
|
|
232
232
|
style: {
|
|
233
233
|
padding: 12,
|
|
234
234
|
display: "flex",
|
|
235
235
|
flexDirection: "column",
|
|
236
236
|
gap: 6
|
|
237
237
|
},
|
|
238
|
-
children: Array.from({ length: 8 }).map((e, t) => /* @__PURE__ */
|
|
238
|
+
children: Array.from({ length: 8 }).map((e, t) => /* @__PURE__ */ V("div", { style: {
|
|
239
239
|
height: 48,
|
|
240
240
|
borderRadius: 6,
|
|
241
241
|
background: "var(--surface-3)"
|
|
242
242
|
} }, t))
|
|
243
|
-
}) :
|
|
243
|
+
}) : K.length === 0 ? /* @__PURE__ */ V("div", {
|
|
244
244
|
style: {
|
|
245
245
|
padding: 28,
|
|
246
246
|
textAlign: "center",
|
|
@@ -248,23 +248,23 @@ function V({ screenCode: t }) {
|
|
|
248
248
|
color: "var(--text-3)"
|
|
249
249
|
},
|
|
250
250
|
children: "No records found"
|
|
251
|
-
}) : /* @__PURE__ */ B
|
|
252
|
-
let t =
|
|
253
|
-
return /* @__PURE__ */
|
|
251
|
+
}) : /* @__PURE__ */ H(B, { children: [K.map((e) => {
|
|
252
|
+
let t = a(e[ue]);
|
|
253
|
+
return /* @__PURE__ */ V(ce, {
|
|
254
254
|
record: e,
|
|
255
255
|
entity: f,
|
|
256
|
-
columns:
|
|
257
|
-
card:
|
|
258
|
-
presentation:
|
|
259
|
-
refs:
|
|
260
|
-
isSelected: t ===
|
|
261
|
-
onClick: () =>
|
|
256
|
+
columns: S,
|
|
257
|
+
card: j,
|
|
258
|
+
presentation: T,
|
|
259
|
+
refs: J,
|
|
260
|
+
isSelected: t === v,
|
|
261
|
+
onClick: () => de(t, { replace: w === "split" })
|
|
262
262
|
}, t);
|
|
263
|
-
}),
|
|
263
|
+
}), F && G.hasMore && /* @__PURE__ */ V("button", {
|
|
264
264
|
type: "button",
|
|
265
265
|
"data-testid": "record-list-load-more",
|
|
266
|
-
onClick: () => void
|
|
267
|
-
disabled:
|
|
266
|
+
onClick: () => void G.fetchNextPage(),
|
|
267
|
+
disabled: G.isFetchingNextPage,
|
|
268
268
|
style: {
|
|
269
269
|
width: "100%",
|
|
270
270
|
padding: "8px 12px",
|
|
@@ -273,13 +273,13 @@ function V({ screenCode: t }) {
|
|
|
273
273
|
border: "none",
|
|
274
274
|
borderTop: "1px solid var(--divider)",
|
|
275
275
|
color: "var(--text-2)",
|
|
276
|
-
cursor:
|
|
276
|
+
cursor: G.isFetchingNextPage ? "default" : "pointer"
|
|
277
277
|
},
|
|
278
|
-
children:
|
|
278
|
+
children: G.isFetchingNextPage ? "Loading…" : "Load more"
|
|
279
279
|
})] })
|
|
280
280
|
})]
|
|
281
281
|
}),
|
|
282
|
-
|
|
282
|
+
Y && /* @__PURE__ */ V("div", {
|
|
283
283
|
"data-testid": "record-list-resize-handle",
|
|
284
284
|
onMouseDown: ge,
|
|
285
285
|
style: {
|
|
@@ -292,23 +292,23 @@ function V({ screenCode: t }) {
|
|
|
292
292
|
onMouseEnter: (e) => e.currentTarget.style.background = "var(--border-strong)",
|
|
293
293
|
onMouseLeave: (e) => e.currentTarget.style.background = "var(--divider)"
|
|
294
294
|
}),
|
|
295
|
-
ye && /* @__PURE__ */
|
|
295
|
+
ye && /* @__PURE__ */ V("div", {
|
|
296
296
|
"data-testid": "record-detail-panel",
|
|
297
297
|
style: {
|
|
298
298
|
flex: 1,
|
|
299
299
|
minWidth: 0,
|
|
300
300
|
overflow: "hidden",
|
|
301
|
-
height:
|
|
301
|
+
height: w === "stacked" ? "50%" : "100%"
|
|
302
302
|
},
|
|
303
|
-
children:
|
|
304
|
-
entityCode:
|
|
305
|
-
recordId:
|
|
303
|
+
children: v ? /* @__PURE__ */ V(q, {
|
|
304
|
+
entityCode: m,
|
|
305
|
+
recordId: v,
|
|
306
306
|
items: d.items,
|
|
307
|
-
schema:
|
|
307
|
+
schema: c,
|
|
308
308
|
entity: f,
|
|
309
309
|
onBackToList: be,
|
|
310
|
-
relatedRecordsPresentation:
|
|
311
|
-
},
|
|
310
|
+
relatedRecordsPresentation: ie
|
|
311
|
+
}, v) : /* @__PURE__ */ V("div", {
|
|
312
312
|
style: {
|
|
313
313
|
display: "flex",
|
|
314
314
|
alignItems: "center",
|
|
@@ -316,11 +316,11 @@ function V({ screenCode: t }) {
|
|
|
316
316
|
height: "100%",
|
|
317
317
|
color: "var(--text-3)"
|
|
318
318
|
},
|
|
319
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ H("p", {
|
|
320
320
|
style: { fontSize: 12.5 },
|
|
321
321
|
children: [
|
|
322
322
|
"Select a ",
|
|
323
|
-
|
|
323
|
+
h(f.display.name),
|
|
324
324
|
" to view details"
|
|
325
325
|
]
|
|
326
326
|
})
|
|
@@ -329,11 +329,11 @@ function V({ screenCode: t }) {
|
|
|
329
329
|
]
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ce({ record: e, entity: n, columns: r, card: i, presentation: a, refs: o, isSelected: s, onClick: c }) {
|
|
333
333
|
let l = t();
|
|
334
334
|
if (a === "cards") {
|
|
335
|
-
let t = i.badgeFields.filter((t) =>
|
|
336
|
-
return /* @__PURE__ */
|
|
335
|
+
let t = i.badgeFields.filter((t) => W(n, e, t)), r = i.bodyFields.filter((t) => W(n, e, t)), a = i.metaFields.filter((t) => W(n, e, t));
|
|
336
|
+
return /* @__PURE__ */ H("button", {
|
|
337
337
|
type: "button",
|
|
338
338
|
"data-testid": "record-list-card",
|
|
339
339
|
"aria-current": s ? "true" : void 0,
|
|
@@ -353,19 +353,19 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
353
353
|
boxShadow: s ? "inset 3px 0 0 var(--accent)" : "none"
|
|
354
354
|
},
|
|
355
355
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ V(G, {
|
|
357
357
|
entity: n,
|
|
358
358
|
record: e,
|
|
359
359
|
field: i.titleField,
|
|
360
360
|
refs: o
|
|
361
361
|
}),
|
|
362
|
-
i.subtitleField && /* @__PURE__ */
|
|
362
|
+
i.subtitleField && /* @__PURE__ */ V("div", {
|
|
363
363
|
style: {
|
|
364
364
|
fontSize: 12,
|
|
365
365
|
color: "var(--text-3)",
|
|
366
366
|
overflowWrap: "anywhere"
|
|
367
367
|
},
|
|
368
|
-
children:
|
|
368
|
+
children: T({
|
|
369
369
|
entity: n,
|
|
370
370
|
fieldName: i.subtitleField,
|
|
371
371
|
record: e,
|
|
@@ -374,13 +374,13 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
374
374
|
locale: l
|
|
375
375
|
})
|
|
376
376
|
}),
|
|
377
|
-
t.length > 0 && /* @__PURE__ */
|
|
377
|
+
t.length > 0 && /* @__PURE__ */ V("div", {
|
|
378
378
|
style: {
|
|
379
379
|
display: "flex",
|
|
380
380
|
flexWrap: "wrap",
|
|
381
381
|
gap: 6
|
|
382
382
|
},
|
|
383
|
-
children: t.map((t) => /* @__PURE__ */
|
|
383
|
+
children: t.map((t) => /* @__PURE__ */ V("span", {
|
|
384
384
|
style: {
|
|
385
385
|
border: "1px solid var(--border)",
|
|
386
386
|
borderRadius: 999,
|
|
@@ -390,7 +390,7 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
390
390
|
maxWidth: "100%",
|
|
391
391
|
overflowWrap: "anywhere"
|
|
392
392
|
},
|
|
393
|
-
children:
|
|
393
|
+
children: T({
|
|
394
394
|
entity: n,
|
|
395
395
|
fieldName: t,
|
|
396
396
|
record: e,
|
|
@@ -400,14 +400,14 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
400
400
|
})
|
|
401
401
|
}, t))
|
|
402
402
|
}),
|
|
403
|
-
r.length > 0 && /* @__PURE__ */
|
|
403
|
+
r.length > 0 && /* @__PURE__ */ V("dl", {
|
|
404
404
|
style: {
|
|
405
405
|
display: "grid",
|
|
406
406
|
gridTemplateColumns: "minmax(72px, max-content) minmax(0, 1fr)",
|
|
407
407
|
gap: "5px 10px",
|
|
408
408
|
margin: 0
|
|
409
409
|
},
|
|
410
|
-
children: r.map((t) => /* @__PURE__ */
|
|
410
|
+
children: r.map((t) => /* @__PURE__ */ V(K, {
|
|
411
411
|
entity: n,
|
|
412
412
|
record: e,
|
|
413
413
|
fieldName: t,
|
|
@@ -415,7 +415,7 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
415
415
|
locale: l
|
|
416
416
|
}, t))
|
|
417
417
|
}),
|
|
418
|
-
a.length > 0 && /* @__PURE__ */
|
|
418
|
+
a.length > 0 && /* @__PURE__ */ V("div", {
|
|
419
419
|
style: {
|
|
420
420
|
display: "flex",
|
|
421
421
|
flexWrap: "wrap",
|
|
@@ -423,12 +423,12 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
423
423
|
fontSize: 11,
|
|
424
424
|
color: "var(--text-3)"
|
|
425
425
|
},
|
|
426
|
-
children: a.map((t) => /* @__PURE__ */
|
|
426
|
+
children: a.map((t) => /* @__PURE__ */ V("span", {
|
|
427
427
|
style: {
|
|
428
428
|
minWidth: 0,
|
|
429
429
|
overflowWrap: "anywhere"
|
|
430
430
|
},
|
|
431
|
-
children:
|
|
431
|
+
children: T({
|
|
432
432
|
entity: n,
|
|
433
433
|
fieldName: t,
|
|
434
434
|
record: e,
|
|
@@ -441,8 +441,8 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
441
441
|
]
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
let u = r[0], d = r[1],
|
|
445
|
-
return /* @__PURE__ */
|
|
444
|
+
let u = r[0], d = r[1], ee = r.slice(2, 4);
|
|
445
|
+
return /* @__PURE__ */ H("button", {
|
|
446
446
|
onClick: c,
|
|
447
447
|
style: {
|
|
448
448
|
width: "100%",
|
|
@@ -465,7 +465,7 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
465
465
|
onMouseLeave: (e) => {
|
|
466
466
|
s || (e.currentTarget.style.background = "transparent");
|
|
467
467
|
},
|
|
468
|
-
children: [u && /* @__PURE__ */
|
|
468
|
+
children: [u && /* @__PURE__ */ V("div", {
|
|
469
469
|
style: {
|
|
470
470
|
fontSize: 12.5,
|
|
471
471
|
fontWeight: 500,
|
|
@@ -474,7 +474,7 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
474
474
|
whiteSpace: "nowrap",
|
|
475
475
|
color: "var(--text)"
|
|
476
476
|
},
|
|
477
|
-
children:
|
|
477
|
+
children: T({
|
|
478
478
|
entity: n,
|
|
479
479
|
fieldName: u,
|
|
480
480
|
record: e,
|
|
@@ -482,13 +482,13 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
482
482
|
refs: o,
|
|
483
483
|
locale: l
|
|
484
484
|
})
|
|
485
|
-
}), /* @__PURE__ */
|
|
485
|
+
}), /* @__PURE__ */ H("div", {
|
|
486
486
|
style: {
|
|
487
487
|
display: "flex",
|
|
488
488
|
alignItems: "center",
|
|
489
489
|
gap: 6
|
|
490
490
|
},
|
|
491
|
-
children: [d && /* @__PURE__ */
|
|
491
|
+
children: [d && /* @__PURE__ */ V("div", {
|
|
492
492
|
style: {
|
|
493
493
|
fontSize: 11,
|
|
494
494
|
color: "var(--text-3)",
|
|
@@ -497,7 +497,7 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
497
497
|
textOverflow: "ellipsis",
|
|
498
498
|
whiteSpace: "nowrap"
|
|
499
499
|
},
|
|
500
|
-
children:
|
|
500
|
+
children: T({
|
|
501
501
|
entity: n,
|
|
502
502
|
fieldName: d,
|
|
503
503
|
record: e,
|
|
@@ -505,16 +505,16 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
505
505
|
refs: o,
|
|
506
506
|
locale: l
|
|
507
507
|
})
|
|
508
|
-
}), /* @__PURE__ */
|
|
508
|
+
}), /* @__PURE__ */ V("div", {
|
|
509
509
|
style: {
|
|
510
510
|
display: "flex",
|
|
511
511
|
alignItems: "center",
|
|
512
512
|
gap: 4,
|
|
513
513
|
flexShrink: 0
|
|
514
514
|
},
|
|
515
|
-
children:
|
|
515
|
+
children: ee.map((t) => y(n, e, t) == null ? null : /* @__PURE__ */ V("div", {
|
|
516
516
|
style: { fontSize: 11 },
|
|
517
|
-
children:
|
|
517
|
+
children: T({
|
|
518
518
|
entity: n,
|
|
519
519
|
fieldName: t,
|
|
520
520
|
record: e,
|
|
@@ -527,42 +527,42 @@ function ue({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
527
527
|
})]
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
let r =
|
|
530
|
+
function W(e, t, n) {
|
|
531
|
+
let r = y(e, t, n);
|
|
532
532
|
return !(r == null || r === "" || Array.isArray(r) && r.length === 0);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
let
|
|
536
|
-
return /* @__PURE__ */
|
|
534
|
+
function G({ entity: e, record: n, field: r, refs: i }) {
|
|
535
|
+
let a = t(), o = l(n, e);
|
|
536
|
+
return /* @__PURE__ */ V("div", {
|
|
537
537
|
style: {
|
|
538
538
|
fontSize: 13.5,
|
|
539
539
|
fontWeight: 600,
|
|
540
540
|
color: "var(--text)",
|
|
541
541
|
overflowWrap: "anywhere"
|
|
542
542
|
},
|
|
543
|
-
children: (
|
|
543
|
+
children: (r ? T({
|
|
544
544
|
entity: e,
|
|
545
|
-
fieldName:
|
|
546
|
-
record:
|
|
545
|
+
fieldName: r,
|
|
546
|
+
record: n,
|
|
547
547
|
mode: "display",
|
|
548
|
-
refs:
|
|
549
|
-
locale:
|
|
550
|
-
}) :
|
|
548
|
+
refs: i,
|
|
549
|
+
locale: a
|
|
550
|
+
}) : o) || h(e.display.name)
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
let a =
|
|
553
|
+
function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
554
|
+
let a = y(e, t, n);
|
|
555
555
|
if (a == null || a === "") return null;
|
|
556
556
|
let o = e.fields.get(n);
|
|
557
|
-
return o ? /* @__PURE__ */ B
|
|
557
|
+
return o ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("dt", {
|
|
558
558
|
style: {
|
|
559
559
|
color: "var(--text-3)",
|
|
560
560
|
fontSize: 11.5,
|
|
561
561
|
minWidth: 0,
|
|
562
562
|
overflowWrap: "anywhere"
|
|
563
563
|
},
|
|
564
|
-
children:
|
|
565
|
-
}), /* @__PURE__ */
|
|
564
|
+
children: g(o, n)
|
|
565
|
+
}), /* @__PURE__ */ V("dd", {
|
|
566
566
|
style: {
|
|
567
567
|
margin: 0,
|
|
568
568
|
color: "var(--text)",
|
|
@@ -570,7 +570,7 @@ function W({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
|
570
570
|
minWidth: 0,
|
|
571
571
|
overflowWrap: "anywhere"
|
|
572
572
|
},
|
|
573
|
-
children:
|
|
573
|
+
children: T({
|
|
574
574
|
entity: e,
|
|
575
575
|
fieldName: n,
|
|
576
576
|
record: t,
|
|
@@ -580,108 +580,108 @@ function W({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
|
580
580
|
})
|
|
581
581
|
})] }) : null;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
return /* @__PURE__ */
|
|
583
|
+
function q({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackToList: a, relatedRecordsPresentation: o }) {
|
|
584
|
+
return /* @__PURE__ */ V(s, { children: /* @__PURE__ */ V(J, {
|
|
585
585
|
entityCode: e,
|
|
586
586
|
recordId: t,
|
|
587
587
|
items: n,
|
|
588
588
|
schema: r,
|
|
589
589
|
entity: i,
|
|
590
|
-
onBackToList:
|
|
591
|
-
relatedRecordsPresentation:
|
|
590
|
+
onBackToList: a,
|
|
591
|
+
relatedRecordsPresentation: o
|
|
592
592
|
}) });
|
|
593
593
|
}
|
|
594
|
-
function
|
|
595
|
-
let
|
|
594
|
+
function J({ entityCode: t, recordId: n, items: i, schema: o, entity: s, onBackToList: u, relatedRecordsPresentation: te }) {
|
|
595
|
+
let p = _(s, "update"), { data: g, isLoading: re } = S(t, R(() => n ? c(s, n) : void 0, [n, s])), C = w(t), T = r(), [E, D] = oe(!1), [O, k] = oe({}), A = g?.data, ae = A?.$statuses, M = A?.$properties, P = N(t, n), L = j(t, n), z = R(() => {
|
|
596
596
|
let e = /* @__PURE__ */ new Set();
|
|
597
|
-
for (let [t, n] of
|
|
598
|
-
for (let [t] of
|
|
597
|
+
for (let [t, n] of s.fields) !n.auto && !n.primary && e.add(t);
|
|
598
|
+
for (let [t] of s.files ?? []) e.add(t);
|
|
599
599
|
return e;
|
|
600
|
-
}, [
|
|
601
|
-
if (
|
|
600
|
+
}, [s]), se = I(() => {
|
|
601
|
+
if (A) {
|
|
602
602
|
let e = {};
|
|
603
|
-
|
|
604
|
-
let n =
|
|
605
|
-
e[t] =
|
|
606
|
-
}),
|
|
603
|
+
z.forEach((t) => {
|
|
604
|
+
let n = y(s, A, t);
|
|
605
|
+
e[t] = v(s, t) ? n ?? null : n ?? "";
|
|
606
|
+
}), k(e);
|
|
607
607
|
}
|
|
608
|
-
|
|
608
|
+
D(!0);
|
|
609
609
|
}, [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
]),
|
|
614
|
-
await
|
|
615
|
-
}, [
|
|
616
|
-
let e = {}, t =
|
|
617
|
-
entity:
|
|
618
|
-
formData:
|
|
619
|
-
record:
|
|
610
|
+
A,
|
|
611
|
+
z,
|
|
612
|
+
s
|
|
613
|
+
]), U = I(async () => {
|
|
614
|
+
await T.flushAllDrafts(), D(!1), k({});
|
|
615
|
+
}, [T]), ce = I(() => {
|
|
616
|
+
let e = {}, t = ne({
|
|
617
|
+
entity: s,
|
|
618
|
+
formData: O,
|
|
619
|
+
record: A,
|
|
620
620
|
isNew: !1
|
|
621
|
-
}),
|
|
622
|
-
for (let [t, n] of Object.entries(
|
|
621
|
+
}), r = b(t);
|
|
622
|
+
for (let [t, n] of Object.entries(O)) s.files?.has(t) || (e[t] = x(s, t, n));
|
|
623
623
|
if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(e).length === 0) {
|
|
624
|
-
|
|
624
|
+
D(!1), k({});
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
|
-
|
|
628
|
-
pkValues:
|
|
627
|
+
C.mutate({
|
|
628
|
+
pkValues: n,
|
|
629
629
|
data: e
|
|
630
630
|
}, {
|
|
631
631
|
onSuccess: () => {
|
|
632
|
-
|
|
632
|
+
r.forEach((e) => T.markCommitted(e)), D(!1), k({}), m.success("Saved");
|
|
633
633
|
},
|
|
634
634
|
onError: () => m.error("Failed to save")
|
|
635
635
|
});
|
|
636
636
|
}, [
|
|
637
|
+
T,
|
|
637
638
|
C,
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
D((n) => ({
|
|
639
|
+
n,
|
|
640
|
+
s,
|
|
641
|
+
O,
|
|
642
|
+
A
|
|
643
|
+
]), W = I((e, t) => {
|
|
644
|
+
k((n) => ({
|
|
645
645
|
...n,
|
|
646
646
|
[e]: t
|
|
647
647
|
}));
|
|
648
648
|
}, []);
|
|
649
|
-
if (
|
|
650
|
-
if (!
|
|
651
|
-
let
|
|
652
|
-
schema:
|
|
653
|
-
entity:
|
|
649
|
+
if (re) return /* @__PURE__ */ V(ie, {});
|
|
650
|
+
if (!A) return null;
|
|
651
|
+
let G = l(A, s), K = s.display?.display_field, q = G ? void 0 : K ? A[K] : A[s.fields.names()[0]], J = G || (q != null && typeof q != "object" ? a(q) : h(s.display.name)), le = A?.$refs, ue = {
|
|
652
|
+
schema: o,
|
|
653
|
+
entity: s,
|
|
654
654
|
entityCode: t,
|
|
655
|
-
recordId:
|
|
656
|
-
record:
|
|
657
|
-
...
|
|
658
|
-
...
|
|
659
|
-
} :
|
|
655
|
+
recordId: n,
|
|
656
|
+
record: E ? {
|
|
657
|
+
...A,
|
|
658
|
+
...O
|
|
659
|
+
} : A,
|
|
660
660
|
isNew: !1,
|
|
661
|
-
mode:
|
|
662
|
-
onFieldChange:
|
|
663
|
-
refs:
|
|
664
|
-
objectProperties:
|
|
665
|
-
onSetProperty:
|
|
661
|
+
mode: E ? "edit" : "display",
|
|
662
|
+
onFieldChange: E ? W : void 0,
|
|
663
|
+
refs: le,
|
|
664
|
+
objectProperties: M ?? void 0,
|
|
665
|
+
onSetProperty: p ? (e, t) => L.mutate({
|
|
666
666
|
propertyCode: e,
|
|
667
667
|
value: t
|
|
668
668
|
}) : void 0,
|
|
669
|
-
isPropertyPending:
|
|
670
|
-
objectStatuses:
|
|
671
|
-
onSetStatus:
|
|
669
|
+
isPropertyPending: L.isPending,
|
|
670
|
+
objectStatuses: ae ?? void 0,
|
|
671
|
+
onSetStatus: p ? (e, t) => P.mutate({
|
|
672
672
|
groupCode: e,
|
|
673
673
|
statusCode: t
|
|
674
674
|
}) : void 0,
|
|
675
|
-
isStatusPending:
|
|
675
|
+
isStatusPending: P.isPending,
|
|
676
676
|
relatedRecordsPresentation: te
|
|
677
677
|
};
|
|
678
|
-
return /* @__PURE__ */
|
|
678
|
+
return /* @__PURE__ */ H("div", {
|
|
679
679
|
style: {
|
|
680
680
|
display: "flex",
|
|
681
681
|
flexDirection: "column",
|
|
682
682
|
height: "100%"
|
|
683
683
|
},
|
|
684
|
-
children: [/* @__PURE__ */
|
|
684
|
+
children: [/* @__PURE__ */ H("div", {
|
|
685
685
|
style: {
|
|
686
686
|
display: "flex",
|
|
687
687
|
alignItems: "center",
|
|
@@ -693,7 +693,7 @@ function K({ entityCode: t, recordId: a, items: s, schema: l, entity: u, onBackT
|
|
|
693
693
|
background: "var(--surface)",
|
|
694
694
|
zIndex: 10
|
|
695
695
|
},
|
|
696
|
-
children: [/* @__PURE__ */
|
|
696
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
697
697
|
style: {
|
|
698
698
|
margin: 0,
|
|
699
699
|
fontSize: 13,
|
|
@@ -703,37 +703,37 @@ function K({ entityCode: t, recordId: a, items: s, schema: l, entity: u, onBackT
|
|
|
703
703
|
whiteSpace: "nowrap",
|
|
704
704
|
color: "var(--text)"
|
|
705
705
|
},
|
|
706
|
-
children:
|
|
707
|
-
}), /* @__PURE__ */
|
|
706
|
+
children: J
|
|
707
|
+
}), /* @__PURE__ */ H("div", {
|
|
708
708
|
style: {
|
|
709
709
|
display: "flex",
|
|
710
710
|
alignItems: "center",
|
|
711
711
|
gap: 6
|
|
712
712
|
},
|
|
713
|
-
children: [
|
|
714
|
-
icon: /* @__PURE__ */
|
|
713
|
+
children: [u && /* @__PURE__ */ V(ee, {
|
|
714
|
+
icon: /* @__PURE__ */ V(e.back, { size: 14 }),
|
|
715
715
|
title: "Back to list",
|
|
716
|
-
onClick:
|
|
717
|
-
}),
|
|
716
|
+
onClick: u
|
|
717
|
+
}), p && (E ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(f, {
|
|
718
718
|
size: "xs",
|
|
719
|
-
icon: /* @__PURE__ */
|
|
720
|
-
onClick:
|
|
719
|
+
icon: /* @__PURE__ */ V(e.x, { size: 12 }),
|
|
720
|
+
onClick: U,
|
|
721
721
|
children: "Cancel"
|
|
722
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ V(f, {
|
|
723
723
|
kind: "primary",
|
|
724
724
|
size: "xs",
|
|
725
|
-
icon:
|
|
726
|
-
onClick:
|
|
727
|
-
disabled:
|
|
728
|
-
children:
|
|
729
|
-
})] }) : /* @__PURE__ */
|
|
725
|
+
icon: C.isPending ? /* @__PURE__ */ V(d, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
|
|
726
|
+
onClick: ce,
|
|
727
|
+
disabled: C.isPending,
|
|
728
|
+
children: C.isPending ? "Saving…" : "Save"
|
|
729
|
+
})] }) : /* @__PURE__ */ V(f, {
|
|
730
730
|
size: "xs",
|
|
731
|
-
icon: /* @__PURE__ */
|
|
732
|
-
onClick:
|
|
731
|
+
icon: /* @__PURE__ */ V(e.edit, { size: 12 }),
|
|
732
|
+
onClick: se,
|
|
733
733
|
children: "Edit"
|
|
734
734
|
}))]
|
|
735
735
|
})]
|
|
736
|
-
}), /* @__PURE__ */
|
|
736
|
+
}), /* @__PURE__ */ V("div", {
|
|
737
737
|
style: {
|
|
738
738
|
flex: 1,
|
|
739
739
|
overflowY: "auto",
|
|
@@ -742,17 +742,17 @@ function K({ entityCode: t, recordId: a, items: s, schema: l, entity: u, onBackT
|
|
|
742
742
|
flexDirection: "column",
|
|
743
743
|
gap: 12
|
|
744
744
|
},
|
|
745
|
-
children:
|
|
746
|
-
nodes:
|
|
747
|
-
ctx:
|
|
748
|
-
}) : /* @__PURE__ */
|
|
745
|
+
children: i && i.length > 0 ? /* @__PURE__ */ V(F, {
|
|
746
|
+
nodes: i,
|
|
747
|
+
ctx: ue
|
|
748
|
+
}) : /* @__PURE__ */ H("p", {
|
|
749
749
|
style: {
|
|
750
750
|
fontSize: 12.5,
|
|
751
751
|
color: "var(--text-3)"
|
|
752
752
|
},
|
|
753
753
|
children: [
|
|
754
754
|
"No layout configured. Add ",
|
|
755
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ V("code", { children: "items:" }),
|
|
756
756
|
" to the screen definition."
|
|
757
757
|
]
|
|
758
758
|
})
|
|
@@ -760,4 +760,4 @@ function K({ entityCode: t, recordId: a, items: s, schema: l, entity: u, onBackT
|
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
//#endregion
|
|
763
|
-
export {
|
|
763
|
+
export { U as SmartRecordListPage };
|