@declarion/react 0.59.2 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-BY-Ir7Sh.js} +39 -39
- package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-B9p1XhjC.js} +11 -11
- package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-CtL7rdT6.js} +34 -34
- package/dist-lib/{Grid-CQabaBLx.js → Grid-CYERLdXO.js} +1 -1
- package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-B08IJKsZ.js} +465 -465
- package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-Dje_rays.js} +26 -26
- package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-N0IWjTH5.js} +1 -1
- package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-BEWSHtAC.js} +26 -26
- package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-CYiM-ITJ.js} +470 -470
- package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +3051 -0
- package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +780 -0
- package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-DKKeCGTH.js} +1 -1
- package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-DbiOpvd6.js} +187 -187
- package/dist-lib/api/data.d.ts +5 -1
- package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-nveYLvHR.js} +1 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
- package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
- package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
- package/dist-lib/{failure-v-uGSpbX.js → failure-BT54OLHy.js} +5 -5
- package/dist-lib/{format-count-DA4wmmWR.js → format-count-DLFCdtME.js} +246 -246
- package/dist-lib/hooks/useObject.d.ts +3 -2
- package/dist-lib/index.js +613 -613
- package/dist-lib/lib/field-classification.d.ts +10 -1
- package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-DSExeoAh.js} +6 -6
- package/dist-lib/{registry-Cb3W-czW.js → registry-CRPxNbkk.js} +444 -438
- package/dist-lib/testing.js +2 -2
- package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-BavrHfrU.js} +14 -14
- package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-BPq7HMF1.js} +1083 -1017
- package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-CG1WM4cv.js} +5 -5
- package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-C18iWRgr.js} +132 -158
- package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-C35JrjwQ.js} +2 -2
- package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-DKktWWLB.js} +1 -1
- package/package.json +1 -1
- package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
- package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
-
import { $ as n, D as r,
|
|
2
|
+
import { $ as n, D as r, Dn as i, En as a, Fn as o, G as s, It as c, Jn as l, Kn as u, L as d, O as f, Q as p, R as m, Rt as h, Tn as g, Vn as _, W as v, Wn as y, X as b, fn as x, gn as S, i as C, jt as w, kn as T, pn as E, q as D, qn as O, rt as k, sn as A, tt as j, un as M, yn as N, zt as P } from "./useCurrentScreen-BPq7HMF1.js";
|
|
3
3
|
import { A as F, M as I, f as L, s as R, t as z } from "./useText-BFDCTUSo.js";
|
|
4
|
-
import { a as B, c as V, f as H, m as U, o as ee, s as te, t as ne, u as W, y as re } from "./failure-
|
|
5
|
-
import {
|
|
6
|
-
import { c as ie, l as ae, o as oe, t as se } from "./action-dispatch-
|
|
4
|
+
import { a as B, c as V, f as H, m as U, o as ee, s as te, t as ne, u as W, y as re } from "./failure-BT54OLHy.js";
|
|
5
|
+
import { E as G } from "./useOwnRefresh-C18iWRgr.js";
|
|
6
|
+
import { c as ie, l as ae, o as oe, t as se } from "./action-dispatch-DbiOpvd6.js";
|
|
7
7
|
import { n as ce, r as le, t as ue } from "./dataTableStyles-vwD1mVOP.js";
|
|
8
8
|
import { Component as K, createContext as de, useCallback as q, useContext as fe, useEffect as pe, useId as me, useMemo as J, useRef as Y, useState as X } from "react";
|
|
9
9
|
import { QueryClientContext as he, useInfiniteQuery as ge, useQuery as _e, useQueryClient as Z } from "@tanstack/react-query";
|
|
@@ -21,16 +21,16 @@ var xe = {
|
|
|
21
21
|
shadow: "none"
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children:
|
|
25
|
-
let
|
|
24
|
+
function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children: o, footer: s, collapsible: c = !0, defaultOpen: l = !0, icon: d, emphasis: f = "primary", headingLevel: p = 2, padding: m = "16px" }) {
|
|
25
|
+
let h = z(), [g, _] = X(l), v = xe[f] ?? xe.primary;
|
|
26
26
|
return /* @__PURE__ */ $("div", {
|
|
27
|
-
"data-emphasis":
|
|
27
|
+
"data-emphasis": f,
|
|
28
28
|
style: {
|
|
29
|
-
background:
|
|
29
|
+
background: v.surface,
|
|
30
30
|
border: "1px solid var(--border)",
|
|
31
31
|
borderRadius: 10,
|
|
32
32
|
overflow: "hidden",
|
|
33
|
-
boxShadow:
|
|
33
|
+
boxShadow: v.shadow,
|
|
34
34
|
flexShrink: 0
|
|
35
35
|
},
|
|
36
36
|
children: [
|
|
@@ -40,25 +40,25 @@ function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children: s,
|
|
|
40
40
|
alignItems: "center",
|
|
41
41
|
gap: 10,
|
|
42
42
|
padding: "10px 14px",
|
|
43
|
-
borderBottom:
|
|
43
|
+
borderBottom: g ? "1px solid var(--divider)" : "none",
|
|
44
44
|
minHeight: 40
|
|
45
45
|
},
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ Q("div", {
|
|
48
48
|
role: "heading",
|
|
49
|
-
"aria-level":
|
|
49
|
+
"aria-level": p,
|
|
50
50
|
style: {
|
|
51
51
|
display: "flex",
|
|
52
52
|
flex: 1,
|
|
53
53
|
minWidth: 0
|
|
54
54
|
},
|
|
55
55
|
children: /* @__PURE__ */ $("div", {
|
|
56
|
-
role:
|
|
57
|
-
tabIndex:
|
|
58
|
-
"aria-expanded":
|
|
59
|
-
onClick:
|
|
60
|
-
onKeyDown:
|
|
61
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
56
|
+
role: c ? "button" : void 0,
|
|
57
|
+
tabIndex: c ? 0 : void 0,
|
|
58
|
+
"aria-expanded": c ? g : void 0,
|
|
59
|
+
onClick: c ? () => _((e) => !e) : void 0,
|
|
60
|
+
onKeyDown: c ? (e) => {
|
|
61
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), _((e) => !e));
|
|
62
62
|
} : void 0,
|
|
63
63
|
style: {
|
|
64
64
|
display: "flex",
|
|
@@ -66,17 +66,17 @@ function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children: s,
|
|
|
66
66
|
gap: 8,
|
|
67
67
|
flex: 1,
|
|
68
68
|
minWidth: 0,
|
|
69
|
-
cursor:
|
|
69
|
+
cursor: c ? "pointer" : "default",
|
|
70
70
|
userSelect: "none"
|
|
71
71
|
},
|
|
72
72
|
children: [
|
|
73
|
-
|
|
73
|
+
d && /* @__PURE__ */ Q("span", {
|
|
74
74
|
style: {
|
|
75
75
|
color: "var(--text-3)",
|
|
76
76
|
display: "flex",
|
|
77
77
|
flexShrink: 0
|
|
78
78
|
},
|
|
79
|
-
children:
|
|
79
|
+
children: d
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ Q("div", {
|
|
82
82
|
style: {
|
|
@@ -120,26 +120,26 @@ function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children: s,
|
|
|
120
120
|
]
|
|
121
121
|
})
|
|
122
122
|
}),
|
|
123
|
-
i && /* @__PURE__ */ Q(
|
|
123
|
+
i && /* @__PURE__ */ Q(u, {
|
|
124
124
|
tone: i.tone ?? "violet",
|
|
125
125
|
size: "xs",
|
|
126
126
|
dot: i.dot,
|
|
127
127
|
children: i.text
|
|
128
128
|
}),
|
|
129
129
|
r,
|
|
130
|
-
|
|
130
|
+
c && /* @__PURE__ */ Q(O, {
|
|
131
131
|
size: 24,
|
|
132
|
-
icon: Q(
|
|
133
|
-
onClick: () =>
|
|
134
|
-
title:
|
|
132
|
+
icon: Q(g ? e.up : e.down, { size: 14 }),
|
|
133
|
+
onClick: () => _((e) => !e),
|
|
134
|
+
title: g ? h("control.collapse", "Collapse") : h("control.expand", "Expand")
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
}),
|
|
138
|
-
|
|
139
|
-
style: { padding:
|
|
140
|
-
children:
|
|
138
|
+
g && /* @__PURE__ */ Q("div", {
|
|
139
|
+
style: { padding: m },
|
|
140
|
+
children: o
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
s && g && /* @__PURE__ */ Q("div", {
|
|
143
143
|
style: {
|
|
144
144
|
padding: "8px 14px",
|
|
145
145
|
borderTop: "1px solid var(--divider)",
|
|
@@ -147,7 +147,7 @@ function Se({ title: t, subtitle: n, right: r, badge: i, count: a, children: s,
|
|
|
147
147
|
fontSize: 11.5,
|
|
148
148
|
color: "var(--text-3)"
|
|
149
149
|
},
|
|
150
|
-
children:
|
|
150
|
+
children: s
|
|
151
151
|
})
|
|
152
152
|
]
|
|
153
153
|
});
|
|
@@ -212,12 +212,12 @@ function Ne({ columns: e = 2, children: t }) {
|
|
|
212
212
|
})
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
|
-
function Pe({ label: t, children: n, span: r = !1, required: i, error: a, hint: o, actions: s, copyValue: c, mode: l = "display", htmlFor:
|
|
216
|
-
let
|
|
215
|
+
function Pe({ label: t, children: n, span: r = !1, required: i, error: a, hint: o, actions: s, copyValue: c, mode: l = "display", htmlFor: u, labelId: d, labelTitle: f, "data-testid": p }) {
|
|
216
|
+
let m = z(), g = fe(Me), _ = r || g.stackPairs, v = !!a;
|
|
217
217
|
return /* @__PURE__ */ $("div", {
|
|
218
218
|
className: "detail-row",
|
|
219
219
|
"data-error": v || void 0,
|
|
220
|
-
"data-testid":
|
|
220
|
+
"data-testid": p,
|
|
221
221
|
style: {
|
|
222
222
|
display: "flex",
|
|
223
223
|
flexDirection: _ ? "column" : "row",
|
|
@@ -239,14 +239,14 @@ function Pe({ label: t, children: n, span: r = !1, required: i, error: a, hint:
|
|
|
239
239
|
alignItems: "flex-start",
|
|
240
240
|
gap: 2
|
|
241
241
|
},
|
|
242
|
-
children: [
|
|
243
|
-
id:
|
|
244
|
-
htmlFor:
|
|
245
|
-
title:
|
|
242
|
+
children: [u ? /* @__PURE__ */ Q("label", {
|
|
243
|
+
id: d,
|
|
244
|
+
htmlFor: u,
|
|
245
|
+
title: f || void 0,
|
|
246
246
|
children: t
|
|
247
247
|
}) : /* @__PURE__ */ Q("span", {
|
|
248
|
-
id:
|
|
249
|
-
title:
|
|
248
|
+
id: d,
|
|
249
|
+
title: f || void 0,
|
|
250
250
|
children: t
|
|
251
251
|
}), i && l === "edit" && /* @__PURE__ */ Q("span", {
|
|
252
252
|
"aria-hidden": "true",
|
|
@@ -296,10 +296,10 @@ function Pe({ label: t, children: n, span: r = !1, required: i, error: a, hint:
|
|
|
296
296
|
flexShrink: 0,
|
|
297
297
|
marginTop: -2
|
|
298
298
|
},
|
|
299
|
-
children: [c && /* @__PURE__ */ Q(
|
|
299
|
+
children: [c && /* @__PURE__ */ Q(h, {
|
|
300
300
|
value: c,
|
|
301
301
|
size: "sm",
|
|
302
|
-
title:
|
|
302
|
+
title: m("record.field.copy_value", "Copy value")
|
|
303
303
|
}), s]
|
|
304
304
|
})]
|
|
305
305
|
}), (v || o != null) && /* @__PURE__ */ $("div", {
|
|
@@ -318,19 +318,25 @@ function Pe({ label: t, children: n, span: r = !1, required: i, error: a, hint:
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/hooks/useObject.ts
|
|
321
|
-
function Fe(e, t) {
|
|
322
|
-
|
|
321
|
+
function Fe(e, t, n = {}) {
|
|
322
|
+
let r = t === void 0 || t === "new" ? void 0 : typeof t == "string" ? t : Object.keys(t).sort().map((e) => [e, t[e]]), i = n.expand?.join(",");
|
|
323
|
+
return i ? [
|
|
324
|
+
"entity-item",
|
|
325
|
+
e,
|
|
326
|
+
r,
|
|
327
|
+
i
|
|
328
|
+
] : [
|
|
323
329
|
"entity-item",
|
|
324
330
|
e,
|
|
325
|
-
|
|
331
|
+
r
|
|
326
332
|
];
|
|
327
333
|
}
|
|
328
|
-
function Ie(e, t) {
|
|
329
|
-
let
|
|
334
|
+
function Ie(e, t, n = {}) {
|
|
335
|
+
let r = Fe(e, t, n), i = r[2];
|
|
330
336
|
return _e({
|
|
331
|
-
queryKey:
|
|
332
|
-
queryFn: () => H(e, t),
|
|
333
|
-
enabled: !!e && !!t && t !== "new" &&
|
|
337
|
+
queryKey: r,
|
|
338
|
+
queryFn: () => H(e, t, n),
|
|
339
|
+
enabled: !!e && !!t && t !== "new" && i !== void 0
|
|
334
340
|
});
|
|
335
341
|
}
|
|
336
342
|
//#endregion
|
|
@@ -368,102 +374,102 @@ function Le(e, t, n, i, a, o, s, c) {
|
|
|
368
374
|
}
|
|
369
375
|
//#endregion
|
|
370
376
|
//#region src/components/actions/ActionButton.tsx
|
|
371
|
-
function Re({ actionCode: n, action: r, entityCode: i, objectIds: a = [], row: o, variant:
|
|
372
|
-
let
|
|
377
|
+
function Re({ actionCode: n, action: r, entityCode: i, objectIds: a = [], row: o, variant: s = "outline", size: c = "default", onSuccess: u }) {
|
|
378
|
+
let f = z(), h = z("errors"), [g, _] = X(!1), [v, y] = X(!1), { data: x } = L(), S = G(), { run: w } = C(), T = p(r), E = !o || D(r.conditions, o), k = q(async () => {
|
|
373
379
|
if (r.association && a.length !== 0) {
|
|
374
|
-
|
|
380
|
+
_(!0);
|
|
375
381
|
try {
|
|
376
|
-
let e = i ? `${i}.${r.association}` : r.association, t = await U(e, a), n =
|
|
382
|
+
let e = i ? `${i}.${r.association}` : r.association, t = await U(e, a), n = b(x, t.target_entity);
|
|
377
383
|
if (!n) {
|
|
378
|
-
|
|
384
|
+
P.error(h("action.list_screen_missing", "No list screen is declared for this entity."), t.target_entity);
|
|
379
385
|
return;
|
|
380
386
|
}
|
|
381
|
-
let o =
|
|
387
|
+
let o = x?.entities[t.target_entity], s = f(r.display?.name) || t.target_entity;
|
|
382
388
|
if (t.ids.length === 0) {
|
|
383
|
-
|
|
389
|
+
P.info(f("action.association.none_related", "No related {name} found", { name: s }));
|
|
384
390
|
return;
|
|
385
391
|
}
|
|
386
392
|
let c = o?.fields.names().find((e) => o.fields.get(e)?.primary) ?? "id", l = new URLSearchParams();
|
|
387
|
-
l.set(`filter_${c}`, t.ids.join(",")),
|
|
393
|
+
l.set(`filter_${c}`, t.ids.join(",")), S(n.route, {
|
|
388
394
|
title: s,
|
|
389
395
|
icon: r.display?.icon || n.icon,
|
|
390
396
|
search: l.toString()
|
|
391
|
-
}),
|
|
397
|
+
}), u?.();
|
|
392
398
|
} catch (e) {
|
|
393
|
-
|
|
399
|
+
P.error(ne(h, e));
|
|
394
400
|
} finally {
|
|
395
|
-
|
|
401
|
+
_(!1);
|
|
396
402
|
}
|
|
397
403
|
}
|
|
398
404
|
}, [
|
|
405
|
+
f,
|
|
399
406
|
h,
|
|
400
|
-
g,
|
|
401
407
|
r,
|
|
402
408
|
i,
|
|
403
409
|
a,
|
|
410
|
+
x,
|
|
404
411
|
S,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
x(!0), E({
|
|
412
|
+
u
|
|
413
|
+
]), A = r.entity ? `${r.entity}.${n}` : n, M = a.length > 0 ? a : void 0, N = q(() => {
|
|
414
|
+
y(!0), w({
|
|
409
415
|
action: r,
|
|
410
|
-
title:
|
|
416
|
+
title: f(r.display?.name) || n,
|
|
411
417
|
row: o,
|
|
412
418
|
entity: i,
|
|
413
|
-
execute: (e) => W(
|
|
414
|
-
onSuccess: () =>
|
|
415
|
-
}).finally(() =>
|
|
419
|
+
execute: (e) => W(A, B(e, M)),
|
|
420
|
+
onSuccess: () => u?.()
|
|
421
|
+
}).finally(() => y(!1));
|
|
416
422
|
}, [
|
|
417
|
-
|
|
418
|
-
|
|
423
|
+
f,
|
|
424
|
+
w,
|
|
419
425
|
r,
|
|
420
426
|
n,
|
|
421
427
|
o,
|
|
422
428
|
i,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
429
|
+
A,
|
|
430
|
+
M,
|
|
431
|
+
u
|
|
426
432
|
]), F = q(() => {
|
|
427
|
-
if (
|
|
428
|
-
|
|
433
|
+
if (m(r)) {
|
|
434
|
+
d(h, r.ui_steps, { row: o }).then(() => u?.());
|
|
429
435
|
return;
|
|
430
436
|
}
|
|
431
|
-
if (
|
|
432
|
-
|
|
437
|
+
if (T) {
|
|
438
|
+
k();
|
|
433
439
|
return;
|
|
434
440
|
}
|
|
435
441
|
if (r.href && !r.handler && !r.association) {
|
|
436
|
-
let e = i ?
|
|
437
|
-
i && (a = a.replaceAll("${entity}", i)), t && (a = a.replaceAll("${id}", encodeURIComponent(t))),
|
|
438
|
-
title:
|
|
442
|
+
let e = i ? x?.entities[i] : void 0, t = j(o, e), a = r.href;
|
|
443
|
+
i && (a = a.replaceAll("${entity}", i)), t && (a = a.replaceAll("${id}", encodeURIComponent(t))), S(a, {
|
|
444
|
+
title: f(r.display?.name) || n,
|
|
439
445
|
icon: r.display?.icon
|
|
440
|
-
}),
|
|
446
|
+
}), u?.();
|
|
441
447
|
return;
|
|
442
448
|
}
|
|
443
|
-
|
|
449
|
+
N();
|
|
444
450
|
}, [
|
|
451
|
+
f,
|
|
445
452
|
h,
|
|
446
|
-
g,
|
|
447
453
|
r,
|
|
448
454
|
o,
|
|
449
455
|
i,
|
|
450
|
-
|
|
456
|
+
x?.entities,
|
|
451
457
|
n,
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
]), I =
|
|
458
|
+
S,
|
|
459
|
+
T,
|
|
460
|
+
k,
|
|
461
|
+
N,
|
|
462
|
+
u
|
|
463
|
+
]), I = f(r.display?.name), R = r.display?.icon, V = R && e[R], H = V ? /* @__PURE__ */ Q(V, { size: 13 }) : R ? /* @__PURE__ */ Q(t, {
|
|
458
464
|
name: R,
|
|
459
465
|
size: 13
|
|
460
|
-
}) : null, ee = !
|
|
461
|
-
return
|
|
466
|
+
}) : null, ee = !E || v || g;
|
|
467
|
+
return c === "icon" ? /* @__PURE__ */ Q(O, {
|
|
462
468
|
icon: H ?? /* @__PURE__ */ Q(e.bolt, { size: 13 }),
|
|
463
469
|
onClick: F,
|
|
464
470
|
title: I
|
|
465
|
-
}) : /* @__PURE__ */ Q(
|
|
466
|
-
kind:
|
|
471
|
+
}) : /* @__PURE__ */ Q(l, {
|
|
472
|
+
kind: s === "default" ? "primary" : s === "ghost" ? "ghost" : "default",
|
|
467
473
|
size: "sm",
|
|
468
474
|
icon: H,
|
|
469
475
|
danger: r.destructive,
|
|
@@ -476,31 +482,31 @@ function Re({ actionCode: n, action: r, entityCode: i, objectIds: a = [], row: o
|
|
|
476
482
|
}
|
|
477
483
|
//#endregion
|
|
478
484
|
//#region src/components/actions/RowActionsKebab.tsx
|
|
479
|
-
function ze({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu: o, divider: s, size:
|
|
480
|
-
let
|
|
485
|
+
function ze({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu: o, divider: s, size: c = 22, align: l = "end" }) {
|
|
486
|
+
let u = z(), d = Y(null), [f, p] = X(!1), [m, h] = X(null), { run: g } = C(), _ = J(() => {
|
|
481
487
|
let e = {};
|
|
482
488
|
for (let { code: n, action: r } of t) e[n] = r;
|
|
483
489
|
return e;
|
|
484
|
-
}, [t]),
|
|
490
|
+
}, [t]), b = J(() => {
|
|
485
491
|
let e = t.map(({ code: e }) => ({
|
|
486
492
|
kind: "action",
|
|
487
493
|
code: e,
|
|
488
494
|
enabled: !0,
|
|
489
495
|
reason: null
|
|
490
496
|
}));
|
|
491
|
-
return r ?
|
|
497
|
+
return r ? v(u, e, _, void 0, r, [], oe(i, r)) : e;
|
|
492
498
|
}, [
|
|
493
|
-
|
|
499
|
+
u,
|
|
494
500
|
t,
|
|
495
|
-
|
|
501
|
+
_,
|
|
496
502
|
r,
|
|
497
503
|
i
|
|
498
|
-
]),
|
|
499
|
-
|
|
504
|
+
]), x = q((e, t) => {
|
|
505
|
+
p(!1);
|
|
500
506
|
let i = t.entity ? `${t.entity}.${e}` : e;
|
|
501
|
-
return
|
|
507
|
+
return g({
|
|
502
508
|
action: t,
|
|
503
|
-
title:
|
|
509
|
+
title: u(t.display?.name) || e,
|
|
504
510
|
row: r,
|
|
505
511
|
execute: async (e) => {
|
|
506
512
|
let t = await W(i, B(e, n));
|
|
@@ -508,41 +514,41 @@ function ze({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
|
|
|
508
514
|
}
|
|
509
515
|
});
|
|
510
516
|
}, [
|
|
511
|
-
|
|
512
|
-
|
|
517
|
+
u,
|
|
518
|
+
g,
|
|
513
519
|
r,
|
|
514
520
|
n,
|
|
515
521
|
a
|
|
516
522
|
]);
|
|
517
|
-
return !o &&
|
|
523
|
+
return !o && b.length === 0 ? null : /* @__PURE__ */ $("div", {
|
|
518
524
|
className: "sl-row-actions",
|
|
519
|
-
"data-open":
|
|
525
|
+
"data-open": f ? "true" : void 0,
|
|
520
526
|
style: {
|
|
521
527
|
display: "flex",
|
|
522
528
|
alignItems: "center",
|
|
523
529
|
justifyContent: "flex-end"
|
|
524
530
|
},
|
|
525
|
-
children: [/* @__PURE__ */ Q(
|
|
526
|
-
ref:
|
|
527
|
-
size:
|
|
528
|
-
icon: /* @__PURE__ */ Q(e.more, { size: Math.round(
|
|
529
|
-
onClick: () =>
|
|
530
|
-
title:
|
|
531
|
-
}), /* @__PURE__ */ $(
|
|
532
|
-
open:
|
|
533
|
-
anchor:
|
|
534
|
-
onClose: () =>
|
|
531
|
+
children: [/* @__PURE__ */ Q(O, {
|
|
532
|
+
ref: d,
|
|
533
|
+
size: c,
|
|
534
|
+
icon: /* @__PURE__ */ Q(e.more, { size: Math.round(c * .55) }),
|
|
535
|
+
onClick: () => p((e) => !e),
|
|
536
|
+
title: u("action.menu.title", "Actions")
|
|
537
|
+
}), /* @__PURE__ */ $(y, {
|
|
538
|
+
open: f,
|
|
539
|
+
anchor: d.current,
|
|
540
|
+
onClose: () => p(!1),
|
|
535
541
|
width: 200,
|
|
536
|
-
align:
|
|
542
|
+
align: l,
|
|
537
543
|
children: [
|
|
538
544
|
o,
|
|
539
|
-
o && s &&
|
|
545
|
+
o && s && b.length > 0 && /* @__PURE__ */ Q(E, { divider: !0 }),
|
|
540
546
|
/* @__PURE__ */ Q(ae, {
|
|
541
|
-
layout:
|
|
542
|
-
entityActions:
|
|
543
|
-
onRun:
|
|
544
|
-
loading:
|
|
545
|
-
onLoadingChange:
|
|
547
|
+
layout: b,
|
|
548
|
+
entityActions: _,
|
|
549
|
+
onRun: x,
|
|
550
|
+
loading: m,
|
|
551
|
+
onLoadingChange: h,
|
|
546
552
|
row: r
|
|
547
553
|
})
|
|
548
554
|
]
|
|
@@ -551,73 +557,73 @@ function ze({ actions: t, objectIds: n, row: r, entity: i, onSuccess: a, preMenu
|
|
|
551
557
|
}
|
|
552
558
|
//#endregion
|
|
553
559
|
//#region src/components/detail-layout/AssociatedToolbar.tsx
|
|
554
|
-
function Be({ entity: t, searchable: n, filterFields: r, searchValue:
|
|
555
|
-
let
|
|
556
|
-
return !
|
|
560
|
+
function Be({ entity: t, searchable: n, filterFields: r, searchValue: a, onSearchChange: o, filters: s, onFilterChange: c, allEntities: l }) {
|
|
561
|
+
let u = z(), d = n === !0, f = r && r.length > 0;
|
|
562
|
+
return !d && !f ? null : /* @__PURE__ */ $("div", {
|
|
557
563
|
style: {
|
|
558
564
|
display: "flex",
|
|
559
565
|
alignItems: "center",
|
|
560
566
|
gap: 6,
|
|
561
567
|
marginBottom: 8
|
|
562
568
|
},
|
|
563
|
-
children: [
|
|
569
|
+
children: [d && /* @__PURE__ */ Q("div", {
|
|
564
570
|
style: {
|
|
565
571
|
flex: 1,
|
|
566
572
|
maxWidth: 220
|
|
567
573
|
},
|
|
568
|
-
children: /* @__PURE__ */ Q(
|
|
569
|
-
value:
|
|
570
|
-
onChange:
|
|
571
|
-
placeholder:
|
|
574
|
+
children: /* @__PURE__ */ Q(M, {
|
|
575
|
+
value: a,
|
|
576
|
+
onChange: o,
|
|
577
|
+
placeholder: u("record.associated.search", "Search…"),
|
|
572
578
|
prefix: /* @__PURE__ */ Q(e.search, { size: 12 })
|
|
573
579
|
})
|
|
574
|
-
}),
|
|
580
|
+
}), f && r.map((e) => {
|
|
575
581
|
let n = t.fields.get(e);
|
|
576
582
|
if (!n) return null;
|
|
577
|
-
let r =
|
|
583
|
+
let r = s[e] ?? "__all__", a = i(u, n, e, l);
|
|
578
584
|
if (n.type === "ref" && n.ref?.entity) return /* @__PURE__ */ Q(Ve, {
|
|
579
585
|
field: n,
|
|
580
|
-
label:
|
|
586
|
+
label: a,
|
|
581
587
|
value: r,
|
|
582
|
-
onChange: (t) =>
|
|
588
|
+
onChange: (t) => c(e, t)
|
|
583
589
|
}, e);
|
|
584
590
|
if (!n.values) return null;
|
|
585
|
-
let
|
|
591
|
+
let o = [{
|
|
586
592
|
value: "__all__",
|
|
587
|
-
label:
|
|
593
|
+
label: u("record.associated.filter_all", "All {name}", { name: a })
|
|
588
594
|
}, ...n.values.map((e) => ({
|
|
589
595
|
value: e.code,
|
|
590
|
-
label:
|
|
596
|
+
label: u(e.name) || e.code
|
|
591
597
|
}))];
|
|
592
598
|
return /* @__PURE__ */ Q("div", {
|
|
593
599
|
style: { width: 160 },
|
|
594
|
-
children: /* @__PURE__ */ Q(
|
|
600
|
+
children: /* @__PURE__ */ Q(A, {
|
|
595
601
|
value: r,
|
|
596
|
-
options:
|
|
597
|
-
onChange: (t) =>
|
|
598
|
-
placeholder:
|
|
602
|
+
options: o,
|
|
603
|
+
onChange: (t) => c(e, t),
|
|
604
|
+
placeholder: a
|
|
599
605
|
})
|
|
600
606
|
}, e);
|
|
601
607
|
})]
|
|
602
608
|
});
|
|
603
609
|
}
|
|
604
610
|
function Ve({ field: e, label: t, value: n, onChange: r }) {
|
|
605
|
-
let
|
|
611
|
+
let i = z(), a = w(e.ref?.entity), o = e.display?.ref_display_field ?? a?.display?.display_field, s = J(() => a ? [...a.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [a]), { data: l } = c(e.ref?.entity, {
|
|
606
612
|
per_page: 200,
|
|
607
|
-
sort:
|
|
608
|
-
}), u = l?.data ?? [], d = (e) => e == null ? "—" : typeof e == "object" && !Array.isArray(e) ?
|
|
613
|
+
sort: o ? `${o}:asc` : void 0
|
|
614
|
+
}), u = l?.data ?? [], d = (e) => e == null ? "—" : typeof e == "object" && !Array.isArray(e) ? i(e) || "—" : _(e), f = [{
|
|
609
615
|
value: "__all__",
|
|
610
|
-
label:
|
|
616
|
+
label: i("record.associated.filter_all", "All {name}", { name: t })
|
|
611
617
|
}, ...u.map((e) => {
|
|
612
|
-
let t = String(e[
|
|
618
|
+
let t = String(e[s]), n = e[N];
|
|
613
619
|
return {
|
|
614
620
|
value: t,
|
|
615
|
-
label: typeof n == "string" && n !== "" ? n :
|
|
621
|
+
label: typeof n == "string" && n !== "" ? n : o ? d(e[o] ?? t) : t
|
|
616
622
|
};
|
|
617
623
|
})];
|
|
618
624
|
return /* @__PURE__ */ Q("div", {
|
|
619
625
|
style: { width: 160 },
|
|
620
|
-
children: /* @__PURE__ */ Q(
|
|
626
|
+
children: /* @__PURE__ */ Q(A, {
|
|
621
627
|
value: n,
|
|
622
628
|
options: f,
|
|
623
629
|
onChange: r,
|
|
@@ -685,7 +691,7 @@ function We(e, t, n) {
|
|
|
685
691
|
return null;
|
|
686
692
|
}
|
|
687
693
|
function Ge(e, t, n) {
|
|
688
|
-
let r = new Set(
|
|
694
|
+
let r = new Set(T(e));
|
|
689
695
|
return new Set(t.filter((t) => {
|
|
690
696
|
if (t === n || r.has(t)) return !1;
|
|
691
697
|
let i = e.fields.get(t);
|
|
@@ -747,28 +753,28 @@ function Je({ node: e, ctx: t }) {
|
|
|
747
753
|
]
|
|
748
754
|
});
|
|
749
755
|
}
|
|
750
|
-
function Ye({ node: n, ctx: r, assocCode: i, assocEntity:
|
|
751
|
-
let c = z(),
|
|
752
|
-
if (e ===
|
|
753
|
-
let t =
|
|
756
|
+
function Ye({ node: n, ctx: r, assocCode: i, assocEntity: a, fkField: o }) {
|
|
757
|
+
let c = z(), u = z("errors"), d = n.columns && n.columns.length > 0 ? n.columns.filter((e) => e !== o && !!a.fields.get(e)) : a.fields.names().filter((e) => {
|
|
758
|
+
if (e === o) return !1;
|
|
759
|
+
let t = a.fields.get(e);
|
|
754
760
|
return !(!t || t.primary || t.display?.is_listable === !1);
|
|
755
|
-
}),
|
|
756
|
-
|
|
757
|
-
|
|
761
|
+
}), f = g(a, "update"), p = n.interaction ?? (f ? "navigate" : "readonly"), m = (p === "inline_edit" || p === "row_edit") && f && n.editable !== !1, h = c(a.display?.name_plural) || c(a.display?.name) || i, _ = n.searchable === !0 || n.filters && n.filters.length > 0, y = J(() => Ue(a.actions, o, r.recordId), [
|
|
762
|
+
a.actions,
|
|
763
|
+
o,
|
|
758
764
|
r.recordId
|
|
759
|
-
]),
|
|
765
|
+
]), b = J(() => {
|
|
760
766
|
let e = {};
|
|
761
|
-
for (let { code: t, action: n } of
|
|
767
|
+
for (let { code: t, action: n } of y) e[t] = n;
|
|
762
768
|
return e;
|
|
763
|
-
}, [
|
|
764
|
-
let e =
|
|
765
|
-
return
|
|
769
|
+
}, [y]), x = J(() => {
|
|
770
|
+
let e = a.action_layout ?? null;
|
|
771
|
+
return v(c, e ?? s(b, "list_toolbar"), b, void 0, {}, []);
|
|
766
772
|
}, [
|
|
767
773
|
c,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
]), { run:
|
|
771
|
-
entity:
|
|
774
|
+
a.action_layout,
|
|
775
|
+
b
|
|
776
|
+
]), { run: S } = C(), w = G(), T = J(() => ({
|
|
777
|
+
entity: a,
|
|
772
778
|
entityCode: i,
|
|
773
779
|
screenRoute: typeof window < "u" ? window.location.pathname : "",
|
|
774
780
|
selectedRows: [],
|
|
@@ -781,7 +787,7 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
781
787
|
}),
|
|
782
788
|
runActionApi: (e, t) => W(e, t)
|
|
783
789
|
}), [
|
|
784
|
-
|
|
790
|
+
a,
|
|
785
791
|
i,
|
|
786
792
|
c,
|
|
787
793
|
w
|
|
@@ -791,8 +797,8 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
791
797
|
return t[0] === "entity-children" && t[3] === i;
|
|
792
798
|
} });
|
|
793
799
|
}, [E, i]), O = q((e, t) => {
|
|
794
|
-
let n = se(
|
|
795
|
-
if (n !== null) return
|
|
800
|
+
let n = se(u, e, t, {}, i);
|
|
801
|
+
if (n !== null) return S({
|
|
796
802
|
action: t,
|
|
797
803
|
title: c(t.display?.name) || e,
|
|
798
804
|
execute: async (e) => {
|
|
@@ -802,8 +808,8 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
802
808
|
});
|
|
803
809
|
}, [
|
|
804
810
|
c,
|
|
805
|
-
|
|
806
|
-
|
|
811
|
+
u,
|
|
812
|
+
S,
|
|
807
813
|
i,
|
|
808
814
|
D
|
|
809
815
|
]), [k, A] = X(0), j = /* @__PURE__ */ $("div", {
|
|
@@ -815,21 +821,21 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
815
821
|
minWidth: 0,
|
|
816
822
|
justifyContent: "flex-end"
|
|
817
823
|
},
|
|
818
|
-
children: [
|
|
824
|
+
children: [a.action_layout ? x.length > 0 && /* @__PURE__ */ Q(ie, {
|
|
819
825
|
kind: "toolbar",
|
|
820
|
-
layout:
|
|
821
|
-
entityActions:
|
|
826
|
+
layout: x,
|
|
827
|
+
entityActions: b,
|
|
822
828
|
onRun: O,
|
|
823
829
|
widgetContext: T,
|
|
824
830
|
ariaLabel: c("record.associated.toolbar_actions", "{name} toolbar actions", { name: h })
|
|
825
|
-
}) :
|
|
831
|
+
}) : y.map(({ code: e, action: t }) => /* @__PURE__ */ Q(Re, {
|
|
826
832
|
actionCode: e,
|
|
827
833
|
action: t,
|
|
828
834
|
entityCode: i,
|
|
829
835
|
variant: "ghost",
|
|
830
836
|
size: "sm",
|
|
831
837
|
onSuccess: D
|
|
832
|
-
}, e)),
|
|
838
|
+
}, e)), m && /* @__PURE__ */ Q(l, {
|
|
833
839
|
kind: "ghost",
|
|
834
840
|
size: "xs",
|
|
835
841
|
icon: /* @__PURE__ */ Q(e.plus, { size: 12 }),
|
|
@@ -838,13 +844,13 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
838
844
|
})]
|
|
839
845
|
}), M = _ ? /* @__PURE__ */ Q(Ze, {
|
|
840
846
|
entityCode: i,
|
|
841
|
-
entity:
|
|
847
|
+
entity: a,
|
|
842
848
|
parentEntity: r.entityCode,
|
|
843
849
|
parentId: r.recordId,
|
|
844
|
-
foreignKey:
|
|
845
|
-
columns:
|
|
846
|
-
editable:
|
|
847
|
-
interaction:
|
|
850
|
+
foreignKey: o,
|
|
851
|
+
columns: d,
|
|
852
|
+
editable: m,
|
|
853
|
+
interaction: p,
|
|
848
854
|
ctx: r,
|
|
849
855
|
searchable: n.searchable,
|
|
850
856
|
filterFields: n.filters,
|
|
@@ -852,13 +858,13 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
852
858
|
startDraftSignal: k
|
|
853
859
|
}) : /* @__PURE__ */ Q(Xe, {
|
|
854
860
|
entityCode: i,
|
|
855
|
-
entity:
|
|
861
|
+
entity: a,
|
|
856
862
|
parentEntity: r.entityCode,
|
|
857
863
|
parentId: r.recordId,
|
|
858
|
-
foreignKey:
|
|
859
|
-
columns:
|
|
860
|
-
editable:
|
|
861
|
-
interaction:
|
|
864
|
+
foreignKey: o,
|
|
865
|
+
columns: d,
|
|
866
|
+
editable: m,
|
|
867
|
+
interaction: p,
|
|
862
868
|
ctx: r,
|
|
863
869
|
sort: n.sort,
|
|
864
870
|
startDraftSignal: k
|
|
@@ -872,16 +878,16 @@ function Ye({ node: n, ctx: r, assocCode: i, assocEntity: o, fkField: s }) {
|
|
|
872
878
|
children: j
|
|
873
879
|
}), M] }) : /* @__PURE__ */ Q(Se, {
|
|
874
880
|
title: h,
|
|
875
|
-
icon:
|
|
876
|
-
name:
|
|
881
|
+
icon: a.display?.icon ? /* @__PURE__ */ Q(t, {
|
|
882
|
+
name: a.display.icon,
|
|
877
883
|
size: 14
|
|
878
884
|
}) : void 0,
|
|
879
885
|
right: j,
|
|
880
886
|
children: M
|
|
881
887
|
});
|
|
882
888
|
}
|
|
883
|
-
function Xe({ entityCode: e, entity: t, parentEntity: n, parentId: i, foreignKey: a, columns: o, editable: s, interaction: c, ctx:
|
|
884
|
-
let p = Z(), { data: m, isLoading: h, isError: g } =
|
|
889
|
+
function Xe({ entityCode: e, entity: t, parentEntity: n, parentId: i, foreignKey: a, columns: o, editable: s, interaction: c, ctx: l, sort: u, startDraftSignal: d }) {
|
|
890
|
+
let p = Z(), { data: m, isLoading: h, isError: g } = f(n, i, e, a, u), _ = m?.data ?? [], v = m?.$refs, y = q(() => {
|
|
885
891
|
p.invalidateQueries({ queryKey: [
|
|
886
892
|
r,
|
|
887
893
|
n,
|
|
@@ -902,24 +908,24 @@ function Xe({ entityCode: e, entity: t, parentEntity: n, parentId: i, foreignKey
|
|
|
902
908
|
columns: o,
|
|
903
909
|
editable: s,
|
|
904
910
|
interaction: c,
|
|
905
|
-
ctx:
|
|
911
|
+
ctx: l,
|
|
906
912
|
rows: _,
|
|
907
913
|
refs: v,
|
|
908
914
|
isLoading: h,
|
|
909
915
|
isError: g,
|
|
910
916
|
invalidateQuery: y,
|
|
911
|
-
startDraftSignal:
|
|
917
|
+
startDraftSignal: d
|
|
912
918
|
});
|
|
913
919
|
}
|
|
914
|
-
function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, searchable:
|
|
915
|
-
let
|
|
916
|
-
pe(() => (
|
|
920
|
+
function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, searchable: u, filterFields: d, sort: f, startDraftSignal: p }) {
|
|
921
|
+
let m = z(), h = Z(), [g, _] = X(""), [v, y] = X(""), [b, S] = X({}), C = Y(void 0);
|
|
922
|
+
pe(() => (C.current && clearTimeout(C.current), C.current = setTimeout(() => {
|
|
917
923
|
y(g);
|
|
918
924
|
}, 300), () => {
|
|
919
|
-
|
|
925
|
+
C.current && clearTimeout(C.current);
|
|
920
926
|
}), [g]);
|
|
921
|
-
let
|
|
922
|
-
|
|
927
|
+
let w = q((e, t) => {
|
|
928
|
+
S((n) => {
|
|
923
929
|
if (t === "__all__") {
|
|
924
930
|
let { [e]: t, ...r } = n;
|
|
925
931
|
return r;
|
|
@@ -929,13 +935,13 @@ function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
|
|
|
929
935
|
[e]: t
|
|
930
936
|
};
|
|
931
937
|
});
|
|
932
|
-
}, []),
|
|
933
|
-
if (!
|
|
938
|
+
}, []), T = J(() => Object.keys(b).length > 0 ? b : void 0, [b]), { data: E, isLoading: D, isError: O, hasNextPage: k, fetchNextPage: A, isFetchingNextPage: j } = Le(n, r, e, i, f, void 0, v || void 0, T), { rows: M, refs: N } = J(() => {
|
|
939
|
+
if (!E?.pages) return {
|
|
934
940
|
rows: [],
|
|
935
941
|
refs: void 0
|
|
936
942
|
};
|
|
937
943
|
let e = [], t;
|
|
938
|
-
for (let n of
|
|
944
|
+
for (let n of E.pages) if (e.push(...n.data), n.$refs) {
|
|
939
945
|
if (!t) t = { ...n.$refs };
|
|
940
946
|
else for (let [e, r] of Object.entries(n.$refs)) t[e] = {
|
|
941
947
|
...t[e],
|
|
@@ -946,7 +952,7 @@ function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
|
|
|
946
952
|
rows: e,
|
|
947
953
|
refs: t
|
|
948
954
|
};
|
|
949
|
-
}, [
|
|
955
|
+
}, [E]), P = q(() => {
|
|
950
956
|
h.invalidateQueries({ predicate: (t) => {
|
|
951
957
|
let n = t.queryKey;
|
|
952
958
|
return n[0] === "entity-children" && n[3] === e;
|
|
@@ -955,12 +961,12 @@ function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
|
|
|
955
961
|
return /* @__PURE__ */ $("div", { children: [
|
|
956
962
|
/* @__PURE__ */ Q(Be, {
|
|
957
963
|
entity: t,
|
|
958
|
-
searchable:
|
|
959
|
-
filterFields:
|
|
964
|
+
searchable: u,
|
|
965
|
+
filterFields: d,
|
|
960
966
|
searchValue: g,
|
|
961
967
|
onSearchChange: _,
|
|
962
968
|
filters: b,
|
|
963
|
-
onFilterChange:
|
|
969
|
+
onFilterChange: w,
|
|
964
970
|
allEntities: c.schema.entities
|
|
965
971
|
}),
|
|
966
972
|
/* @__PURE__ */ Q(Qe, {
|
|
@@ -974,53 +980,53 @@ function Ze({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
|
|
|
974
980
|
ctx: c,
|
|
975
981
|
rows: M,
|
|
976
982
|
refs: N,
|
|
977
|
-
isLoading:
|
|
983
|
+
isLoading: D,
|
|
978
984
|
isError: O,
|
|
979
985
|
invalidateQuery: P,
|
|
980
|
-
startDraftSignal:
|
|
986
|
+
startDraftSignal: p
|
|
981
987
|
}),
|
|
982
988
|
k && /* @__PURE__ */ Q("div", {
|
|
983
989
|
style: { marginTop: 4 },
|
|
984
|
-
children: /* @__PURE__ */ Q(
|
|
990
|
+
children: /* @__PURE__ */ Q(l, {
|
|
985
991
|
kind: "ghost",
|
|
986
992
|
size: "xs",
|
|
987
|
-
icon: j ? /* @__PURE__ */ Q(
|
|
993
|
+
icon: j ? /* @__PURE__ */ Q(x, { size: 12 }) : void 0,
|
|
988
994
|
onClick: () => A(),
|
|
989
995
|
disabled: j,
|
|
990
|
-
children:
|
|
996
|
+
children: m("record.associated.load_more", "Load more")
|
|
991
997
|
})
|
|
992
998
|
})
|
|
993
999
|
] });
|
|
994
1000
|
}
|
|
995
|
-
function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns:
|
|
996
|
-
let
|
|
997
|
-
|
|
1001
|
+
function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: s, editable: c, interaction: l, ctx: u, rows: d, refs: f, isLoading: p, isError: m, invalidateQuery: h, startDraftSignal: g }) {
|
|
1002
|
+
let _ = z(), v = z("errors"), y = S(), b = y.isPhone && u.relatedRecordsPresentation === "table", x = s.find((e) => e !== r), w = J(() => l === "navigate" ? o(void 0, t, u.schema.screens) : null, [
|
|
1003
|
+
l,
|
|
998
1004
|
t,
|
|
999
|
-
|
|
1000
|
-
]),
|
|
1001
|
-
|
|
1005
|
+
u.schema.screens
|
|
1006
|
+
]), T = J(() => c ? Ge(t, s, r) : /* @__PURE__ */ new Set(), [
|
|
1007
|
+
s,
|
|
1002
1008
|
r,
|
|
1003
1009
|
t,
|
|
1004
|
-
|
|
1005
|
-
]),
|
|
1006
|
-
|
|
1010
|
+
c
|
|
1011
|
+
]), E = J(() => Ke(t, s, r), [
|
|
1012
|
+
s,
|
|
1007
1013
|
r,
|
|
1008
1014
|
t
|
|
1009
|
-
]),
|
|
1015
|
+
]), D = J(() => {
|
|
1010
1016
|
let e = /* @__PURE__ */ new Map();
|
|
1011
|
-
for (let n of
|
|
1012
|
-
let r =
|
|
1017
|
+
for (let n of d) {
|
|
1018
|
+
let r = a(t, n);
|
|
1013
1019
|
e.set(V(r), r);
|
|
1014
1020
|
}
|
|
1015
1021
|
return e;
|
|
1016
|
-
}, [
|
|
1022
|
+
}, [d, t]), O = J(() => {
|
|
1017
1023
|
let e = /* @__PURE__ */ new Map();
|
|
1018
|
-
for (let n of
|
|
1024
|
+
for (let n of d) {
|
|
1019
1025
|
let r = n.$row_version;
|
|
1020
|
-
typeof r == "string" && r !== "" && e.set(V(
|
|
1026
|
+
typeof r == "string" && r !== "" && e.set(V(a(t, n)), r);
|
|
1021
1027
|
}
|
|
1022
1028
|
return e;
|
|
1023
|
-
}, [
|
|
1029
|
+
}, [d, t]), k = J(() => He(t.actions), [t.actions]), [A, j] = X(null), [M, N] = X(null), [P, F] = X([]), [I, L] = X({}), R = Y(I);
|
|
1024
1030
|
R.current = I;
|
|
1025
1031
|
let B = Y({});
|
|
1026
1032
|
pe(() => {
|
|
@@ -1039,11 +1045,11 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1039
1045
|
}
|
|
1040
1046
|
}));
|
|
1041
1047
|
try {
|
|
1042
|
-
let i =
|
|
1048
|
+
let i = O.get(t), a = i ? {
|
|
1043
1049
|
...n,
|
|
1044
1050
|
$row_version: i
|
|
1045
1051
|
} : n;
|
|
1046
|
-
return await re(e,
|
|
1052
|
+
return await re(e, D.get(t) ?? t, a), L((e) => {
|
|
1047
1053
|
let n = e[t];
|
|
1048
1054
|
if (!n) return e;
|
|
1049
1055
|
if (n.ver > r) return {
|
|
@@ -1055,9 +1061,9 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1055
1061
|
};
|
|
1056
1062
|
let { [t]: i, ...a } = e;
|
|
1057
1063
|
return a;
|
|
1058
|
-
}),
|
|
1064
|
+
}), h(), !0;
|
|
1059
1065
|
} catch (e) {
|
|
1060
|
-
let n = ne(
|
|
1066
|
+
let n = ne(v, e);
|
|
1061
1067
|
return L((e) => ({
|
|
1062
1068
|
...e,
|
|
1063
1069
|
[t]: {
|
|
@@ -1069,10 +1075,10 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1069
1075
|
}
|
|
1070
1076
|
}, [
|
|
1071
1077
|
e,
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1078
|
+
v,
|
|
1079
|
+
h,
|
|
1080
|
+
D,
|
|
1081
|
+
O
|
|
1076
1082
|
]), de = q((e, t, n) => {
|
|
1077
1083
|
L((r) => {
|
|
1078
1084
|
let i = r[e] ?? {
|
|
@@ -1091,14 +1097,14 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1091
1097
|
ver: a
|
|
1092
1098
|
}
|
|
1093
1099
|
};
|
|
1094
|
-
}),
|
|
1100
|
+
}), l === "inline_edit" && (B.current[e] && clearTimeout(B.current[e]), B.current[e] = setTimeout(() => {
|
|
1095
1101
|
let t = R.current[e];
|
|
1096
1102
|
t && Object.keys(t.buffer).length > 0 && K(e, { ...t.buffer }, t.ver);
|
|
1097
1103
|
}, 500));
|
|
1098
|
-
}, [K,
|
|
1104
|
+
}, [K, l]), fe = q(() => {
|
|
1099
1105
|
let e = {};
|
|
1100
1106
|
e[r] = n;
|
|
1101
|
-
for (let n of
|
|
1107
|
+
for (let n of s) {
|
|
1102
1108
|
let r = t.fields.get(n);
|
|
1103
1109
|
r && (r.default === void 0 ? r.type === "bool" && (e[n] = !1) : e[n] = r.default);
|
|
1104
1110
|
}
|
|
@@ -1106,61 +1112,61 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1106
1112
|
}, [
|
|
1107
1113
|
r,
|
|
1108
1114
|
n,
|
|
1109
|
-
|
|
1115
|
+
s,
|
|
1110
1116
|
t.fields
|
|
1111
|
-
]), me = Y(
|
|
1117
|
+
]), me = Y(g);
|
|
1112
1118
|
pe(() => {
|
|
1113
|
-
|
|
1119
|
+
g !== void 0 && g !== me.current && (me.current = g, !H && fe());
|
|
1114
1120
|
}, [
|
|
1115
|
-
|
|
1121
|
+
g,
|
|
1116
1122
|
H,
|
|
1117
1123
|
fe
|
|
1118
1124
|
]);
|
|
1119
1125
|
let he = q(async () => {
|
|
1120
1126
|
if (!H) return;
|
|
1121
|
-
let n = qe(H,
|
|
1127
|
+
let n = qe(H, s, t, r);
|
|
1122
1128
|
if (n.length > 0) {
|
|
1123
1129
|
G(n);
|
|
1124
1130
|
return;
|
|
1125
1131
|
}
|
|
1126
1132
|
ae(!0);
|
|
1127
1133
|
try {
|
|
1128
|
-
await ee(e, H), U(null), G([]),
|
|
1134
|
+
await ee(e, H), U(null), G([]), h();
|
|
1129
1135
|
} catch (e) {
|
|
1130
|
-
let t = ne(
|
|
1136
|
+
let t = ne(v, e);
|
|
1131
1137
|
G([`_error:${t}`]);
|
|
1132
1138
|
} finally {
|
|
1133
1139
|
ae(!1);
|
|
1134
1140
|
}
|
|
1135
1141
|
}, [
|
|
1136
1142
|
H,
|
|
1137
|
-
|
|
1143
|
+
s,
|
|
1138
1144
|
t,
|
|
1139
1145
|
r,
|
|
1140
1146
|
e,
|
|
1141
|
-
|
|
1142
|
-
|
|
1147
|
+
v,
|
|
1148
|
+
h
|
|
1143
1149
|
]), ge = q((e) => {
|
|
1144
1150
|
L({}), F([]), N(e);
|
|
1145
1151
|
}, []), _e = q(async (e) => {
|
|
1146
|
-
let n = R.current[e],
|
|
1147
|
-
if (Object.keys(
|
|
1152
|
+
let n = R.current[e], i = n?.buffer ?? {};
|
|
1153
|
+
if (Object.keys(i).length === 0) {
|
|
1148
1154
|
N(null), F([]);
|
|
1149
1155
|
return;
|
|
1150
1156
|
}
|
|
1151
1157
|
let o = qe({
|
|
1152
|
-
...
|
|
1153
|
-
...
|
|
1154
|
-
},
|
|
1158
|
+
...d.find((n) => V(a(t, n)) === e) ?? {},
|
|
1159
|
+
...i
|
|
1160
|
+
}, s, t, r);
|
|
1155
1161
|
if (o.length > 0) {
|
|
1156
1162
|
F(o);
|
|
1157
1163
|
return;
|
|
1158
1164
|
}
|
|
1159
|
-
await K(e, { ...
|
|
1165
|
+
await K(e, { ...i }, n?.ver ?? 0) && (N(null), F([]));
|
|
1160
1166
|
}, [
|
|
1161
|
-
|
|
1167
|
+
d,
|
|
1162
1168
|
t,
|
|
1163
|
-
|
|
1169
|
+
s,
|
|
1164
1170
|
r,
|
|
1165
1171
|
K
|
|
1166
1172
|
]), Z = q((e) => {
|
|
@@ -1170,11 +1176,11 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1170
1176
|
return r;
|
|
1171
1177
|
}), F([]), N(null);
|
|
1172
1178
|
}, []), ve = q((n, r) => {
|
|
1173
|
-
let i =
|
|
1179
|
+
let i = D.get(n) ?? n;
|
|
1174
1180
|
return oe({
|
|
1175
1181
|
action: t.actions?.__delete,
|
|
1176
1182
|
destructive: !0,
|
|
1177
|
-
title:
|
|
1183
|
+
title: _(t.display?.name) || _("record.action.delete", "Delete"),
|
|
1178
1184
|
row: r,
|
|
1179
1185
|
entity: e,
|
|
1180
1186
|
execute: async () => {
|
|
@@ -1188,25 +1194,25 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1188
1194
|
});
|
|
1189
1195
|
}
|
|
1190
1196
|
},
|
|
1191
|
-
onSuccess: () =>
|
|
1197
|
+
onSuccess: () => h()
|
|
1192
1198
|
});
|
|
1193
1199
|
}, [
|
|
1194
|
-
|
|
1200
|
+
_,
|
|
1195
1201
|
oe,
|
|
1196
1202
|
t,
|
|
1197
1203
|
e,
|
|
1198
|
-
|
|
1199
|
-
|
|
1204
|
+
h,
|
|
1205
|
+
D
|
|
1200
1206
|
]);
|
|
1201
|
-
if (
|
|
1207
|
+
if (m) return /* @__PURE__ */ Q("div", {
|
|
1202
1208
|
style: {
|
|
1203
1209
|
fontSize: 12.5,
|
|
1204
1210
|
color: "var(--danger)",
|
|
1205
1211
|
padding: "8px 0"
|
|
1206
1212
|
},
|
|
1207
|
-
children:
|
|
1213
|
+
children: v("record.related_rows_unreadable", "The related records could not be loaded.")
|
|
1208
1214
|
});
|
|
1209
|
-
if (
|
|
1215
|
+
if (p) return /* @__PURE__ */ $("div", {
|
|
1210
1216
|
style: {
|
|
1211
1217
|
display: "flex",
|
|
1212
1218
|
flexDirection: "column",
|
|
@@ -1223,55 +1229,55 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1223
1229
|
borderRadius: 6
|
|
1224
1230
|
} })]
|
|
1225
1231
|
});
|
|
1226
|
-
let ye =
|
|
1227
|
-
return
|
|
1232
|
+
let ye = d.length === 0 && !H;
|
|
1233
|
+
return y.isPhone && !b ? /* @__PURE__ */ $("div", { children: [ye && !c && /* @__PURE__ */ Q("div", {
|
|
1228
1234
|
style: {
|
|
1229
1235
|
fontSize: 12.5,
|
|
1230
1236
|
color: "var(--text-3)",
|
|
1231
1237
|
padding: "12px 0"
|
|
1232
1238
|
},
|
|
1233
|
-
children:
|
|
1234
|
-
}), (!ye ||
|
|
1239
|
+
children: _("record.related.empty", "No records yet.")
|
|
1240
|
+
}), (!ye || c) && /* @__PURE__ */ $("div", {
|
|
1235
1241
|
style: {
|
|
1236
1242
|
display: "flex",
|
|
1237
1243
|
flexDirection: "column",
|
|
1238
1244
|
gap: 10
|
|
1239
1245
|
},
|
|
1240
|
-
children: [
|
|
1241
|
-
let r = V(
|
|
1246
|
+
children: [d.map((n) => {
|
|
1247
|
+
let r = V(a(t, n)), i = se.has(r), o = I[r], d = w && r ? w.replace(/:\w+/, r) : void 0;
|
|
1242
1248
|
return /* @__PURE__ */ Q($e, {
|
|
1243
1249
|
rowId: r,
|
|
1244
1250
|
row: n,
|
|
1245
1251
|
entity: t,
|
|
1246
|
-
entities:
|
|
1247
|
-
screens:
|
|
1248
|
-
columns:
|
|
1249
|
-
editableColumns:
|
|
1250
|
-
editable:
|
|
1251
|
-
interaction:
|
|
1252
|
+
entities: u.schema.entities,
|
|
1253
|
+
screens: u.schema.screens,
|
|
1254
|
+
columns: s,
|
|
1255
|
+
editableColumns: T,
|
|
1256
|
+
editable: c,
|
|
1257
|
+
interaction: l,
|
|
1252
1258
|
isEditing: M === r,
|
|
1253
1259
|
editErrors: P,
|
|
1254
|
-
isDeleting:
|
|
1260
|
+
isDeleting: i,
|
|
1255
1261
|
activeCell: A,
|
|
1256
1262
|
setActiveCell: j,
|
|
1257
|
-
rowState:
|
|
1263
|
+
rowState: o,
|
|
1258
1264
|
onCellChange: de,
|
|
1259
1265
|
onDeleteClick: (e) => void ve(e, n),
|
|
1260
1266
|
onStartEdit: ge,
|
|
1261
1267
|
onConfirmEdit: _e,
|
|
1262
1268
|
onCancelEdit: Z,
|
|
1263
|
-
refs:
|
|
1264
|
-
identityCol:
|
|
1269
|
+
refs: f,
|
|
1270
|
+
identityCol: x,
|
|
1265
1271
|
href: d,
|
|
1266
1272
|
rowActions: k,
|
|
1267
1273
|
entityCode: e,
|
|
1268
|
-
onRowActionSuccess:
|
|
1274
|
+
onRowActionSuccess: h
|
|
1269
1275
|
}, r);
|
|
1270
1276
|
}), H && /* @__PURE__ */ Q(it, {
|
|
1271
1277
|
draftRow: H,
|
|
1272
1278
|
entity: t,
|
|
1273
|
-
columns:
|
|
1274
|
-
editableColumns:
|
|
1279
|
+
columns: s,
|
|
1280
|
+
editableColumns: E,
|
|
1275
1281
|
foreignKey: r,
|
|
1276
1282
|
draftErrors: W,
|
|
1277
1283
|
draftSaving: ie,
|
|
@@ -1283,70 +1289,70 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1283
1289
|
onCancel: () => {
|
|
1284
1290
|
U(null), G([]);
|
|
1285
1291
|
},
|
|
1286
|
-
refs:
|
|
1292
|
+
refs: f
|
|
1287
1293
|
})]
|
|
1288
|
-
})] }) : /* @__PURE__ */ $("div", { children: [ye && !
|
|
1294
|
+
})] }) : /* @__PURE__ */ $("div", { children: [ye && !c && /* @__PURE__ */ Q("div", {
|
|
1289
1295
|
style: {
|
|
1290
1296
|
fontSize: 12.5,
|
|
1291
1297
|
color: "var(--text-3)",
|
|
1292
1298
|
padding: "12px 0"
|
|
1293
1299
|
},
|
|
1294
|
-
children:
|
|
1295
|
-
}), (!ye ||
|
|
1300
|
+
children: _("record.related.empty", "No records yet.")
|
|
1301
|
+
}), (!ye || c) && /* @__PURE__ */ Q("div", {
|
|
1296
1302
|
style: { overflowX: "auto" },
|
|
1297
1303
|
children: /* @__PURE__ */ $("table", {
|
|
1298
1304
|
style: le,
|
|
1299
1305
|
children: [/* @__PURE__ */ Q("thead", { children: /* @__PURE__ */ $("tr", { children: [
|
|
1300
|
-
|
|
1306
|
+
s.map((e) => {
|
|
1301
1307
|
let n = t.fields.get(e);
|
|
1302
1308
|
return /* @__PURE__ */ Q("th", {
|
|
1303
1309
|
style: ce,
|
|
1304
|
-
children: n ?
|
|
1310
|
+
children: n ? i(_, n, e, u.schema.entities) : e
|
|
1305
1311
|
}, e);
|
|
1306
1312
|
}),
|
|
1307
|
-
|
|
1313
|
+
c && /* @__PURE__ */ Q("th", { style: {
|
|
1308
1314
|
height: 30,
|
|
1309
1315
|
width: 72
|
|
1310
1316
|
} }),
|
|
1311
|
-
!
|
|
1317
|
+
!c && k.length > 0 && /* @__PURE__ */ Q("th", { style: {
|
|
1312
1318
|
height: 30,
|
|
1313
1319
|
width: 40
|
|
1314
1320
|
} })
|
|
1315
|
-
] }) }), /* @__PURE__ */ $("tbody", { children: [
|
|
1316
|
-
let r = V(
|
|
1321
|
+
] }) }), /* @__PURE__ */ $("tbody", { children: [d.map((n) => {
|
|
1322
|
+
let r = V(a(t, n)), i = se.has(r), o = I[r], d = w && r ? w.replace(/:\w+/, r) : void 0;
|
|
1317
1323
|
return /* @__PURE__ */ Q(et, {
|
|
1318
1324
|
rowId: r,
|
|
1319
1325
|
row: n,
|
|
1320
1326
|
entity: t,
|
|
1321
|
-
entities:
|
|
1322
|
-
screens:
|
|
1323
|
-
columns:
|
|
1324
|
-
editableColumns:
|
|
1325
|
-
editable:
|
|
1326
|
-
interaction:
|
|
1327
|
+
entities: u.schema.entities,
|
|
1328
|
+
screens: u.schema.screens,
|
|
1329
|
+
columns: s,
|
|
1330
|
+
editableColumns: T,
|
|
1331
|
+
editable: c,
|
|
1332
|
+
interaction: l,
|
|
1327
1333
|
isEditing: M === r,
|
|
1328
1334
|
editErrors: P,
|
|
1329
|
-
isDeleting:
|
|
1335
|
+
isDeleting: i,
|
|
1330
1336
|
activeCell: A,
|
|
1331
1337
|
setActiveCell: j,
|
|
1332
|
-
rowState:
|
|
1338
|
+
rowState: o,
|
|
1333
1339
|
onCellChange: de,
|
|
1334
1340
|
onDeleteClick: (e) => void ve(e, n),
|
|
1335
1341
|
onStartEdit: ge,
|
|
1336
1342
|
onConfirmEdit: _e,
|
|
1337
1343
|
onCancelEdit: Z,
|
|
1338
|
-
refs:
|
|
1339
|
-
identityCol:
|
|
1344
|
+
refs: f,
|
|
1345
|
+
identityCol: x,
|
|
1340
1346
|
href: d,
|
|
1341
1347
|
rowActions: k,
|
|
1342
1348
|
entityCode: e,
|
|
1343
|
-
onRowActionSuccess:
|
|
1349
|
+
onRowActionSuccess: h
|
|
1344
1350
|
}, r);
|
|
1345
1351
|
}), H && /* @__PURE__ */ Q(rt, {
|
|
1346
1352
|
draftRow: H,
|
|
1347
1353
|
entity: t,
|
|
1348
|
-
columns:
|
|
1349
|
-
editableColumns:
|
|
1354
|
+
columns: s,
|
|
1355
|
+
editableColumns: E,
|
|
1350
1356
|
foreignKey: r,
|
|
1351
1357
|
draftErrors: W,
|
|
1352
1358
|
draftSaving: ie,
|
|
@@ -1358,29 +1364,29 @@ function Qe({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i,
|
|
|
1358
1364
|
onCancel: () => {
|
|
1359
1365
|
U(null), G([]);
|
|
1360
1366
|
},
|
|
1361
|
-
refs:
|
|
1367
|
+
refs: f
|
|
1362
1368
|
})] })]
|
|
1363
1369
|
})
|
|
1364
1370
|
})] });
|
|
1365
1371
|
}
|
|
1366
|
-
function $e({ rowId: t, row: n, entity: r, entities:
|
|
1367
|
-
let
|
|
1372
|
+
function $e({ rowId: t, row: n, entity: r, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: p, rowState: m, onCellChange: h, onDeleteClick: g, onStartEdit: v, onConfirmEdit: y, onCancelEdit: b, refs: S, identityCol: C, href: w, rowActions: T, onRowActionSuccess: E }) {
|
|
1373
|
+
let D = z(), A = me(), j = J(() => !m || Object.keys(m.buffer).length === 0 ? n : {
|
|
1368
1374
|
...n,
|
|
1369
1375
|
...m.buffer
|
|
1370
1376
|
}, [n, m]);
|
|
1371
1377
|
if (u === "row_edit" && d) {
|
|
1372
1378
|
let e = m?.error ? [...f, `_error:${m.error}`] : f;
|
|
1373
1379
|
return /* @__PURE__ */ Q(nt, {
|
|
1374
|
-
values:
|
|
1380
|
+
values: j,
|
|
1375
1381
|
entity: r,
|
|
1376
|
-
columns:
|
|
1377
|
-
editableColumns:
|
|
1382
|
+
columns: s,
|
|
1383
|
+
editableColumns: c,
|
|
1378
1384
|
errors: e,
|
|
1379
1385
|
saving: m?.saving ?? !1,
|
|
1380
1386
|
onChange: (e, n) => h(t, e, n),
|
|
1381
|
-
onConfirm: () =>
|
|
1387
|
+
onConfirm: () => y(t),
|
|
1382
1388
|
onCancel: () => b(t),
|
|
1383
|
-
refs:
|
|
1389
|
+
refs: S
|
|
1384
1390
|
});
|
|
1385
1391
|
}
|
|
1386
1392
|
return /* @__PURE__ */ $("div", {
|
|
@@ -1398,27 +1404,27 @@ function $e({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1398
1404
|
flexDirection: "column",
|
|
1399
1405
|
gap: 12
|
|
1400
1406
|
},
|
|
1401
|
-
children:
|
|
1402
|
-
let n = r.fields.get(e),
|
|
1407
|
+
children: s.map((e) => {
|
|
1408
|
+
let n = r.fields.get(e), s = l && u === "inline_edit" && c.has(e), d = w && e === C, f = n ? i(D, n, e, a) : e, p = `${A}-${t}-${e}`, m = `${p}-label`, g = {
|
|
1403
1409
|
fontSize: 11.5,
|
|
1404
1410
|
fontWeight: 600,
|
|
1405
1411
|
color: "var(--text-3)"
|
|
1406
|
-
},
|
|
1412
|
+
}, v = n ? k({
|
|
1407
1413
|
field: n,
|
|
1408
1414
|
fieldName: e,
|
|
1409
|
-
value:
|
|
1410
|
-
mode:
|
|
1411
|
-
onChange:
|
|
1412
|
-
record:
|
|
1413
|
-
refs:
|
|
1414
|
-
compact:
|
|
1415
|
+
value: j[e],
|
|
1416
|
+
mode: s ? "edit" : "display",
|
|
1417
|
+
onChange: s ? (n) => h(t, e, n) : void 0,
|
|
1418
|
+
record: j,
|
|
1419
|
+
refs: S,
|
|
1420
|
+
compact: s,
|
|
1415
1421
|
entity: r,
|
|
1416
|
-
entities:
|
|
1417
|
-
screens:
|
|
1418
|
-
fieldId:
|
|
1419
|
-
labelId:
|
|
1420
|
-
t:
|
|
1421
|
-
}) :
|
|
1422
|
+
entities: a,
|
|
1423
|
+
screens: d ? void 0 : o,
|
|
1424
|
+
fieldId: p,
|
|
1425
|
+
labelId: m,
|
|
1426
|
+
t: D
|
|
1427
|
+
}) : _(j[e]);
|
|
1422
1428
|
return /* @__PURE__ */ $("div", {
|
|
1423
1429
|
style: {
|
|
1424
1430
|
display: "flex",
|
|
@@ -1426,26 +1432,26 @@ function $e({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1426
1432
|
gap: 5,
|
|
1427
1433
|
minWidth: 0
|
|
1428
1434
|
},
|
|
1429
|
-
children: [
|
|
1430
|
-
id:
|
|
1431
|
-
htmlFor:
|
|
1432
|
-
style:
|
|
1433
|
-
children:
|
|
1435
|
+
children: [s && n ? /* @__PURE__ */ Q("label", {
|
|
1436
|
+
id: m,
|
|
1437
|
+
htmlFor: p,
|
|
1438
|
+
style: g,
|
|
1439
|
+
children: f
|
|
1434
1440
|
}) : /* @__PURE__ */ Q("div", {
|
|
1435
|
-
id:
|
|
1436
|
-
style:
|
|
1437
|
-
children:
|
|
1441
|
+
id: m,
|
|
1442
|
+
style: g,
|
|
1443
|
+
children: f
|
|
1438
1444
|
}), /* @__PURE__ */ Q("div", {
|
|
1439
1445
|
style: { minWidth: 0 },
|
|
1440
|
-
children:
|
|
1441
|
-
href:
|
|
1446
|
+
children: d && !s ? /* @__PURE__ */ Q("a", {
|
|
1447
|
+
href: w,
|
|
1442
1448
|
style: {
|
|
1443
1449
|
color: "var(--accent)",
|
|
1444
1450
|
textDecoration: "none",
|
|
1445
1451
|
fontWeight: 500
|
|
1446
1452
|
},
|
|
1447
|
-
children:
|
|
1448
|
-
}) :
|
|
1453
|
+
children: v
|
|
1454
|
+
}) : v
|
|
1449
1455
|
})]
|
|
1450
1456
|
}, e);
|
|
1451
1457
|
})
|
|
@@ -1460,7 +1466,7 @@ function $e({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1460
1466
|
gap: 6
|
|
1461
1467
|
},
|
|
1462
1468
|
children: [l && /* @__PURE__ */ $(ve, { children: [
|
|
1463
|
-
m?.saving && /* @__PURE__ */ Q(
|
|
1469
|
+
m?.saving && /* @__PURE__ */ Q(x, { size: 12 }),
|
|
1464
1470
|
m?.error && /* @__PURE__ */ Q("span", {
|
|
1465
1471
|
style: {
|
|
1466
1472
|
fontSize: 11,
|
|
@@ -1469,90 +1475,90 @@ function $e({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1469
1475
|
title: m.error,
|
|
1470
1476
|
children: "!"
|
|
1471
1477
|
}),
|
|
1472
|
-
u === "row_edit" && /* @__PURE__ */ Q(
|
|
1478
|
+
u === "row_edit" && /* @__PURE__ */ Q(O, {
|
|
1473
1479
|
size: 32,
|
|
1474
1480
|
icon: /* @__PURE__ */ Q(e.edit, { size: 14 }),
|
|
1475
|
-
onClick: () =>
|
|
1476
|
-
title:
|
|
1481
|
+
onClick: () => v(t),
|
|
1482
|
+
title: D("record.row.edit", "Edit row")
|
|
1477
1483
|
}),
|
|
1478
|
-
/* @__PURE__ */ Q(
|
|
1484
|
+
/* @__PURE__ */ Q(O, {
|
|
1479
1485
|
size: 32,
|
|
1480
1486
|
icon: /* @__PURE__ */ Q(e.trash, { size: 14 }),
|
|
1481
1487
|
onClick: () => g(t),
|
|
1482
|
-
title:
|
|
1488
|
+
title: D("record.row.delete", "Delete row")
|
|
1483
1489
|
})
|
|
1484
1490
|
] }), !l && T && T.length > 0 && /* @__PURE__ */ Q(ze, {
|
|
1485
1491
|
entity: r,
|
|
1486
1492
|
actions: T,
|
|
1487
1493
|
objectIds: [t],
|
|
1488
|
-
row:
|
|
1494
|
+
row: j,
|
|
1489
1495
|
onSuccess: E
|
|
1490
1496
|
})]
|
|
1491
1497
|
})]
|
|
1492
1498
|
});
|
|
1493
1499
|
}
|
|
1494
|
-
function et({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o, editableColumns: s, editable:
|
|
1495
|
-
let
|
|
1500
|
+
function et({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o, editableColumns: s, editable: c, interaction: l, isEditing: u, editErrors: d, isDeleting: f, activeCell: p, setActiveCell: m, rowState: h, onCellChange: g, onDeleteClick: v, onStartEdit: y, onConfirmEdit: b, onCancelEdit: S, refs: C, identityCol: w, href: T, rowActions: E, onRowActionSuccess: D }) {
|
|
1501
|
+
let A = z(), j = J(() => !h || Object.keys(h.buffer).length === 0 ? n : {
|
|
1496
1502
|
...n,
|
|
1497
|
-
...
|
|
1498
|
-
}, [n,
|
|
1499
|
-
if (
|
|
1500
|
-
let e =
|
|
1503
|
+
...h.buffer
|
|
1504
|
+
}, [n, h]);
|
|
1505
|
+
if (l === "row_edit" && u) {
|
|
1506
|
+
let e = h?.error ? [...d, `_error:${h.error}`] : d;
|
|
1501
1507
|
return /* @__PURE__ */ Q(tt, {
|
|
1502
|
-
values:
|
|
1508
|
+
values: j,
|
|
1503
1509
|
entity: r,
|
|
1504
1510
|
columns: o,
|
|
1505
1511
|
editableColumns: s,
|
|
1506
1512
|
errors: e,
|
|
1507
|
-
saving:
|
|
1508
|
-
onChange: (e, n) =>
|
|
1513
|
+
saving: h?.saving ?? !1,
|
|
1514
|
+
onChange: (e, n) => g(t, e, n),
|
|
1509
1515
|
onConfirm: () => b(t),
|
|
1510
|
-
onCancel: () =>
|
|
1511
|
-
refs:
|
|
1516
|
+
onCancel: () => S(t),
|
|
1517
|
+
refs: C
|
|
1512
1518
|
});
|
|
1513
1519
|
}
|
|
1514
1520
|
let M = ue, N = {
|
|
1515
1521
|
padding: "4px 4px",
|
|
1516
1522
|
borderBottom: "1px solid var(--divider)",
|
|
1517
1523
|
verticalAlign: "middle"
|
|
1518
|
-
}, P =
|
|
1524
|
+
}, P = l === "inline_edit";
|
|
1519
1525
|
return /* @__PURE__ */ $("tr", {
|
|
1520
|
-
style: { opacity:
|
|
1526
|
+
style: { opacity: f ? .5 : 1 },
|
|
1521
1527
|
children: [
|
|
1522
1528
|
o.map((e) => {
|
|
1523
1529
|
let n = r.fields.get(e), o = s.has(e);
|
|
1524
|
-
if (P &&
|
|
1530
|
+
if (P && p?.rowId === t && p?.col === e && o) return /* @__PURE__ */ Q("td", {
|
|
1525
1531
|
style: N,
|
|
1526
|
-
children: n ?
|
|
1532
|
+
children: n ? k({
|
|
1527
1533
|
field: n,
|
|
1528
1534
|
fieldName: e,
|
|
1529
|
-
value:
|
|
1535
|
+
value: j[e],
|
|
1530
1536
|
mode: "edit",
|
|
1531
|
-
onChange: (n) =>
|
|
1532
|
-
record:
|
|
1533
|
-
refs:
|
|
1537
|
+
onChange: (n) => g(t, e, n),
|
|
1538
|
+
record: j,
|
|
1539
|
+
refs: C,
|
|
1534
1540
|
compact: !0,
|
|
1535
|
-
t:
|
|
1536
|
-
}) :
|
|
1541
|
+
t: A
|
|
1542
|
+
}) : _(j[e])
|
|
1537
1543
|
}, e);
|
|
1538
|
-
let c = T && e ===
|
|
1544
|
+
let c = T && e === w, l = n ? k({
|
|
1539
1545
|
field: n,
|
|
1540
1546
|
fieldName: e,
|
|
1541
|
-
value:
|
|
1547
|
+
value: j[e],
|
|
1542
1548
|
mode: "display",
|
|
1543
|
-
record:
|
|
1544
|
-
refs:
|
|
1549
|
+
record: j,
|
|
1550
|
+
refs: C,
|
|
1545
1551
|
entity: r,
|
|
1546
1552
|
entities: i,
|
|
1547
1553
|
screens: c ? void 0 : a,
|
|
1548
|
-
t:
|
|
1549
|
-
}) :
|
|
1554
|
+
t: A
|
|
1555
|
+
}) : _(j[e]), u = P && o && !f;
|
|
1550
1556
|
return /* @__PURE__ */ Q("td", {
|
|
1551
1557
|
style: {
|
|
1552
1558
|
...M,
|
|
1553
1559
|
cursor: u ? "pointer" : "default"
|
|
1554
1560
|
},
|
|
1555
|
-
onClick: u ? () =>
|
|
1561
|
+
onClick: u ? () => m({
|
|
1556
1562
|
rowId: t,
|
|
1557
1563
|
col: e
|
|
1558
1564
|
}) : void 0,
|
|
@@ -1569,7 +1575,7 @@ function et({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1569
1575
|
}) : l
|
|
1570
1576
|
}, e);
|
|
1571
1577
|
}),
|
|
1572
|
-
|
|
1578
|
+
c && /* @__PURE__ */ Q("td", {
|
|
1573
1579
|
style: {
|
|
1574
1580
|
padding: "4px 8px",
|
|
1575
1581
|
borderBottom: "1px solid var(--divider)",
|
|
@@ -1582,31 +1588,31 @@ function et({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1582
1588
|
gap: 4
|
|
1583
1589
|
},
|
|
1584
1590
|
children: [
|
|
1585
|
-
|
|
1586
|
-
|
|
1591
|
+
h?.saving && /* @__PURE__ */ Q(x, { size: 12 }),
|
|
1592
|
+
h?.error && /* @__PURE__ */ Q("span", {
|
|
1587
1593
|
style: {
|
|
1588
1594
|
fontSize: 11,
|
|
1589
1595
|
color: "var(--danger)"
|
|
1590
1596
|
},
|
|
1591
|
-
title:
|
|
1597
|
+
title: h.error,
|
|
1592
1598
|
children: "!"
|
|
1593
1599
|
}),
|
|
1594
|
-
|
|
1600
|
+
l === "row_edit" && /* @__PURE__ */ Q(O, {
|
|
1595
1601
|
size: 24,
|
|
1596
1602
|
icon: /* @__PURE__ */ Q(e.edit, { size: 12 }),
|
|
1597
1603
|
onClick: () => y(t),
|
|
1598
|
-
title:
|
|
1604
|
+
title: A("record.row.edit", "Edit row")
|
|
1599
1605
|
}),
|
|
1600
|
-
/* @__PURE__ */ Q(
|
|
1606
|
+
/* @__PURE__ */ Q(O, {
|
|
1601
1607
|
size: 24,
|
|
1602
1608
|
icon: /* @__PURE__ */ Q(e.trash, { size: 12 }),
|
|
1603
1609
|
onClick: () => v(t),
|
|
1604
|
-
title:
|
|
1610
|
+
title: A("record.row.delete", "Delete row")
|
|
1605
1611
|
})
|
|
1606
1612
|
]
|
|
1607
1613
|
})
|
|
1608
1614
|
}),
|
|
1609
|
-
!
|
|
1615
|
+
!c && E && E.length > 0 && /* @__PURE__ */ Q("td", {
|
|
1610
1616
|
style: {
|
|
1611
1617
|
padding: "4px 8px",
|
|
1612
1618
|
borderBottom: "1px solid var(--divider)",
|
|
@@ -1616,63 +1622,63 @@ function et({ rowId: t, row: n, entity: r, entities: i, screens: a, columns: o,
|
|
|
1616
1622
|
entity: r,
|
|
1617
1623
|
actions: E,
|
|
1618
1624
|
objectIds: [t],
|
|
1619
|
-
row:
|
|
1620
|
-
onSuccess:
|
|
1625
|
+
row: j,
|
|
1626
|
+
onSuccess: D
|
|
1621
1627
|
})
|
|
1622
1628
|
})
|
|
1623
1629
|
]
|
|
1624
1630
|
});
|
|
1625
1631
|
}
|
|
1626
|
-
function tt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, saving: o, onChange: s, onConfirm:
|
|
1627
|
-
let
|
|
1632
|
+
function tt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, saving: o, onChange: s, onConfirm: c, onCancel: l, refs: u, accent: d }) {
|
|
1633
|
+
let f = z(), p = a.find((e) => e.startsWith("_error:")), m = new Set(a.filter((e) => !e.startsWith("_error:"))), h = {
|
|
1628
1634
|
padding: "6px 12px",
|
|
1629
1635
|
borderBottom: "1px solid var(--divider)",
|
|
1630
1636
|
verticalAlign: "middle",
|
|
1631
1637
|
height: 40,
|
|
1632
1638
|
minWidth: 0
|
|
1633
|
-
},
|
|
1639
|
+
}, g = {
|
|
1634
1640
|
display: "block",
|
|
1635
1641
|
width: "100%",
|
|
1636
1642
|
maxWidth: "100%",
|
|
1637
1643
|
minWidth: 0
|
|
1638
1644
|
};
|
|
1639
1645
|
return /* @__PURE__ */ $("tr", {
|
|
1640
|
-
style:
|
|
1646
|
+
style: d ? { boxShadow: "inset 3px 0 0 var(--accent)" } : void 0,
|
|
1641
1647
|
onKeyDown: (e) => {
|
|
1642
|
-
e.key === "Enter" && !e.shiftKey ? (e.preventDefault(),
|
|
1648
|
+
e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), c()) : e.key === "Escape" && (e.preventDefault(), l());
|
|
1643
1649
|
},
|
|
1644
1650
|
children: [r.map((e) => {
|
|
1645
|
-
let r = n.fields.get(e), a = i.has(e), o =
|
|
1651
|
+
let r = n.fields.get(e), a = i.has(e), o = m.has(e);
|
|
1646
1652
|
return a ? /* @__PURE__ */ Q("td", {
|
|
1647
1653
|
style: {
|
|
1648
|
-
...
|
|
1654
|
+
...h,
|
|
1649
1655
|
outline: o ? "1px solid var(--danger)" : "none",
|
|
1650
1656
|
outlineOffset: -1
|
|
1651
1657
|
},
|
|
1652
|
-
title: o ?
|
|
1658
|
+
title: o ? f("record.row.field_required", "{field} is required", { field: e }) : void 0,
|
|
1653
1659
|
children: /* @__PURE__ */ Q("div", {
|
|
1654
|
-
style:
|
|
1655
|
-
children: r ?
|
|
1660
|
+
style: g,
|
|
1661
|
+
children: r ? k({
|
|
1656
1662
|
field: r,
|
|
1657
1663
|
fieldName: e,
|
|
1658
1664
|
value: t[e],
|
|
1659
1665
|
mode: "edit",
|
|
1660
1666
|
onChange: (t) => s(e, t),
|
|
1661
1667
|
record: t,
|
|
1662
|
-
refs:
|
|
1668
|
+
refs: u,
|
|
1663
1669
|
compact: !0,
|
|
1664
|
-
t:
|
|
1665
|
-
}) :
|
|
1670
|
+
t: f
|
|
1671
|
+
}) : _(t[e])
|
|
1666
1672
|
})
|
|
1667
1673
|
}, e) : /* @__PURE__ */ Q("td", {
|
|
1668
1674
|
style: {
|
|
1669
|
-
...
|
|
1675
|
+
...h,
|
|
1670
1676
|
color: "var(--text-3)"
|
|
1671
1677
|
},
|
|
1672
|
-
children: r?.auto ? "—" :
|
|
1678
|
+
children: r?.auto ? "—" : _(t[e])
|
|
1673
1679
|
}, e);
|
|
1674
1680
|
}), /* @__PURE__ */ Q("td", {
|
|
1675
|
-
style:
|
|
1681
|
+
style: h,
|
|
1676
1682
|
children: /* @__PURE__ */ $("div", {
|
|
1677
1683
|
style: {
|
|
1678
1684
|
display: "flex",
|
|
@@ -1681,33 +1687,33 @@ function tt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, s
|
|
|
1681
1687
|
justifyContent: "flex-end"
|
|
1682
1688
|
},
|
|
1683
1689
|
children: [
|
|
1684
|
-
|
|
1690
|
+
p && /* @__PURE__ */ Q("span", {
|
|
1685
1691
|
style: {
|
|
1686
1692
|
fontSize: 11,
|
|
1687
1693
|
color: "var(--danger)"
|
|
1688
1694
|
},
|
|
1689
|
-
title:
|
|
1695
|
+
title: p.slice(7),
|
|
1690
1696
|
children: "!"
|
|
1691
1697
|
}),
|
|
1692
|
-
/* @__PURE__ */ Q(
|
|
1698
|
+
/* @__PURE__ */ Q(O, {
|
|
1693
1699
|
size: 24,
|
|
1694
|
-
icon: Q(o ?
|
|
1695
|
-
onClick:
|
|
1696
|
-
title:
|
|
1700
|
+
icon: Q(o ? x : e.check, { size: 12 }),
|
|
1701
|
+
onClick: c,
|
|
1702
|
+
title: f("record.row.confirm", "Confirm (Enter)")
|
|
1697
1703
|
}),
|
|
1698
|
-
/* @__PURE__ */ Q(
|
|
1704
|
+
/* @__PURE__ */ Q(O, {
|
|
1699
1705
|
size: 24,
|
|
1700
1706
|
icon: /* @__PURE__ */ Q(e.x, { size: 12 }),
|
|
1701
|
-
onClick:
|
|
1702
|
-
title:
|
|
1707
|
+
onClick: l,
|
|
1708
|
+
title: f("record.row.cancel", "Cancel (Esc)")
|
|
1703
1709
|
})
|
|
1704
1710
|
]
|
|
1705
1711
|
})
|
|
1706
1712
|
})]
|
|
1707
1713
|
});
|
|
1708
1714
|
}
|
|
1709
|
-
function nt({ values: t, entity: n, columns: r, editableColumns:
|
|
1710
|
-
let p = z(), m = me(), h =
|
|
1715
|
+
function nt({ values: t, entity: n, columns: r, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
|
|
1716
|
+
let p = z(), m = me(), h = o.find((e) => e.startsWith("_error:")), g = new Set(o.filter((e) => !e.startsWith("_error:")));
|
|
1711
1717
|
return /* @__PURE__ */ $("div", {
|
|
1712
1718
|
style: {
|
|
1713
1719
|
border: "1px solid var(--border)",
|
|
@@ -1727,7 +1733,7 @@ function nt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, s
|
|
|
1727
1733
|
gap: 12
|
|
1728
1734
|
},
|
|
1729
1735
|
children: r.map((e) => {
|
|
1730
|
-
let r = n.fields.get(e),
|
|
1736
|
+
let r = n.fields.get(e), o = a.has(e), s = g.has(e), l = r ? i(p, r, e) : e, u = `${m}-${e}`, f = `${u}-label`, h = {
|
|
1731
1737
|
fontSize: 11.5,
|
|
1732
1738
|
fontWeight: 600,
|
|
1733
1739
|
color: "var(--text-3)"
|
|
@@ -1739,36 +1745,36 @@ function nt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, s
|
|
|
1739
1745
|
gap: 5,
|
|
1740
1746
|
minWidth: 0
|
|
1741
1747
|
},
|
|
1742
|
-
children: [
|
|
1743
|
-
id:
|
|
1744
|
-
htmlFor:
|
|
1745
|
-
style:
|
|
1746
|
-
children:
|
|
1748
|
+
children: [o && r ? /* @__PURE__ */ Q("label", {
|
|
1749
|
+
id: f,
|
|
1750
|
+
htmlFor: u,
|
|
1751
|
+
style: h,
|
|
1752
|
+
children: l
|
|
1747
1753
|
}) : /* @__PURE__ */ Q("div", {
|
|
1748
|
-
id:
|
|
1749
|
-
style:
|
|
1750
|
-
children:
|
|
1754
|
+
id: f,
|
|
1755
|
+
style: h,
|
|
1756
|
+
children: l
|
|
1751
1757
|
}), /* @__PURE__ */ Q("div", {
|
|
1752
1758
|
style: {
|
|
1753
1759
|
minWidth: 0,
|
|
1754
|
-
outline:
|
|
1760
|
+
outline: s ? "1px solid var(--danger)" : "none",
|
|
1755
1761
|
outlineOffset: 3,
|
|
1756
|
-
borderRadius:
|
|
1762
|
+
borderRadius: s ? 5 : 0
|
|
1757
1763
|
},
|
|
1758
|
-
title:
|
|
1759
|
-
children:
|
|
1764
|
+
title: s ? p("record.row.field_required", "{field} is required", { field: e }) : void 0,
|
|
1765
|
+
children: o ? r ? k({
|
|
1760
1766
|
field: r,
|
|
1761
1767
|
fieldName: e,
|
|
1762
1768
|
value: t[e],
|
|
1763
1769
|
mode: "edit",
|
|
1764
|
-
onChange: (t) =>
|
|
1770
|
+
onChange: (t) => c(e, t),
|
|
1765
1771
|
record: t,
|
|
1766
1772
|
refs: d,
|
|
1767
1773
|
compact: !0,
|
|
1768
|
-
fieldId:
|
|
1769
|
-
labelId:
|
|
1774
|
+
fieldId: u,
|
|
1775
|
+
labelId: f,
|
|
1770
1776
|
t: p
|
|
1771
|
-
}) :
|
|
1777
|
+
}) : _(t[e]) : r?.auto ? "—" : _(t[e])
|
|
1772
1778
|
})]
|
|
1773
1779
|
}, e);
|
|
1774
1780
|
})
|
|
@@ -1791,13 +1797,13 @@ function nt({ values: t, entity: n, columns: r, editableColumns: i, errors: a, s
|
|
|
1791
1797
|
title: h.slice(7),
|
|
1792
1798
|
children: "!"
|
|
1793
1799
|
}),
|
|
1794
|
-
/* @__PURE__ */ Q(
|
|
1800
|
+
/* @__PURE__ */ Q(O, {
|
|
1795
1801
|
size: 32,
|
|
1796
|
-
icon: Q(
|
|
1802
|
+
icon: Q(s ? x : e.check, { size: 14 }),
|
|
1797
1803
|
onClick: l,
|
|
1798
1804
|
title: p("record.row.confirm", "Confirm (Enter)")
|
|
1799
1805
|
}),
|
|
1800
|
-
/* @__PURE__ */ Q(
|
|
1806
|
+
/* @__PURE__ */ Q(O, {
|
|
1801
1807
|
size: 32,
|
|
1802
1808
|
icon: /* @__PURE__ */ Q(e.x, { size: 14 }),
|
|
1803
1809
|
onClick: u,
|
|
@@ -1926,7 +1932,7 @@ function lt({ message: e, onRetry: t, t: n, errorTitle: r }) {
|
|
|
1926
1932
|
},
|
|
1927
1933
|
children: e || r("ui.render_failed_undescribed", "An unexpected error occurred.")
|
|
1928
1934
|
}),
|
|
1929
|
-
/* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
|
|
1935
|
+
/* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(l, {
|
|
1930
1936
|
onClick: t,
|
|
1931
1937
|
children: n("control.try_again", "Try again")
|
|
1932
1938
|
}) })
|