@declarion/react 0.48.2 → 0.50.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/Check-DAfMbQIw.js +38 -0
- package/dist-lib/{DraggableChildrenTable-p2ZSdwzj.js → DraggableChildrenTable-Dar8C-Z9.js} +31 -31
- package/dist-lib/DynamicIcon-DW5krHuX.js +280 -0
- package/dist-lib/{Grid-CjLFAKMZ.js → Grid-BkHtfsty.js} +2 -2
- package/dist-lib/{LayoutRenderer-DCscqXsv.js → LayoutRenderer-Cic7IAop.js} +601 -598
- package/dist-lib/ListCardsBody-Dko91bLv.js +287 -0
- package/dist-lib/{MarkdownRenderer-Sb7zcvj0.js → MarkdownRenderer-CJrVG5HZ.js} +1 -1
- package/dist-lib/RefreshControl-BS8WWL8i.js +430 -0
- package/dist-lib/{SmartDetailPage.impl-BAW-Tx_H.js → SmartDetailPage.impl-DxRDo0p2.js} +521 -516
- package/dist-lib/SmartListPage.impl-CNdq5Vts.js +2849 -0
- package/dist-lib/{SmartRecordListPage.impl-DtSSlGrI.js → SmartRecordListPage.impl-3ct7f4rT.js} +244 -241
- package/dist-lib/SortHeaderMenu-NgjkW8QZ.js +106 -0
- package/dist-lib/action-dispatch-hVrm3Hrg.js +1984 -0
- package/dist-lib/api/batch.d.ts +5 -2
- package/dist-lib/api/data.d.ts +35 -4
- package/dist-lib/api/entities.d.ts +3 -3
- package/dist-lib/cardProjection-BR-fXPvJ.js +757 -0
- package/dist-lib/components/{shared → actions}/ObjectActionBar.d.ts +1 -1
- package/dist-lib/components/{shared → actions}/ResponsiveActionBar.d.ts +1 -1
- package/dist-lib/components/fields/cells/factories/date.d.ts +2 -0
- package/dist-lib/components/file-widgets/upload.d.ts +6 -1
- package/dist-lib/components/layout/Layout.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/pages/SmartListPage.d.ts +2 -12
- package/dist-lib/components/pages/SmartListPage.impl.d.ts +4 -0
- package/dist-lib/components/pages/list/ListCardRow.d.ts +40 -0
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +34 -0
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFooter.d.ts +26 -0
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/pages/list/ListNoRows.d.ts +32 -0
- package/dist-lib/components/pages/list/ListTable.d.ts +34 -0
- package/dist-lib/components/pages/list/ListTableRow.d.ts +18 -0
- package/dist-lib/components/pages/list/ListToolbar.d.ts +43 -0
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +14 -0
- package/dist-lib/components/pages/list/page-size.d.ts +3 -0
- package/dist-lib/components/pages/list/sortable-header.d.ts +2 -0
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +37 -0
- package/dist-lib/components/pages/list/useListQuery.d.ts +66 -0
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +61 -0
- package/dist-lib/components/pages/list/useListSelection.d.ts +31 -0
- package/dist-lib/components/pages/list/useListSort.d.ts +45 -0
- package/dist-lib/components/pages/list/useListViews.d.ts +46 -0
- package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
- package/dist-lib/components/primitives/Icons.d.ts +5 -0
- package/dist-lib/components/shared/RefreshControl.d.ts +17 -4
- package/dist-lib/field-classification-Bm0mgbwA.js +1134 -0
- package/dist-lib/format-count-BfRGwx2v.js +1551 -0
- package/dist-lib/hooks/useBrandingChrome.d.ts +17 -1
- package/dist-lib/hooks/useText.d.ts +3 -0
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.d.ts +17 -15
- package/dist-lib/index.js +1784 -6288
- package/dist-lib/lib/messages.d.ts +7 -1
- package/dist-lib/lib/rowClickGesture.d.ts +12 -0
- package/dist-lib/lib/timestamp.d.ts +8 -3
- package/dist-lib/peekDraftStore-bb4WroTA.js +194 -0
- package/dist-lib/record-documents-key-8fdm7C10.js +27 -0
- package/dist-lib/registry-CgeGoWpW.js +1768 -0
- package/dist-lib/testing.d.ts +17 -2
- package/dist-lib/testing.js +72 -58
- package/dist-lib/types/api.d.ts +54 -12
- package/dist-lib/types/schema.d.ts +22 -6
- package/dist-lib/{useCurrentScreen-BshVTPVq.js → useCurrentScreen-D3XH5ptA.js} +1127 -1070
- package/dist-lib/useListQuery-CfuINl-0.js +87 -0
- package/dist-lib/useProperties-DNocaxBX.js +81 -0
- package/dist-lib/{useProperties-DrHFr0A1.js → useTabSearchMirror-d0BAUIcQ.js} +116 -194
- package/dist-lib/{value-B1O6QikE.js → value-D71J0sJq.js} +69 -69
- package/package.json +1 -1
- package/dist-lib/DynamicIcon-Dc2j-rg_.js +0 -275
- package/dist-lib/RefreshControl-Cnl9nE0x.js +0 -945
- package/dist-lib/registry-CCxnZW2b.js +0 -5281
- /package/dist-lib/components/{shared → actions}/ActionButton.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionDialog.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionResultDialog.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionRunner.d.ts +0 -0
- /package/dist-lib/components/{mass-edit → actions}/PropertyGridEditor.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/RowActionsKebab.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/AssociationTabs.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/AuditMetaStrip.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/Breadcrumbs.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/HighlightsStrip.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/PageHeader.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/RecordHeader.d.ts +0 -0
- /package/dist-lib/components/{shell → layout}/CommandPalette.d.ts +0 -0
- /package/dist-lib/components/{columns → list}/ColumnPicker.d.ts +0 -0
- /package/dist-lib/components/{views → list}/ViewSwitcher.d.ts +0 -0
package/dist-lib/{SmartRecordListPage.impl-DtSSlGrI.js → SmartRecordListPage.impl-3ct7f4rT.js}
RENAMED
|
@@ -1,114 +1,117 @@
|
|
|
1
|
-
import { s as e } from "./DynamicIcon-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { s as e } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
+
import { $n as t, A as n, At as r, Dn as i, F as a, In as o, Jn as s, N as c, Sn as l, Tn as u, Zn as d, dr as f, fr as p, q as m, rr as ee, rt as h, wn as g, zn as te } from "./useCurrentScreen-D3XH5ptA.js";
|
|
3
|
+
import { a as _ } from "./registry-CgeGoWpW.js";
|
|
4
|
+
import { O as ne, c as re, f as v } from "./field-classification-Bm0mgbwA.js";
|
|
5
|
+
import { f as y, h as b, p as x, u as S } from "./action-dispatch-hVrm3Hrg.js";
|
|
6
|
+
import { d as C, m as w, n as T, p as E, t as D, u as O } from "./cardProjection-BR-fXPvJ.js";
|
|
7
|
+
import { c as k, f as A, h as j, m as M, n as ie, t as ae } from "./useTabSearchMirror-d0BAUIcQ.js";
|
|
8
|
+
import { n as oe, r as N } from "./useProperties-DNocaxBX.js";
|
|
9
|
+
import { t as P } from "./LayoutRenderer-Cic7IAop.js";
|
|
10
|
+
import { t as se } from "./useListQuery-CfuINl-0.js";
|
|
11
|
+
import { useCallback as F, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
|
|
7
12
|
import { useSearchParams as ce } from "react-router";
|
|
8
13
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
9
14
|
//#region src/components/pages/SmartRecordListPage.impl.tsx
|
|
15
|
+
var le = 200;
|
|
10
16
|
function U({ screenCode: t }) {
|
|
11
|
-
let [
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
let e =
|
|
17
|
+
let [n, a] = ce(), { data: o } = r(), c = ee(), l = o?.screens[t], u = l?.entity ? o?.entities[l.entity] : void 0, p = l?.entity;
|
|
18
|
+
ie(l, u, n.toString()), ae(l?.route);
|
|
19
|
+
let h = re(), _ = n.get("selected") ?? null, v = n.get("search") ?? "", y = m(v, 300), b = n.get("sort") ?? l?.sort_default ?? "", x = L(() => A(n), [n]), S = x.filters.length > 0 ? x.filters : void 0, C = L(() => l?.columns ?? u?.fields.names().filter((e) => !u.fields.get(e)?.primary && !u.fields.get(e)?.auto && u.fields.get(e)?.display?.is_listable !== !1).slice(0, 4) ?? [], [l?.columns, u]), w = L(() => {
|
|
20
|
+
let e = l?.responsive?.[c.category]?.presentation;
|
|
15
21
|
return c.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
|
|
16
|
-
}, [
|
|
17
|
-
let e =
|
|
22
|
+
}, [l?.responsive, c.category]), E = L(() => {
|
|
23
|
+
let e = l?.responsive?.[c.category];
|
|
18
24
|
return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : c.category === "phone" ? "cards" : "table";
|
|
19
|
-
}, [
|
|
20
|
-
entity:
|
|
21
|
-
screen:
|
|
22
|
-
}), [
|
|
23
|
-
entity:
|
|
24
|
-
screen:
|
|
25
|
-
presentation:
|
|
25
|
+
}, [l?.responsive, c.category]), oe = l?.responsive?.[c.category]?.layout?.related_records, N = L(() => D({
|
|
26
|
+
entity: u,
|
|
27
|
+
screen: l
|
|
28
|
+
}), [u, l]), P = L(() => T({
|
|
29
|
+
entity: u,
|
|
30
|
+
screen: l,
|
|
31
|
+
presentation: E,
|
|
26
32
|
visibleColumns: C,
|
|
27
33
|
card: N,
|
|
28
34
|
sort: b
|
|
29
35
|
}), [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
u,
|
|
37
|
+
l,
|
|
38
|
+
E,
|
|
33
39
|
C,
|
|
34
40
|
N,
|
|
35
41
|
b
|
|
36
|
-
]), U =
|
|
42
|
+
]), U = se({
|
|
43
|
+
entity: u,
|
|
44
|
+
entityCode: p,
|
|
45
|
+
screen: l,
|
|
46
|
+
screenCode: t,
|
|
37
47
|
page: 1,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
filters: x.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
select: F.selectFields,
|
|
51
|
-
expand: F.expandFields,
|
|
52
|
-
preview: !0,
|
|
53
|
-
screen: p?.fixed_filters ? t : void 0,
|
|
54
|
-
limit: 200
|
|
55
|
-
}, U), J = U ? K.rows : W?.data ?? [], ue = U ? K.refs : W?.$refs, Y = U ? K.isLoading : G, de = R(() => m?.fields.names().find((e) => m.fields.get(e)?.primary) ?? "id", [m]), fe = I((e, t) => {
|
|
56
|
-
i((t) => {
|
|
48
|
+
perPage: le,
|
|
49
|
+
sortForRequest: O(b),
|
|
50
|
+
debouncedSearch: y,
|
|
51
|
+
filters: x.filters,
|
|
52
|
+
filterError: !!x.error,
|
|
53
|
+
includeDeleted: !1,
|
|
54
|
+
expand: P.expandFields,
|
|
55
|
+
select: P.selectFields,
|
|
56
|
+
runCountQuery: !1,
|
|
57
|
+
urlKey: `${p ?? ""}|${n.toString()}`
|
|
58
|
+
}), W = U.rows, G = U.refs, K = U.isLoading, q = L(() => u?.fields.names().find((e) => u.fields.get(e)?.primary) ?? "id", [u]), J = F((e, t) => {
|
|
59
|
+
a((t) => {
|
|
57
60
|
let n = new URLSearchParams(t);
|
|
58
61
|
return e ? n.set("selected", e) : n.delete("selected"), n;
|
|
59
62
|
}, { replace: t?.replace ?? !0 });
|
|
60
|
-
}, [
|
|
61
|
-
|
|
63
|
+
}, [a]), fe = F((e) => {
|
|
64
|
+
a((t) => {
|
|
62
65
|
let n = new URLSearchParams(t);
|
|
63
66
|
return e ? n.set("search", e) : n.delete("search"), n;
|
|
64
67
|
}, { replace: !0 });
|
|
65
|
-
}, [
|
|
66
|
-
|
|
68
|
+
}, [a]), pe = F((e, t) => {
|
|
69
|
+
a((n) => {
|
|
67
70
|
let r = new URLSearchParams(n), i = A(n).filters, a;
|
|
68
|
-
return a = t && t !== "__all__" ? [...M(i, e), k(e, t)] : M(i, e),
|
|
71
|
+
return a = t && t !== "__all__" ? [...M(i, e), k(e, t)] : M(i, e), j(a, r), r;
|
|
69
72
|
}, { replace: !0 });
|
|
70
|
-
}, [
|
|
71
|
-
|
|
72
|
-
!
|
|
73
|
+
}, [a]), Y = (l?.list_resizable ?? !1) && w === "split" && c.category !== "phone" && !c.touch, me = R(null), [X, Z] = z(null), he = R(!1), Q = l?.list_width;
|
|
74
|
+
I(() => {
|
|
75
|
+
!Y || !Q?.endsWith("%") || Z(null);
|
|
73
76
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
Y,
|
|
78
|
+
Q,
|
|
76
79
|
c.width,
|
|
77
80
|
c.height
|
|
78
|
-
]),
|
|
79
|
-
if (!
|
|
80
|
-
let e =
|
|
81
|
+
]), I(() => {
|
|
82
|
+
if (!Y || X !== null) return;
|
|
83
|
+
let e = me.current;
|
|
81
84
|
if (e) {
|
|
82
|
-
if (
|
|
83
|
-
let t = parseFloat(
|
|
84
|
-
|
|
85
|
-
} else Q
|
|
85
|
+
if (Q && Q.endsWith("%")) {
|
|
86
|
+
let t = parseFloat(Q) / 100;
|
|
87
|
+
Z(Math.round(e.getBoundingClientRect().width * t));
|
|
88
|
+
} else Z(Q && parseInt(Q, 10) || 320);
|
|
86
89
|
}
|
|
87
90
|
}, [
|
|
91
|
+
Y,
|
|
92
|
+
Q,
|
|
88
93
|
X,
|
|
89
|
-
|
|
90
|
-
Z,
|
|
91
|
-
m
|
|
94
|
+
u
|
|
92
95
|
]);
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
let $ = R(null);
|
|
97
|
+
I(() => () => {
|
|
98
|
+
$.current?.();
|
|
96
99
|
}, []);
|
|
97
|
-
let
|
|
98
|
-
e.preventDefault(),
|
|
99
|
-
let t = e.clientX, n =
|
|
100
|
-
if (!
|
|
101
|
-
let r = (
|
|
102
|
-
|
|
100
|
+
let ge = F((e) => {
|
|
101
|
+
e.preventDefault(), he.current = !0;
|
|
102
|
+
let t = e.clientX, n = X ?? 320, r = (e) => {
|
|
103
|
+
if (!he.current) return;
|
|
104
|
+
let r = (me.current?.getBoundingClientRect().width ?? window.innerWidth) - 300, i = Math.max(200, Math.min(r, n + e.clientX - t));
|
|
105
|
+
Z(i);
|
|
103
106
|
}, i = () => {
|
|
104
|
-
|
|
107
|
+
he.current = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", $.current = null;
|
|
105
108
|
};
|
|
106
|
-
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i),
|
|
107
|
-
}, [
|
|
108
|
-
if (!
|
|
109
|
-
let
|
|
109
|
+
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), $.current = i;
|
|
110
|
+
}, [X]);
|
|
111
|
+
if (!o || !l || !u) return null;
|
|
112
|
+
let _e = S?.length ?? 0, ve = w === "split" || w === "stacked" || !_, ye = w === "split" || w === "stacked" || !!_, be = w !== "split" && _ ? () => J(null, { replace: !0 }) : void 0, xe = w === "split" ? Y && X !== null ? X : l.list_width ?? "320px" : "100%";
|
|
110
113
|
return /* @__PURE__ */ H("div", {
|
|
111
|
-
ref:
|
|
114
|
+
ref: me,
|
|
112
115
|
"data-record-list-presentation": w,
|
|
113
116
|
style: {
|
|
114
117
|
display: "flex",
|
|
@@ -118,16 +121,16 @@ function U({ screenCode: t }) {
|
|
|
118
121
|
overflow: "hidden"
|
|
119
122
|
},
|
|
120
123
|
children: [
|
|
121
|
-
|
|
124
|
+
ve && /* @__PURE__ */ H("div", {
|
|
122
125
|
"data-testid": "record-list-panel",
|
|
123
126
|
style: {
|
|
124
127
|
flex: w === "split" ? "none" : "1 1 auto",
|
|
125
128
|
display: "flex",
|
|
126
129
|
flexDirection: "column",
|
|
127
130
|
overflow: "hidden",
|
|
128
|
-
borderRight: w === "split" && !
|
|
131
|
+
borderRight: w === "split" && !Y ? "1px solid var(--divider)" : "none",
|
|
129
132
|
borderBottom: w === "stacked" ? "1px solid var(--divider)" : "none",
|
|
130
|
-
width:
|
|
133
|
+
width: xe,
|
|
131
134
|
minWidth: 0,
|
|
132
135
|
height: w === "stacked" ? "50%" : "100%"
|
|
133
136
|
},
|
|
@@ -135,36 +138,36 @@ function U({ screenCode: t }) {
|
|
|
135
138
|
style: {
|
|
136
139
|
paddingTop: 12,
|
|
137
140
|
paddingBottom: 12,
|
|
138
|
-
...
|
|
141
|
+
...ne(12),
|
|
139
142
|
display: "flex",
|
|
140
143
|
flexDirection: "column",
|
|
141
144
|
gap: 8,
|
|
142
145
|
borderBottom: "1px solid var(--divider)"
|
|
143
146
|
},
|
|
144
147
|
children: [
|
|
145
|
-
|
|
148
|
+
h.hasOriginBack && /* @__PURE__ */ H("div", {
|
|
146
149
|
style: {
|
|
147
150
|
display: "flex",
|
|
148
151
|
alignItems: "center",
|
|
149
152
|
gap: 8
|
|
150
153
|
},
|
|
151
|
-
children: [/* @__PURE__ */ V(
|
|
154
|
+
children: [/* @__PURE__ */ V(f, {
|
|
152
155
|
icon: /* @__PURE__ */ V(e.back, { size: 14 }),
|
|
153
156
|
title: "Back",
|
|
154
|
-
onClick:
|
|
157
|
+
onClick: h.goBack
|
|
155
158
|
}), /* @__PURE__ */ V("span", {
|
|
156
159
|
style: {
|
|
157
160
|
fontSize: 12.5,
|
|
158
161
|
fontWeight: 600,
|
|
159
162
|
color: "var(--text)"
|
|
160
163
|
},
|
|
161
|
-
children:
|
|
164
|
+
children: i(l.display?.name) || i(u.display.name_plural)
|
|
162
165
|
})]
|
|
163
166
|
}),
|
|
164
|
-
/* @__PURE__ */ V(
|
|
165
|
-
value:
|
|
166
|
-
onChange:
|
|
167
|
-
placeholder: `Search ${u
|
|
167
|
+
/* @__PURE__ */ V(d, {
|
|
168
|
+
value: v,
|
|
169
|
+
onChange: fe,
|
|
170
|
+
placeholder: `Search ${i(u.display.name_plural)}…`,
|
|
168
171
|
prefix: /* @__PURE__ */ V(e.search, { size: 13 })
|
|
169
172
|
}),
|
|
170
173
|
x.error && /* @__PURE__ */ H("div", {
|
|
@@ -179,28 +182,28 @@ function U({ screenCode: t }) {
|
|
|
179
182
|
},
|
|
180
183
|
children: [x.error, " Showing this list without URL filters."]
|
|
181
184
|
}),
|
|
182
|
-
|
|
185
|
+
l.filters && l.filters.length > 0 && /* @__PURE__ */ V("div", {
|
|
183
186
|
style: {
|
|
184
187
|
display: "flex",
|
|
185
188
|
flexWrap: "wrap",
|
|
186
189
|
gap: 6
|
|
187
190
|
},
|
|
188
|
-
children:
|
|
189
|
-
let t =
|
|
191
|
+
children: l.filters.map((e) => {
|
|
192
|
+
let t = u.fields.get(e);
|
|
190
193
|
if (!t?.values) return null;
|
|
191
|
-
let n = S?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", r =
|
|
194
|
+
let n = S?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", r = g(t, e, o.entities), a = [{
|
|
192
195
|
value: "__all__",
|
|
193
196
|
label: `All ${r}`
|
|
194
197
|
}, ...t.values.map((e) => ({
|
|
195
198
|
value: e.code,
|
|
196
|
-
label:
|
|
199
|
+
label: i(e.name) || e.code
|
|
197
200
|
}))];
|
|
198
201
|
return /* @__PURE__ */ V("div", {
|
|
199
202
|
style: { minWidth: 120 },
|
|
200
|
-
children: /* @__PURE__ */ V(
|
|
203
|
+
children: /* @__PURE__ */ V(s, {
|
|
201
204
|
value: n,
|
|
202
|
-
options:
|
|
203
|
-
onChange: (t) =>
|
|
205
|
+
options: a,
|
|
206
|
+
onChange: (t) => pe(e, t),
|
|
204
207
|
placeholder: r
|
|
205
208
|
})
|
|
206
209
|
}, e);
|
|
@@ -214,8 +217,8 @@ function U({ screenCode: t }) {
|
|
|
214
217
|
fontSize: 11,
|
|
215
218
|
color: "var(--text-3)"
|
|
216
219
|
},
|
|
217
|
-
children: [/* @__PURE__ */ V("span", { children:
|
|
218
|
-
onClick: () =>
|
|
220
|
+
children: [/* @__PURE__ */ V("span", { children: K ? "Loading…" : `${W.length} ${i(u.display.name_plural)}` }), _e > 0 && /* @__PURE__ */ V("button", {
|
|
221
|
+
onClick: () => a((e) => {
|
|
219
222
|
let t = new URLSearchParams(e);
|
|
220
223
|
return t.delete("filters"), t;
|
|
221
224
|
}, { replace: !0 }),
|
|
@@ -236,12 +239,12 @@ function U({ screenCode: t }) {
|
|
|
236
239
|
style: {
|
|
237
240
|
flex: 1,
|
|
238
241
|
overflowY: "auto",
|
|
239
|
-
padding:
|
|
240
|
-
display:
|
|
242
|
+
padding: E === "cards" ? 10 : 0,
|
|
243
|
+
display: E === "cards" ? "flex" : "block",
|
|
241
244
|
flexDirection: "column",
|
|
242
|
-
gap:
|
|
245
|
+
gap: E === "cards" ? 10 : void 0
|
|
243
246
|
},
|
|
244
|
-
children:
|
|
247
|
+
children: K ? /* @__PURE__ */ V("div", {
|
|
245
248
|
style: {
|
|
246
249
|
padding: 12,
|
|
247
250
|
display: "flex",
|
|
@@ -253,7 +256,7 @@ function U({ screenCode: t }) {
|
|
|
253
256
|
borderRadius: 6,
|
|
254
257
|
background: "var(--surface-3)"
|
|
255
258
|
} }, t))
|
|
256
|
-
}) :
|
|
259
|
+
}) : W.length === 0 ? /* @__PURE__ */ V("div", {
|
|
257
260
|
style: {
|
|
258
261
|
padding: 28,
|
|
259
262
|
textAlign: "center",
|
|
@@ -261,23 +264,23 @@ function U({ screenCode: t }) {
|
|
|
261
264
|
color: "var(--text-3)"
|
|
262
265
|
},
|
|
263
266
|
children: "No records found"
|
|
264
|
-
}) : /* @__PURE__ */ H(B, { children: [
|
|
265
|
-
let t =
|
|
266
|
-
return /* @__PURE__ */ V(
|
|
267
|
+
}) : /* @__PURE__ */ H(B, { children: [W.map((e) => {
|
|
268
|
+
let t = te(e[q]);
|
|
269
|
+
return /* @__PURE__ */ V(ue, {
|
|
267
270
|
record: e,
|
|
268
|
-
entity:
|
|
271
|
+
entity: u,
|
|
269
272
|
columns: C,
|
|
270
273
|
card: N,
|
|
271
|
-
presentation:
|
|
272
|
-
refs:
|
|
273
|
-
isSelected: t ===
|
|
274
|
-
onClick: () =>
|
|
274
|
+
presentation: E,
|
|
275
|
+
refs: G,
|
|
276
|
+
isSelected: t === _,
|
|
277
|
+
onClick: () => J(t, { replace: w === "split" })
|
|
275
278
|
}, t);
|
|
276
|
-
}), U &&
|
|
279
|
+
}), U.isCursor && U.hasMorePages && /* @__PURE__ */ V("button", {
|
|
277
280
|
type: "button",
|
|
278
281
|
"data-testid": "record-list-load-more",
|
|
279
|
-
onClick:
|
|
280
|
-
disabled:
|
|
282
|
+
onClick: U.fetchNextPage,
|
|
283
|
+
disabled: U.isFetchingNextPage,
|
|
281
284
|
style: {
|
|
282
285
|
width: "100%",
|
|
283
286
|
padding: "8px 12px",
|
|
@@ -286,15 +289,15 @@ function U({ screenCode: t }) {
|
|
|
286
289
|
border: "none",
|
|
287
290
|
borderTop: "1px solid var(--divider)",
|
|
288
291
|
color: "var(--text-2)",
|
|
289
|
-
cursor:
|
|
292
|
+
cursor: U.isFetchingNextPage ? "default" : "pointer"
|
|
290
293
|
},
|
|
291
|
-
children:
|
|
294
|
+
children: U.isFetchingNextPage ? "Loading…" : "Load more"
|
|
292
295
|
})] })
|
|
293
296
|
})]
|
|
294
297
|
}),
|
|
295
|
-
|
|
298
|
+
Y && /* @__PURE__ */ V("div", {
|
|
296
299
|
"data-testid": "record-list-resize-handle",
|
|
297
|
-
onMouseDown:
|
|
300
|
+
onMouseDown: ge,
|
|
298
301
|
style: {
|
|
299
302
|
flex: "none",
|
|
300
303
|
width: 1,
|
|
@@ -305,7 +308,7 @@ function U({ screenCode: t }) {
|
|
|
305
308
|
onMouseEnter: (e) => e.currentTarget.style.background = "var(--border-strong)",
|
|
306
309
|
onMouseLeave: (e) => e.currentTarget.style.background = "var(--divider)"
|
|
307
310
|
}),
|
|
308
|
-
|
|
311
|
+
ye && /* @__PURE__ */ V("div", {
|
|
309
312
|
"data-testid": "record-detail-panel",
|
|
310
313
|
style: {
|
|
311
314
|
flex: 1,
|
|
@@ -313,15 +316,15 @@ function U({ screenCode: t }) {
|
|
|
313
316
|
overflow: "hidden",
|
|
314
317
|
height: w === "stacked" ? "50%" : "100%"
|
|
315
318
|
},
|
|
316
|
-
children:
|
|
317
|
-
entityCode:
|
|
318
|
-
recordId:
|
|
319
|
-
items:
|
|
320
|
-
schema:
|
|
321
|
-
entity:
|
|
322
|
-
onBackToList:
|
|
319
|
+
children: _ ? /* @__PURE__ */ V(de, {
|
|
320
|
+
entityCode: p,
|
|
321
|
+
recordId: _,
|
|
322
|
+
items: l.items,
|
|
323
|
+
schema: o,
|
|
324
|
+
entity: u,
|
|
325
|
+
onBackToList: be,
|
|
323
326
|
relatedRecordsPresentation: oe
|
|
324
|
-
},
|
|
327
|
+
}, _) : /* @__PURE__ */ V("div", {
|
|
325
328
|
style: {
|
|
326
329
|
display: "flex",
|
|
327
330
|
alignItems: "center",
|
|
@@ -333,7 +336,7 @@ function U({ screenCode: t }) {
|
|
|
333
336
|
style: { fontSize: 12.5 },
|
|
334
337
|
children: [
|
|
335
338
|
"Select a ",
|
|
336
|
-
u
|
|
339
|
+
i(u.display.name),
|
|
337
340
|
" to view details"
|
|
338
341
|
]
|
|
339
342
|
})
|
|
@@ -342,10 +345,10 @@ function U({ screenCode: t }) {
|
|
|
342
345
|
]
|
|
343
346
|
});
|
|
344
347
|
}
|
|
345
|
-
function
|
|
346
|
-
let l =
|
|
348
|
+
function ue({ record: e, entity: t, columns: r, card: i, presentation: a, refs: o, isSelected: s, onClick: c }) {
|
|
349
|
+
let l = n();
|
|
347
350
|
if (a === "cards") {
|
|
348
|
-
let
|
|
351
|
+
let n = i.badgeFields.filter((n) => W(t, e, n)), r = i.bodyFields.filter((n) => W(t, e, n)), a = i.metaFields.filter((n) => W(t, e, n));
|
|
349
352
|
return /* @__PURE__ */ H("button", {
|
|
350
353
|
type: "button",
|
|
351
354
|
"data-testid": "record-list-card",
|
|
@@ -367,7 +370,7 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
367
370
|
},
|
|
368
371
|
children: [
|
|
369
372
|
/* @__PURE__ */ V(G, {
|
|
370
|
-
entity:
|
|
373
|
+
entity: t,
|
|
371
374
|
record: e,
|
|
372
375
|
field: i.titleField,
|
|
373
376
|
refs: o
|
|
@@ -378,8 +381,8 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
378
381
|
color: "var(--text-3)",
|
|
379
382
|
overflowWrap: "anywhere"
|
|
380
383
|
},
|
|
381
|
-
children:
|
|
382
|
-
entity:
|
|
384
|
+
children: x({
|
|
385
|
+
entity: t,
|
|
383
386
|
fieldName: i.subtitleField,
|
|
384
387
|
record: e,
|
|
385
388
|
mode: "display",
|
|
@@ -387,13 +390,13 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
387
390
|
locale: l
|
|
388
391
|
})
|
|
389
392
|
}),
|
|
390
|
-
|
|
393
|
+
n.length > 0 && /* @__PURE__ */ V("div", {
|
|
391
394
|
style: {
|
|
392
395
|
display: "flex",
|
|
393
396
|
flexWrap: "wrap",
|
|
394
397
|
gap: 6
|
|
395
398
|
},
|
|
396
|
-
children:
|
|
399
|
+
children: n.map((n) => /* @__PURE__ */ V("span", {
|
|
397
400
|
style: {
|
|
398
401
|
border: "1px solid var(--border)",
|
|
399
402
|
borderRadius: 999,
|
|
@@ -403,15 +406,15 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
403
406
|
maxWidth: "100%",
|
|
404
407
|
overflowWrap: "anywhere"
|
|
405
408
|
},
|
|
406
|
-
children:
|
|
407
|
-
entity:
|
|
408
|
-
fieldName:
|
|
409
|
+
children: x({
|
|
410
|
+
entity: t,
|
|
411
|
+
fieldName: n,
|
|
409
412
|
record: e,
|
|
410
413
|
mode: "display",
|
|
411
414
|
refs: o,
|
|
412
415
|
locale: l
|
|
413
416
|
})
|
|
414
|
-
},
|
|
417
|
+
}, n))
|
|
415
418
|
}),
|
|
416
419
|
r.length > 0 && /* @__PURE__ */ V("dl", {
|
|
417
420
|
style: {
|
|
@@ -420,13 +423,13 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
420
423
|
gap: "5px 10px",
|
|
421
424
|
margin: 0
|
|
422
425
|
},
|
|
423
|
-
children: r.map((
|
|
424
|
-
entity:
|
|
426
|
+
children: r.map((n) => /* @__PURE__ */ V(K, {
|
|
427
|
+
entity: t,
|
|
425
428
|
record: e,
|
|
426
|
-
fieldName:
|
|
429
|
+
fieldName: n,
|
|
427
430
|
refs: o,
|
|
428
431
|
locale: l
|
|
429
|
-
},
|
|
432
|
+
}, n))
|
|
430
433
|
}),
|
|
431
434
|
a.length > 0 && /* @__PURE__ */ V("div", {
|
|
432
435
|
style: {
|
|
@@ -436,20 +439,20 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
436
439
|
fontSize: 11,
|
|
437
440
|
color: "var(--text-3)"
|
|
438
441
|
},
|
|
439
|
-
children: a.map((
|
|
442
|
+
children: a.map((n) => /* @__PURE__ */ V("span", {
|
|
440
443
|
style: {
|
|
441
444
|
minWidth: 0,
|
|
442
445
|
overflowWrap: "anywhere"
|
|
443
446
|
},
|
|
444
|
-
children:
|
|
445
|
-
entity:
|
|
446
|
-
fieldName:
|
|
447
|
+
children: x({
|
|
448
|
+
entity: t,
|
|
449
|
+
fieldName: n,
|
|
447
450
|
record: e,
|
|
448
451
|
mode: "display",
|
|
449
452
|
refs: o,
|
|
450
453
|
locale: l
|
|
451
454
|
})
|
|
452
|
-
},
|
|
455
|
+
}, n))
|
|
453
456
|
})
|
|
454
457
|
]
|
|
455
458
|
});
|
|
@@ -487,8 +490,8 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
487
490
|
whiteSpace: "nowrap",
|
|
488
491
|
color: "var(--text)"
|
|
489
492
|
},
|
|
490
|
-
children:
|
|
491
|
-
entity:
|
|
493
|
+
children: x({
|
|
494
|
+
entity: t,
|
|
492
495
|
fieldName: u,
|
|
493
496
|
record: e,
|
|
494
497
|
mode: "display",
|
|
@@ -510,8 +513,8 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
510
513
|
textOverflow: "ellipsis",
|
|
511
514
|
whiteSpace: "nowrap"
|
|
512
515
|
},
|
|
513
|
-
children:
|
|
514
|
-
entity:
|
|
516
|
+
children: x({
|
|
517
|
+
entity: t,
|
|
515
518
|
fieldName: d,
|
|
516
519
|
record: e,
|
|
517
520
|
mode: "display",
|
|
@@ -525,30 +528,30 @@ function le({ record: e, entity: n, columns: r, card: i, presentation: a, refs:
|
|
|
525
528
|
gap: 4,
|
|
526
529
|
flexShrink: 0
|
|
527
530
|
},
|
|
528
|
-
children: f.map((
|
|
531
|
+
children: f.map((n) => y(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
|
|
529
532
|
style: { fontSize: 11 },
|
|
530
|
-
children:
|
|
531
|
-
entity:
|
|
532
|
-
fieldName:
|
|
533
|
+
children: x({
|
|
534
|
+
entity: t,
|
|
535
|
+
fieldName: n,
|
|
533
536
|
record: e,
|
|
534
537
|
mode: "display",
|
|
535
538
|
refs: o,
|
|
536
539
|
locale: l
|
|
537
540
|
})
|
|
538
|
-
},
|
|
541
|
+
}, n))
|
|
539
542
|
})]
|
|
540
543
|
})]
|
|
541
544
|
});
|
|
542
545
|
}
|
|
543
546
|
function W(e, t, n) {
|
|
544
|
-
let r =
|
|
547
|
+
let r = y(e, t, n);
|
|
545
548
|
return !(r == null || r === "" || Array.isArray(r) && r.length === 0);
|
|
546
549
|
}
|
|
547
|
-
function G({ entity: e, record:
|
|
548
|
-
let o =
|
|
550
|
+
function G({ entity: e, record: t, field: r, refs: a }) {
|
|
551
|
+
let o = n(), s = u(t, e), c = r ? x({
|
|
549
552
|
entity: e,
|
|
550
|
-
fieldName:
|
|
551
|
-
record:
|
|
553
|
+
fieldName: r,
|
|
554
|
+
record: t,
|
|
552
555
|
mode: "display",
|
|
553
556
|
refs: a,
|
|
554
557
|
locale: o
|
|
@@ -560,11 +563,11 @@ function G({ entity: e, record: n, field: i, refs: a }) {
|
|
|
560
563
|
color: "var(--text)",
|
|
561
564
|
overflowWrap: "anywhere"
|
|
562
565
|
},
|
|
563
|
-
children: c ||
|
|
566
|
+
children: c || i(e.display.name)
|
|
564
567
|
});
|
|
565
568
|
}
|
|
566
569
|
function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
567
|
-
let a =
|
|
570
|
+
let a = y(e, t, n);
|
|
568
571
|
if (a == null || a === "") return null;
|
|
569
572
|
let o = e.fields.get(n);
|
|
570
573
|
return o ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("dt", {
|
|
@@ -574,7 +577,7 @@ function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
|
574
577
|
minWidth: 0,
|
|
575
578
|
overflowWrap: "anywhere"
|
|
576
579
|
},
|
|
577
|
-
children:
|
|
580
|
+
children: g(o, n)
|
|
578
581
|
}), /* @__PURE__ */ V("dd", {
|
|
579
582
|
style: {
|
|
580
583
|
margin: 0,
|
|
@@ -583,7 +586,7 @@ function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
|
583
586
|
minWidth: 0,
|
|
584
587
|
overflowWrap: "anywhere"
|
|
585
588
|
},
|
|
586
|
-
children:
|
|
589
|
+
children: x({
|
|
587
590
|
entity: e,
|
|
588
591
|
fieldName: n,
|
|
589
592
|
record: t,
|
|
@@ -593,8 +596,8 @@ function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
|
|
|
593
596
|
})
|
|
594
597
|
})] }) : null;
|
|
595
598
|
}
|
|
596
|
-
function
|
|
597
|
-
return /* @__PURE__ */ V(
|
|
599
|
+
function de({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackToList: a, relatedRecordsPresentation: o }) {
|
|
600
|
+
return /* @__PURE__ */ V(c, { children: /* @__PURE__ */ V(q, {
|
|
598
601
|
entityCode: e,
|
|
599
602
|
recordId: t,
|
|
600
603
|
items: n,
|
|
@@ -604,89 +607,89 @@ function q({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackT
|
|
|
604
607
|
relatedRecordsPresentation: o
|
|
605
608
|
}) });
|
|
606
609
|
}
|
|
607
|
-
function
|
|
608
|
-
let
|
|
610
|
+
function q({ entityCode: n, recordId: r, items: s, schema: c, entity: d, onBackToList: m, relatedRecordsPresentation: ee }) {
|
|
611
|
+
let g = l(d, "update"), ne = L(() => r ? o(d, r) : void 0, [r, d]), { data: re, isLoading: x } = _(n, ne), T = v(n), D = a(), [O, k] = z(!1), [A, j] = z({}), M = re?.data, ie = M?.$statuses, ae = M?.$properties, se = N(n, r), I = oe(n, r), R = L(() => {
|
|
609
612
|
let e = /* @__PURE__ */ new Set();
|
|
610
|
-
for (let [t, n] of
|
|
611
|
-
for (let [t] of
|
|
613
|
+
for (let [t, n] of d.fields) !n.auto && !n.primary && e.add(t);
|
|
614
|
+
for (let [t] of d.files ?? []) e.add(t);
|
|
612
615
|
return e;
|
|
613
|
-
}, [
|
|
614
|
-
if (
|
|
616
|
+
}, [d]), ce = F(() => {
|
|
617
|
+
if (M) {
|
|
615
618
|
let e = {};
|
|
616
|
-
|
|
617
|
-
let n =
|
|
618
|
-
e[t] =
|
|
619
|
-
}),
|
|
619
|
+
R.forEach((t) => {
|
|
620
|
+
let n = y(d, M, t);
|
|
621
|
+
e[t] = S(d, t) ? n ?? null : n ?? "";
|
|
622
|
+
}), j(e);
|
|
620
623
|
}
|
|
621
|
-
|
|
624
|
+
k(!0);
|
|
622
625
|
}, [
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
]),
|
|
627
|
-
await
|
|
628
|
-
}, [
|
|
629
|
-
let e = {}, t =
|
|
630
|
-
entity:
|
|
631
|
-
formData:
|
|
632
|
-
record:
|
|
626
|
+
M,
|
|
627
|
+
R,
|
|
628
|
+
d
|
|
629
|
+
]), le = F(async () => {
|
|
630
|
+
await D.flushAllDrafts(), k(!1), j({});
|
|
631
|
+
}, [D]), U = F(() => {
|
|
632
|
+
let e = {}, t = E({
|
|
633
|
+
entity: d,
|
|
634
|
+
formData: A,
|
|
635
|
+
record: M,
|
|
633
636
|
isNew: !1
|
|
634
|
-
}),
|
|
635
|
-
for (let [t, n] of Object.entries(
|
|
637
|
+
}), n = w(t);
|
|
638
|
+
for (let [t, n] of Object.entries(A)) d.files?.has(t) || (e[t] = b(d, t, n));
|
|
636
639
|
if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(e).length === 0) {
|
|
637
|
-
|
|
640
|
+
k(!1), j({});
|
|
638
641
|
return;
|
|
639
642
|
}
|
|
640
|
-
|
|
641
|
-
pkValues:
|
|
643
|
+
T.mutate({
|
|
644
|
+
pkValues: r,
|
|
642
645
|
data: e
|
|
643
646
|
}, {
|
|
644
647
|
onSuccess: () => {
|
|
645
|
-
|
|
648
|
+
n.forEach((e) => D.markCommitted(e)), k(!1), j({}), h.success("Saved");
|
|
646
649
|
},
|
|
647
|
-
onError: () =>
|
|
650
|
+
onError: () => h.error("Failed to save")
|
|
648
651
|
});
|
|
649
652
|
}, [
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
]),
|
|
657
|
-
|
|
653
|
+
D,
|
|
654
|
+
T,
|
|
655
|
+
r,
|
|
656
|
+
d,
|
|
657
|
+
A,
|
|
658
|
+
M
|
|
659
|
+
]), ue = F((e, t) => {
|
|
660
|
+
j((n) => ({
|
|
658
661
|
...n,
|
|
659
662
|
[e]: t
|
|
660
663
|
}));
|
|
661
664
|
}, []);
|
|
662
|
-
if (
|
|
663
|
-
if (!
|
|
664
|
-
let
|
|
665
|
-
schema:
|
|
666
|
-
entity:
|
|
667
|
-
entityCode:
|
|
668
|
-
recordId:
|
|
669
|
-
record:
|
|
670
|
-
...
|
|
671
|
-
...
|
|
672
|
-
} :
|
|
665
|
+
if (x) return /* @__PURE__ */ V(C, {});
|
|
666
|
+
if (!M) return null;
|
|
667
|
+
let W = u(M, d), G = d.display?.display_field, K = W ? void 0 : G ? M[G] : M[d.fields.names()[0]], de = W || (K != null && typeof K != "object" ? te(K) : i(d.display.name)), q = M?.$refs, J = {
|
|
668
|
+
schema: c,
|
|
669
|
+
entity: d,
|
|
670
|
+
entityCode: n,
|
|
671
|
+
recordId: r,
|
|
672
|
+
record: O ? {
|
|
673
|
+
...M,
|
|
674
|
+
...A
|
|
675
|
+
} : M,
|
|
673
676
|
isNew: !1,
|
|
674
|
-
mode:
|
|
675
|
-
onFieldChange:
|
|
676
|
-
refs:
|
|
677
|
-
objectProperties:
|
|
678
|
-
onSetProperty:
|
|
677
|
+
mode: O ? "edit" : "display",
|
|
678
|
+
onFieldChange: O ? ue : void 0,
|
|
679
|
+
refs: q,
|
|
680
|
+
objectProperties: ae ?? void 0,
|
|
681
|
+
onSetProperty: g ? (e, t) => I.mutate({
|
|
679
682
|
propertyCode: e,
|
|
680
683
|
value: t
|
|
681
684
|
}) : void 0,
|
|
682
|
-
isPropertyPending:
|
|
683
|
-
objectStatuses:
|
|
684
|
-
onSetStatus:
|
|
685
|
+
isPropertyPending: I.isPending,
|
|
686
|
+
objectStatuses: ie ?? void 0,
|
|
687
|
+
onSetStatus: g ? (e, t) => se.mutate({
|
|
685
688
|
groupCode: e,
|
|
686
689
|
statusCode: t
|
|
687
690
|
}) : void 0,
|
|
688
|
-
isStatusPending:
|
|
689
|
-
relatedRecordsPresentation:
|
|
691
|
+
isStatusPending: se.isPending,
|
|
692
|
+
relatedRecordsPresentation: ee
|
|
690
693
|
};
|
|
691
694
|
return /* @__PURE__ */ H("div", {
|
|
692
695
|
style: {
|
|
@@ -716,30 +719,30 @@ function J({ entityCode: t, recordId: n, items: a, schema: s, entity: l, onBackT
|
|
|
716
719
|
whiteSpace: "nowrap",
|
|
717
720
|
color: "var(--text)"
|
|
718
721
|
},
|
|
719
|
-
children:
|
|
722
|
+
children: de
|
|
720
723
|
}), /* @__PURE__ */ H("div", {
|
|
721
724
|
style: {
|
|
722
725
|
display: "flex",
|
|
723
726
|
alignItems: "center",
|
|
724
727
|
gap: 6
|
|
725
728
|
},
|
|
726
|
-
children: [
|
|
729
|
+
children: [m && /* @__PURE__ */ V(f, {
|
|
727
730
|
icon: /* @__PURE__ */ V(e.back, { size: 14 }),
|
|
728
731
|
title: "Back to list",
|
|
729
|
-
onClick:
|
|
730
|
-
}),
|
|
732
|
+
onClick: m
|
|
733
|
+
}), g && (O ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(p, {
|
|
731
734
|
size: "xs",
|
|
732
735
|
icon: /* @__PURE__ */ V(e.x, { size: 12 }),
|
|
733
|
-
onClick:
|
|
736
|
+
onClick: le,
|
|
734
737
|
children: "Cancel"
|
|
735
|
-
}), /* @__PURE__ */ V(
|
|
738
|
+
}), /* @__PURE__ */ V(p, {
|
|
736
739
|
kind: "primary",
|
|
737
740
|
size: "xs",
|
|
738
|
-
icon:
|
|
739
|
-
onClick:
|
|
740
|
-
disabled:
|
|
741
|
-
children:
|
|
742
|
-
})] }) : /* @__PURE__ */ V(
|
|
741
|
+
icon: T.isPending ? /* @__PURE__ */ V(t, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
|
|
742
|
+
onClick: U,
|
|
743
|
+
disabled: T.isPending,
|
|
744
|
+
children: T.isPending ? "Saving…" : "Save"
|
|
745
|
+
})] }) : /* @__PURE__ */ V(p, {
|
|
743
746
|
size: "xs",
|
|
744
747
|
icon: /* @__PURE__ */ V(e.edit, { size: 12 }),
|
|
745
748
|
onClick: ce,
|
|
@@ -755,9 +758,9 @@ function J({ entityCode: t, recordId: n, items: a, schema: s, entity: l, onBackT
|
|
|
755
758
|
flexDirection: "column",
|
|
756
759
|
gap: 12
|
|
757
760
|
},
|
|
758
|
-
children:
|
|
759
|
-
nodes:
|
|
760
|
-
ctx:
|
|
761
|
+
children: s && s.length > 0 ? /* @__PURE__ */ V(P, {
|
|
762
|
+
nodes: s,
|
|
763
|
+
ctx: J
|
|
761
764
|
}) : /* @__PURE__ */ H("p", {
|
|
762
765
|
style: {
|
|
763
766
|
fontSize: 12.5,
|