@declarion/react 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-CPoUY99R.js} +35 -35
- package/dist-lib/{Grid-DUjbQg3r.js → Grid--QAEby8k.js} +28 -28
- package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-BxZ7Nd9b.js} +920 -922
- package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-BPV4GPrv.js} +14 -14
- package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-CIKuh_0i.js} +10 -10
- package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
- package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-DMLkZP3R.js} +120 -122
- package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-SnNu6Ug-.js} +376 -377
- package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-C73pR7Iw.js} +1098 -1099
- package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-rJjQZe1V.js} +183 -183
- package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-DQ_KrkWk.js} +1 -1
- package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DsuUS7ae.js} +382 -382
- package/dist-lib/api/agents.d.ts +0 -1
- package/dist-lib/api/events.d.ts +27 -5
- package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-BadzqyeQ.js} +146 -204
- package/dist-lib/components/actions/ObjectActionBar.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -1
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +1 -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/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +1 -1
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/pages/list/columns.d.ts +1 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +1 -1
- package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
- package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
- package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-sMkkAEg9.js} +301 -320
- package/dist-lib/{format-count-C3N-WxEy.js → format-count-B5SLlNOb.js} +245 -245
- package/dist-lib/hooks/useMutations.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +24 -4
- package/dist-lib/index.js +1586 -1858
- package/dist-lib/lib/action-dispatch.d.ts +1 -1
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
- package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-CbHFwz_F.js} +36 -36
- package/dist-lib/{registry-p6CejATt.js → registry-D0RhCnEL.js} +507 -507
- package/dist-lib/stores/realtime.d.ts +20 -0
- package/dist-lib/testing.js +35 -35
- package/dist-lib/types/api.d.ts +8 -4
- package/dist-lib/types/schema.d.ts +6 -0
- package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-DVTXCj_K.js} +2508 -1557
- package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-C2nq58YV.js} +13 -10
- package/dist-lib/{useProperties-C5fZp12D.js → useProperties-BcIz-MyO.js} +25 -25
- package/dist-lib/useTabSearchMirror-UYCsopxP.js +177 -0
- package/dist-lib/{value-DKekzcjz.js → value-CQzGOI0F.js} +25 -25
- package/package.json +14 -14
- package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { Xn as e, f as t, gt as n, ht as r } from "./useCurrentScreen-DVTXCj_K.js";
|
|
2
|
+
import { d as i, f as a, u as o } from "./action-dispatch-DsuUS7ae.js";
|
|
3
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/file-widgets/payload.ts
|
|
5
|
-
function
|
|
5
|
+
function u(e) {
|
|
6
6
|
return !e || Array.isArray(e) ? null : e;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function d(e) {
|
|
9
9
|
return Array.isArray(e) ? e : [];
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function f(e) {
|
|
12
12
|
return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return e.mode === "array" ?
|
|
14
|
+
function p(e, t) {
|
|
15
|
+
return e.mode === "array" ? d(t) : e.mode === "named_map" ? f(t) : u(t);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function m(e, t, n, r) {
|
|
18
18
|
let i = {
|
|
19
19
|
file_id: e.id,
|
|
20
20
|
filename: e.filename
|
|
21
21
|
};
|
|
22
22
|
return r && (i.slot = r), n && (i.position = t), e.metadata !== void 0 && (i.metadata = e.metadata), i;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function h(e, t) {
|
|
25
25
|
if (e.mode === "array") {
|
|
26
|
-
let e =
|
|
27
|
-
return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) =>
|
|
26
|
+
let e = d(t);
|
|
27
|
+
return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => m(e, t, !0)) };
|
|
28
28
|
}
|
|
29
29
|
if (e.mode === "named_map") {
|
|
30
|
-
let e =
|
|
30
|
+
let e = f(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => m(t, 0, !1, e));
|
|
31
31
|
return n.length === 0 ? { clear: !0 } : { set: n };
|
|
32
32
|
}
|
|
33
|
-
let n =
|
|
34
|
-
return n ? { set: [
|
|
33
|
+
let n = u(t);
|
|
34
|
+
return n ? { set: [m(n, 0, !0)] } : { clear: !0 };
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function g(e) {
|
|
37
37
|
return JSON.stringify(e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
let { entity: t, formData: n, record:
|
|
39
|
+
function _(e) {
|
|
40
|
+
let { entity: t, formData: n, record: r, isNew: s } = e, c = {};
|
|
41
41
|
for (let e of t.files?.names() ?? []) {
|
|
42
42
|
if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
|
|
43
|
-
let
|
|
44
|
-
if (!
|
|
45
|
-
let
|
|
43
|
+
let a = o(t, e);
|
|
44
|
+
if (!a) continue;
|
|
45
|
+
let l = p(a, n[e]);
|
|
46
46
|
if (s) {
|
|
47
|
-
if (
|
|
48
|
-
c[e] =
|
|
47
|
+
if (a.mode === "array" ? d(l).length === 0 : a.mode === "named_map" ? Object.values(f(l)).every((e) => e == null) : u(l) == null) continue;
|
|
48
|
+
c[e] = h(a, l);
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
let
|
|
55
|
-
if (!
|
|
56
|
-
for (let e of
|
|
57
|
-
let
|
|
58
|
-
if (!
|
|
59
|
-
let
|
|
51
|
+
let m = p(a, r ? i(r, e) : null), _ = h(a, l), v = h(a, m);
|
|
52
|
+
g(_) !== g(v) && (c[e] = _);
|
|
53
|
+
}
|
|
54
|
+
let l = t.fields;
|
|
55
|
+
if (!l) return c;
|
|
56
|
+
for (let e of l.names()) {
|
|
57
|
+
let i = l.get(e)?.files;
|
|
58
|
+
if (!i || i.mode !== "rich_text_inline" || !Object.prototype.hasOwnProperty.call(n, e)) continue;
|
|
59
|
+
let o = y(i, n[e]);
|
|
60
60
|
if (s) {
|
|
61
|
-
if (
|
|
62
|
-
c[e] =
|
|
61
|
+
if (o.clear) continue;
|
|
62
|
+
c[e] = o;
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
let
|
|
65
|
+
let u = y(i, r ? a({
|
|
66
66
|
...t,
|
|
67
|
-
fields:
|
|
68
|
-
},
|
|
69
|
-
|
|
67
|
+
fields: l
|
|
68
|
+
}, r, e) : null);
|
|
69
|
+
g(o) !== g(u) && (c[e] = o);
|
|
70
70
|
}
|
|
71
71
|
return c;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function v(e) {
|
|
74
74
|
let t = [];
|
|
75
75
|
for (let n of Object.values(e)) for (let e of n.set ?? []) t.push(e.file_id);
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function y(e, t) {
|
|
79
79
|
if (e.mode !== "rich_text_inline") return { clear: !0 };
|
|
80
|
-
let i =
|
|
80
|
+
let i = r(n(t));
|
|
81
81
|
return i.length === 0 ? { clear: !0 } : { set: i.map((e, t) => ({
|
|
82
82
|
file_id: e,
|
|
83
83
|
position: t
|
|
@@ -85,51 +85,51 @@ function v(e, r) {
|
|
|
85
85
|
}
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/components/shared/LoadingSkeleton.tsx
|
|
88
|
-
var
|
|
88
|
+
var b = {
|
|
89
89
|
display: "block",
|
|
90
90
|
background: "linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%)",
|
|
91
91
|
backgroundSize: "200% 100%",
|
|
92
92
|
borderRadius: 6,
|
|
93
93
|
animation: "declarion-shimmer 1.2s ease-in-out infinite"
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
...
|
|
95
|
+
function x({ height: e, width: t }) {
|
|
96
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("style", { children: "@keyframes declarion-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}" }), /* @__PURE__ */ c("span", { style: {
|
|
97
|
+
...b,
|
|
98
98
|
height: e,
|
|
99
99
|
width: t ?? "100%"
|
|
100
100
|
} })] });
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return /* @__PURE__ */
|
|
102
|
+
function S({ rows: e = 8, cols: t = 4 }) {
|
|
103
|
+
return /* @__PURE__ */ l("div", {
|
|
104
104
|
style: {
|
|
105
105
|
padding: 16,
|
|
106
106
|
display: "flex",
|
|
107
107
|
flexDirection: "column",
|
|
108
108
|
gap: 10
|
|
109
109
|
},
|
|
110
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ c("div", {
|
|
111
111
|
style: {
|
|
112
112
|
display: "flex",
|
|
113
113
|
gap: 16
|
|
114
114
|
},
|
|
115
|
-
children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */
|
|
115
|
+
children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ c("div", {
|
|
116
116
|
style: { flex: 1 },
|
|
117
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ c(x, { height: 14 })
|
|
118
118
|
}, t))
|
|
119
|
-
}), Array.from({ length: e }).map((e, n) => /* @__PURE__ */
|
|
119
|
+
}), Array.from({ length: e }).map((e, n) => /* @__PURE__ */ c("div", {
|
|
120
120
|
style: {
|
|
121
121
|
display: "flex",
|
|
122
122
|
gap: 16
|
|
123
123
|
},
|
|
124
|
-
children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */
|
|
124
|
+
children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ c("div", {
|
|
125
125
|
style: { flex: 1 },
|
|
126
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ c(x, { height: 28 })
|
|
127
127
|
}, t))
|
|
128
128
|
}, n))]
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return /* @__PURE__ */
|
|
131
|
+
function C() {
|
|
132
|
+
return /* @__PURE__ */ l("div", {
|
|
133
133
|
style: {
|
|
134
134
|
padding: 20,
|
|
135
135
|
display: "flex",
|
|
@@ -137,60 +137,60 @@ function S() {
|
|
|
137
137
|
gap: 16
|
|
138
138
|
},
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ c(x, {
|
|
141
141
|
height: 12,
|
|
142
142
|
width: 160
|
|
143
143
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ l("div", {
|
|
145
145
|
style: {
|
|
146
146
|
display: "flex",
|
|
147
147
|
alignItems: "center",
|
|
148
148
|
gap: 12
|
|
149
149
|
},
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
-
...
|
|
150
|
+
children: [/* @__PURE__ */ c("span", { style: {
|
|
151
|
+
...b,
|
|
152
152
|
width: 32,
|
|
153
153
|
height: 32,
|
|
154
154
|
borderRadius: 8
|
|
155
|
-
} }), /* @__PURE__ */
|
|
155
|
+
} }), /* @__PURE__ */ c(x, {
|
|
156
156
|
height: 22,
|
|
157
157
|
width: 240
|
|
158
158
|
})]
|
|
159
159
|
}),
|
|
160
|
-
Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */
|
|
160
|
+
Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */ l("div", {
|
|
161
161
|
style: {
|
|
162
162
|
border: "1px solid var(--border)",
|
|
163
163
|
borderRadius: 10,
|
|
164
164
|
background: "var(--surface)",
|
|
165
165
|
overflow: "hidden"
|
|
166
166
|
},
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ c("div", {
|
|
168
168
|
style: {
|
|
169
169
|
padding: "11px 14px",
|
|
170
170
|
borderBottom: "1px solid var(--divider)"
|
|
171
171
|
},
|
|
172
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ c(x, {
|
|
173
173
|
height: 13,
|
|
174
174
|
width: 150
|
|
175
175
|
})
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ c("div", {
|
|
177
177
|
style: {
|
|
178
178
|
padding: 16,
|
|
179
179
|
display: "grid",
|
|
180
180
|
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
181
181
|
gap: "12px 24px"
|
|
182
182
|
},
|
|
183
|
-
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */
|
|
183
|
+
children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ l("div", {
|
|
184
184
|
style: {
|
|
185
185
|
display: "flex",
|
|
186
186
|
gap: 16
|
|
187
187
|
},
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ c(x, {
|
|
189
189
|
height: 13,
|
|
190
190
|
width: 110
|
|
191
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ c("div", {
|
|
192
192
|
style: { flex: 1 },
|
|
193
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ c(x, { height: 13 })
|
|
194
194
|
})]
|
|
195
195
|
}, t))
|
|
196
196
|
})]
|
|
@@ -199,73 +199,15 @@ function S() {
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
|
-
//#region src/lib/sort.ts
|
|
203
|
-
var C = {
|
|
204
|
-
nulls_first: "first",
|
|
205
|
-
nulls_last: "last"
|
|
206
|
-
};
|
|
207
|
-
function w(e) {
|
|
208
|
-
if (!e) return [];
|
|
209
|
-
let t = [];
|
|
210
|
-
for (let n of e.split(",")) {
|
|
211
|
-
let e = n.trim();
|
|
212
|
-
if (!e) continue;
|
|
213
|
-
let r = e.split(":"), i = r[0]?.trim();
|
|
214
|
-
if (!i || i.startsWith("$property.")) continue;
|
|
215
|
-
let a = {
|
|
216
|
-
field: i,
|
|
217
|
-
dir: r[1]?.trim().toLowerCase() === "desc" ? "desc" : "asc"
|
|
218
|
-
}, o = r[2]?.trim().toLowerCase();
|
|
219
|
-
if (o) {
|
|
220
|
-
let e = C[o];
|
|
221
|
-
e && (a.nulls = e);
|
|
222
|
-
}
|
|
223
|
-
t.push(a);
|
|
224
|
-
}
|
|
225
|
-
return t;
|
|
226
|
-
}
|
|
227
|
-
function T(e) {
|
|
228
|
-
if (!e) return;
|
|
229
|
-
let t = [];
|
|
230
|
-
for (let n of e.split(",")) {
|
|
231
|
-
let e = n.trim();
|
|
232
|
-
if (!e) continue;
|
|
233
|
-
let r = e.split(":")[0]?.trim();
|
|
234
|
-
r && r.startsWith("$property.") || t.push(e);
|
|
235
|
-
}
|
|
236
|
-
return t.length > 0 ? t.join(",") : void 0;
|
|
237
|
-
}
|
|
238
|
-
function ee(e) {
|
|
239
|
-
return e.map((e) => {
|
|
240
|
-
let t = `${e.field}:${e.dir}`;
|
|
241
|
-
return e.nulls === "first" ? `${t}:nulls_first` : e.nulls === "last" ? `${t}:nulls_last` : t;
|
|
242
|
-
}).join(",");
|
|
243
|
-
}
|
|
244
|
-
function te(e, t) {
|
|
245
|
-
let n = e.findIndex((e) => e.field === t);
|
|
246
|
-
return n >= 0 ? [...e.slice(0, n), ...e.slice(n + 1)] : e.length >= 5 ? e : [...e, {
|
|
247
|
-
field: t,
|
|
248
|
-
dir: "asc"
|
|
249
|
-
}];
|
|
250
|
-
}
|
|
251
|
-
function ne(e, t) {
|
|
252
|
-
let n = e.filter((e) => e.field !== t.field);
|
|
253
|
-
return n.length >= 5 ? e : [...n, t];
|
|
254
|
-
}
|
|
255
|
-
function re(e, t) {
|
|
256
|
-
let n = e.findIndex((e) => e.field === t);
|
|
257
|
-
return n < 0 ? e : [...e.slice(0, n), ...e.slice(n + 1)];
|
|
258
|
-
}
|
|
259
|
-
//#endregion
|
|
260
202
|
//#region src/components/pages/list/cardProjection.ts
|
|
261
|
-
var
|
|
203
|
+
var w = 4, ee = 2, te = 2, ne = [
|
|
262
204
|
"screen_card",
|
|
263
205
|
"entity_card",
|
|
264
206
|
"saved_view_columns",
|
|
265
207
|
"screen_default_columns",
|
|
266
208
|
"screen_columns",
|
|
267
209
|
"entity_inference"
|
|
268
|
-
],
|
|
210
|
+
], T = /* @__PURE__ */ new Set(["_select", "_actions"]), re = /* @__PURE__ */ new Set([
|
|
269
211
|
"text",
|
|
270
212
|
"rich_text",
|
|
271
213
|
"multilang_text",
|
|
@@ -274,11 +216,11 @@ var E = 4, D = 2, O = 2, k = [
|
|
|
274
216
|
"secret",
|
|
275
217
|
"password",
|
|
276
218
|
"bytes"
|
|
277
|
-
]),
|
|
219
|
+
]), ie = /* @__PURE__ */ new Set(["enum", "bool"]), E = /* @__PURE__ */ new Set([
|
|
278
220
|
"date",
|
|
279
221
|
"time",
|
|
280
222
|
"timestamp"
|
|
281
|
-
]),
|
|
223
|
+
]), ae = /* @__PURE__ */ new Set([
|
|
282
224
|
"string",
|
|
283
225
|
"text",
|
|
284
226
|
"email",
|
|
@@ -304,22 +246,22 @@ var E = 4, D = 2, O = 2, k = [
|
|
|
304
246
|
"enum",
|
|
305
247
|
"status"
|
|
306
248
|
]);
|
|
307
|
-
function
|
|
249
|
+
function D(e) {
|
|
308
250
|
let { entity: t, screen: n, savedViewColumns: r } = e, i = n?.card;
|
|
309
|
-
if (i) return
|
|
310
|
-
if (t?.card) return
|
|
251
|
+
if (i) return M(t, i, "screen_card");
|
|
252
|
+
if (t?.card) return M(t, t.card, "entity_card");
|
|
311
253
|
let a = F(t, n, r);
|
|
312
|
-
return
|
|
254
|
+
return N(t, a.columns, a.source);
|
|
313
255
|
}
|
|
314
|
-
function
|
|
315
|
-
let { entity: t, screen: n, presentation: r, visibleColumns: i, card: a, rowActions: o, toolbarActions: s, bulkActions: c, sort: l, includeDetailHandoff: u = !0, screens: d } = e, f = new
|
|
256
|
+
function O(e) {
|
|
257
|
+
let { entity: t, screen: n, presentation: r, visibleColumns: i, card: a, rowActions: o, toolbarActions: s, bulkActions: c, sort: l, includeDetailHandoff: u = !0, screens: d } = e, f = new _e(), p = r === "cards" ? a.renderFields : I(t, i, { explicit: !0 }), m = r === "cards" ? A(t, n) : [];
|
|
316
258
|
for (let e of p) f.addField(e, "render"), Z(t, e, f, "render");
|
|
317
259
|
for (let e of m) p.includes(e) || (f.addField(e, "variant"), Z(t, e, f, "variant"));
|
|
318
|
-
let h =
|
|
260
|
+
let h = se(t, f), g = de(t, [
|
|
319
261
|
o,
|
|
320
262
|
s,
|
|
321
263
|
c
|
|
322
|
-
], f), _ =
|
|
264
|
+
], f), _ = k(t, n, f), v = fe(t, l, f), y = pe(t, n, d, f);
|
|
323
265
|
if (u) for (let e of h) f.addField(e, "detail_handoff");
|
|
324
266
|
let b = new $();
|
|
325
267
|
for (let e of h) b.add(e);
|
|
@@ -331,7 +273,7 @@ function le(e) {
|
|
|
331
273
|
let x = new $();
|
|
332
274
|
for (let e of p) X(t, e, x, f);
|
|
333
275
|
for (let e of b.values()) X(t, e, x, f);
|
|
334
|
-
let S = x.values(), C =
|
|
276
|
+
let S = x.values(), C = ge(f);
|
|
335
277
|
return {
|
|
336
278
|
renderFields: p,
|
|
337
279
|
dependencyFields: b.values().filter((e) => !p.includes(e)),
|
|
@@ -343,7 +285,7 @@ function le(e) {
|
|
|
343
285
|
reasons: f.snapshot()
|
|
344
286
|
};
|
|
345
287
|
}
|
|
346
|
-
function
|
|
288
|
+
function k(e, t, n) {
|
|
347
289
|
let r = new $(), i = (t) => {
|
|
348
290
|
for (let n of t) n.and ? i(n.and) : n.or ? i(n.or) : n.field && e?.fields.has(n.field) && r.add(n.field);
|
|
349
291
|
};
|
|
@@ -352,9 +294,9 @@ function ue(e, t, n) {
|
|
|
352
294
|
for (let e of r.values()) n.addField(e, "variant");
|
|
353
295
|
return r.values();
|
|
354
296
|
}
|
|
355
|
-
function
|
|
297
|
+
function A(e, t, n) {
|
|
356
298
|
let r = new $();
|
|
357
|
-
for (let i of
|
|
299
|
+
for (let i of D({
|
|
358
300
|
entity: e,
|
|
359
301
|
screen: t,
|
|
360
302
|
savedViewColumns: n
|
|
@@ -362,7 +304,7 @@ function j(e, t, n) {
|
|
|
362
304
|
for (let i of t?.variants?.items() ?? []) {
|
|
363
305
|
let a = { ...t };
|
|
364
306
|
i.card !== void 0 && (a.card = i.card);
|
|
365
|
-
for (let t of
|
|
307
|
+
for (let t of D({
|
|
366
308
|
entity: e,
|
|
367
309
|
screen: a,
|
|
368
310
|
savedViewColumns: n
|
|
@@ -370,21 +312,21 @@ function j(e, t, n) {
|
|
|
370
312
|
}
|
|
371
313
|
return r.values();
|
|
372
314
|
}
|
|
373
|
-
function
|
|
315
|
+
function j(e, t, n) {
|
|
374
316
|
if (!e || t?.on_row_click !== "peek" || t.quick_peek?.enabled === !1) return [];
|
|
375
317
|
let r = t.quick_peek?.fields;
|
|
376
|
-
if (r && r.length > 0) return
|
|
318
|
+
if (r && r.length > 0) return I(e, r, { explicit: !0 });
|
|
377
319
|
let i = t.quick_peek?.sections;
|
|
378
320
|
if (i && i.length > 0) {
|
|
379
321
|
let r = Object.values(n ?? {}).find((e) => e.type === "detail" && e.entity === t.entity), a = new $();
|
|
380
|
-
|
|
381
|
-
let o =
|
|
322
|
+
me(r?.items, new Set(i.map(String)), a);
|
|
323
|
+
let o = I(e, a.values(), { explicit: !0 });
|
|
382
324
|
if (o.length > 0) return o;
|
|
383
325
|
}
|
|
384
|
-
return
|
|
326
|
+
return he(e);
|
|
385
327
|
}
|
|
386
|
-
function
|
|
387
|
-
let r = t.max_body_fields ??
|
|
328
|
+
function M(e, t, n) {
|
|
329
|
+
let r = t.max_body_fields ?? w, i = L(e, t.title_field, { explicit: !0 }), a = L(e, t.subtitle_field, { explicit: !0 }), o = I(e, t.badge_fields ?? [], { explicit: !0 }), s = I(e, t.fields ?? [], { explicit: !0 }), c = I(e, t.meta_fields ?? [], { explicit: !0 });
|
|
388
330
|
return P({
|
|
389
331
|
source: n,
|
|
390
332
|
explicit: !0,
|
|
@@ -398,13 +340,13 @@ function N(e, t, n) {
|
|
|
398
340
|
maxBodyFields: r
|
|
399
341
|
});
|
|
400
342
|
}
|
|
401
|
-
function
|
|
402
|
-
let r =
|
|
343
|
+
function N(e, t, n) {
|
|
344
|
+
let r = I(e, t, { explicit: !1 }), i = w, a = L(e, e?.display?.display_field, { explicit: !1 }), o = a ?? R(e, r, {
|
|
403
345
|
allowLong: !1,
|
|
404
346
|
allowAuto: !1
|
|
405
|
-
}), s = a !== void 0, c = o ? /* @__PURE__ */ new Set([o]) : void 0, l = r.find((t) => !c?.has(t) &&
|
|
347
|
+
}), s = a !== void 0, c = o ? /* @__PURE__ */ new Set([o]) : void 0, l = r.find((t) => !c?.has(t) && B(e, t)), u = new Set([o, l].filter((e) => !!e)), d = H(e, r).filter((e) => !u.has(e)).slice(0, ee);
|
|
406
348
|
for (let e of d) u.add(e);
|
|
407
|
-
let f = r.filter((t) => !u.has(t) && U(e, t)).slice(0,
|
|
349
|
+
let f = r.filter((t) => !u.has(t) && U(e, t)).slice(0, te);
|
|
408
350
|
for (let e of f) u.add(e);
|
|
409
351
|
return P({
|
|
410
352
|
source: n,
|
|
@@ -413,7 +355,7 @@ function de(e, t, n) {
|
|
|
413
355
|
titleUsesDisplay: s,
|
|
414
356
|
subtitleField: l,
|
|
415
357
|
badgeFields: d,
|
|
416
|
-
bodyFields: r.filter((t) => !u.has(t) &&
|
|
358
|
+
bodyFields: r.filter((t) => !u.has(t) && z(e, t)).slice(0, i),
|
|
417
359
|
metaFields: f,
|
|
418
360
|
hideEmptyFields: !0,
|
|
419
361
|
maxBodyFields: i
|
|
@@ -444,7 +386,7 @@ function P(e) {
|
|
|
444
386
|
maxBodyFields: e.maxBodyFields,
|
|
445
387
|
renderFields: t.values(),
|
|
446
388
|
fields: n,
|
|
447
|
-
sourcePrecedence:
|
|
389
|
+
sourcePrecedence: ne
|
|
448
390
|
};
|
|
449
391
|
}
|
|
450
392
|
function F(e, t, n) {
|
|
@@ -459,10 +401,10 @@ function F(e, t, n) {
|
|
|
459
401
|
columns: t.columns
|
|
460
402
|
} : {
|
|
461
403
|
source: "entity_inference",
|
|
462
|
-
columns:
|
|
404
|
+
columns: oe(e)
|
|
463
405
|
};
|
|
464
406
|
}
|
|
465
|
-
function
|
|
407
|
+
function oe(e) {
|
|
466
408
|
if (!e) return [];
|
|
467
409
|
let t = [];
|
|
468
410
|
e.display.display_field && t.push(e.display.display_field);
|
|
@@ -472,16 +414,16 @@ function I(e) {
|
|
|
472
414
|
if (e.evidence_covered && t.push("$evidence"), e.files) for (let [n] of e.files) t.push(n);
|
|
473
415
|
return t;
|
|
474
416
|
}
|
|
475
|
-
function
|
|
417
|
+
function I(e, t, n) {
|
|
476
418
|
let r = new $();
|
|
477
419
|
for (let i of t) {
|
|
478
|
-
let t =
|
|
420
|
+
let t = L(e, i, n);
|
|
479
421
|
t && r.add(t);
|
|
480
422
|
}
|
|
481
423
|
return r.values();
|
|
482
424
|
}
|
|
483
|
-
function
|
|
484
|
-
if (!t ||
|
|
425
|
+
function L(e, t, n) {
|
|
426
|
+
if (!t || T.has(t)) return;
|
|
485
427
|
if (!e) return t.startsWith("$") ? void 0 : t;
|
|
486
428
|
if (t.startsWith("$status.")) {
|
|
487
429
|
let n = t.slice(8);
|
|
@@ -496,30 +438,30 @@ function R(e, t, n) {
|
|
|
496
438
|
let r = e.fields.get(t), i = e.files?.get(t);
|
|
497
439
|
if (!(!r && !i) && (n.explicit || !(r && r.display?.is_listable === !1) && !(i && i.display?.is_listable === !1))) return t;
|
|
498
440
|
}
|
|
499
|
-
function
|
|
441
|
+
function R(e, t, n) {
|
|
500
442
|
return t.find((t) => n.exclude?.has(t) || !n.allowAuto && G(e, t) || !n.allowLong && K(e, t) ? !1 : W(e, t));
|
|
501
443
|
}
|
|
502
|
-
function
|
|
444
|
+
function z(e, t) {
|
|
503
445
|
return !(!W(e, t) || G(e, t) || K(e, t));
|
|
504
446
|
}
|
|
505
|
-
function
|
|
506
|
-
return !(!W(e, t) || G(e, t) || K(e, t) || U(e, t) ||
|
|
447
|
+
function B(e, t) {
|
|
448
|
+
return !(!W(e, t) || G(e, t) || K(e, t) || U(e, t) || V(e, t));
|
|
507
449
|
}
|
|
508
|
-
function
|
|
450
|
+
function V(e, t) {
|
|
509
451
|
if (t.startsWith("$status.") || t.startsWith("$property.") || t === "$evidence") return !0;
|
|
510
452
|
let n = Q(e, t);
|
|
511
|
-
return n.kind === "field" &&
|
|
453
|
+
return n.kind === "field" && ie.has(n.field.type);
|
|
512
454
|
}
|
|
513
|
-
function
|
|
455
|
+
function H(e, t) {
|
|
514
456
|
let n = new $();
|
|
515
457
|
for (let e of t) (e.startsWith("$status.") || e.startsWith("$property.") || e === "$evidence") && n.add(e);
|
|
516
|
-
for (let r of t)
|
|
458
|
+
for (let r of t) V(e, r) && n.add(r);
|
|
517
459
|
return n.values();
|
|
518
460
|
}
|
|
519
461
|
function U(e, t) {
|
|
520
462
|
if (G(e, t)) return !1;
|
|
521
463
|
let n = Q(e, t);
|
|
522
|
-
return n.kind === "field" &&
|
|
464
|
+
return n.kind === "field" && E.has(n.field.type);
|
|
523
465
|
}
|
|
524
466
|
function W(e, t) {
|
|
525
467
|
return Q(e, t).kind !== "missing";
|
|
@@ -530,21 +472,21 @@ function G(e, t) {
|
|
|
530
472
|
}
|
|
531
473
|
function K(e, t) {
|
|
532
474
|
let n = Q(e, t);
|
|
533
|
-
return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" &&
|
|
475
|
+
return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" && re.has(n.field.type);
|
|
534
476
|
}
|
|
535
|
-
function
|
|
477
|
+
function se(t, n) {
|
|
536
478
|
if (!t) return [];
|
|
537
479
|
let r = new $();
|
|
538
480
|
for (let i of e(t)) r.add(i), n.addField(i, "identity");
|
|
539
|
-
let i =
|
|
481
|
+
let i = L(t, t.display.display_field, { explicit: !0 });
|
|
540
482
|
i && (r.add(i), n.addField(i, "display"), Z(t, i, n, "display"));
|
|
541
|
-
for (let e of
|
|
542
|
-
let i =
|
|
483
|
+
for (let e of ce(t.display.display_template)) {
|
|
484
|
+
let i = L(t, e, { explicit: !0 });
|
|
543
485
|
i && (r.add(i), n.addField(i, "display_template"), Z(t, i, n, "display_template"));
|
|
544
486
|
}
|
|
545
487
|
return r.values();
|
|
546
488
|
}
|
|
547
|
-
function
|
|
489
|
+
function ce(e) {
|
|
548
490
|
if (!e) return [];
|
|
549
491
|
let t = new $(), n = 0;
|
|
550
492
|
for (; n < e.length;) {
|
|
@@ -554,14 +496,14 @@ function me(e) {
|
|
|
554
496
|
n = r + 2;
|
|
555
497
|
continue;
|
|
556
498
|
}
|
|
557
|
-
let i =
|
|
499
|
+
let i = le(e, r + 2);
|
|
558
500
|
if (i < 0) break;
|
|
559
|
-
for (let n of
|
|
501
|
+
for (let n of ue(e.slice(r + 2, i))) t.add(n);
|
|
560
502
|
n = i + 1;
|
|
561
503
|
}
|
|
562
504
|
return t.values();
|
|
563
505
|
}
|
|
564
|
-
function
|
|
506
|
+
function le(e, t) {
|
|
565
507
|
let n = 0;
|
|
566
508
|
for (let r = t; r < e.length; r += 1) {
|
|
567
509
|
let t = e[r];
|
|
@@ -576,7 +518,7 @@ function he(e, t) {
|
|
|
576
518
|
}
|
|
577
519
|
return -1;
|
|
578
520
|
}
|
|
579
|
-
function
|
|
521
|
+
function ue(e) {
|
|
580
522
|
let t = new $(), n = 0;
|
|
581
523
|
for (; n < e.length;) {
|
|
582
524
|
let r = e.indexOf("row.", n);
|
|
@@ -594,53 +536,53 @@ function ge(e) {
|
|
|
594
536
|
function q(e) {
|
|
595
537
|
return e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 95;
|
|
596
538
|
}
|
|
597
|
-
function
|
|
539
|
+
function de(e, t, n) {
|
|
598
540
|
let r = new $();
|
|
599
541
|
for (let i of t) for (let t of i ?? []) for (let i of [
|
|
600
542
|
...t.action.visible_if ?? [],
|
|
601
543
|
...t.action.enabled_if ?? [],
|
|
602
544
|
...t.action.conditions ?? []
|
|
603
545
|
]) {
|
|
604
|
-
let t =
|
|
546
|
+
let t = L(e, i.field, { explicit: !0 });
|
|
605
547
|
t && (r.add(t), n.addField(t, "condition"), Z(e, t, n, "condition"));
|
|
606
548
|
}
|
|
607
549
|
return r.values();
|
|
608
550
|
}
|
|
609
|
-
function
|
|
610
|
-
let
|
|
611
|
-
for (let t of
|
|
612
|
-
let
|
|
613
|
-
|
|
551
|
+
function fe(e, n, r) {
|
|
552
|
+
let i = typeof n == "string" ? t(n) : n ?? [], a = new $();
|
|
553
|
+
for (let t of i) {
|
|
554
|
+
let n = L(e, t.field, { explicit: !0 });
|
|
555
|
+
n && (a.add(n), r.addField(n, "sort"), Z(e, n, r, "sort"));
|
|
614
556
|
}
|
|
615
|
-
return
|
|
557
|
+
return a.values();
|
|
616
558
|
}
|
|
617
|
-
function
|
|
559
|
+
function pe(e, t, n, r) {
|
|
618
560
|
let i = new $(), a = t?.variants?.items() ?? [];
|
|
619
|
-
if (a.length === 0 || a.some((e) => e.quick_peek === void 0)) for (let r of
|
|
561
|
+
if (a.length === 0 || a.some((e) => e.quick_peek === void 0)) for (let r of j(e, t, n)) i.add(r);
|
|
620
562
|
for (let r of a) {
|
|
621
563
|
if (r.quick_peek === void 0) continue;
|
|
622
564
|
let a = {
|
|
623
565
|
...t,
|
|
624
566
|
quick_peek: r.quick_peek
|
|
625
567
|
};
|
|
626
|
-
for (let t of
|
|
568
|
+
for (let t of j(e, a, n)) i.add(t);
|
|
627
569
|
}
|
|
628
570
|
for (let t of i.values()) r.addField(t, "quick_peek"), Z(e, t, r, "quick_peek");
|
|
629
571
|
return i.values();
|
|
630
572
|
}
|
|
631
|
-
function
|
|
573
|
+
function me(e, t, n) {
|
|
632
574
|
if (Array.isArray(e)) {
|
|
633
575
|
for (let r of e) if (!(!r || typeof r != "object")) {
|
|
634
576
|
if ("section" in r) {
|
|
635
|
-
let e = r.section, i =
|
|
636
|
-
i && t.has(i) &&
|
|
577
|
+
let e = r.section, i = Y(e?.name);
|
|
578
|
+
i && t.has(i) && J(e?.items, n);
|
|
637
579
|
continue;
|
|
638
580
|
}
|
|
639
|
-
"fields" in r &&
|
|
581
|
+
"fields" in r && J([r], n);
|
|
640
582
|
}
|
|
641
583
|
}
|
|
642
584
|
}
|
|
643
|
-
function
|
|
585
|
+
function J(e, t) {
|
|
644
586
|
if (Array.isArray(e)) {
|
|
645
587
|
for (let n of e) if (!(!n || typeof n != "object")) {
|
|
646
588
|
if ("fields" in n) {
|
|
@@ -653,11 +595,11 @@ function Y(e, t) {
|
|
|
653
595
|
}
|
|
654
596
|
}
|
|
655
597
|
}
|
|
656
|
-
"section" in n &&
|
|
598
|
+
"section" in n && J(n.section?.items, t);
|
|
657
599
|
}
|
|
658
600
|
}
|
|
659
601
|
}
|
|
660
|
-
function
|
|
602
|
+
function Y(e) {
|
|
661
603
|
if (typeof e == "string") return e;
|
|
662
604
|
if (e && typeof e == "object") {
|
|
663
605
|
let t = Object.values(e).find((e) => typeof e == "string");
|
|
@@ -665,12 +607,12 @@ function be(e) {
|
|
|
665
607
|
}
|
|
666
608
|
return "";
|
|
667
609
|
}
|
|
668
|
-
function
|
|
610
|
+
function he(e) {
|
|
669
611
|
let t = [];
|
|
670
612
|
for (let [n, r] of e.fields) {
|
|
671
613
|
if (r.primary || r.auto || r.ref || r.array || r.structure || r.display?.is_listable === !1) continue;
|
|
672
614
|
let e = (r.type || "").toLowerCase(), i = !!(r.enum || r.values);
|
|
673
|
-
if (!(!
|
|
615
|
+
if (!(!ae.has(e) && !i) && (t.push(n), t.length >= 8)) break;
|
|
674
616
|
}
|
|
675
617
|
return t;
|
|
676
618
|
}
|
|
@@ -697,7 +639,7 @@ function Z(e, t, n, r) {
|
|
|
697
639
|
let i = Q(e, t);
|
|
698
640
|
i.kind === "field" && i.field.type === "ref" && (n.addExpand("refs", "ref_expand"), r !== "ref_expand" && n.addExpand("refs", r));
|
|
699
641
|
}
|
|
700
|
-
function
|
|
642
|
+
function ge(e) {
|
|
701
643
|
let t = e.snapshot().expand, n = [];
|
|
702
644
|
return t.refs && n.push("refs"), t.statuses && n.push("statuses"), t.properties && n.push("properties"), t.evidence && n.push("evidence"), n;
|
|
703
645
|
}
|
|
@@ -729,7 +671,7 @@ var $ = class {
|
|
|
729
671
|
values() {
|
|
730
672
|
return [...this.#e];
|
|
731
673
|
}
|
|
732
|
-
},
|
|
674
|
+
}, _e = class {
|
|
733
675
|
#e = /* @__PURE__ */ new Map();
|
|
734
676
|
#t = /* @__PURE__ */ new Map();
|
|
735
677
|
addField(e, t) {
|
|
@@ -754,4 +696,4 @@ var $ = class {
|
|
|
754
696
|
}
|
|
755
697
|
};
|
|
756
698
|
//#endregion
|
|
757
|
-
export {
|
|
699
|
+
export { C as a, v as c, A as i, O as n, S as o, j as r, _ as s, D as t };
|