@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.
Files changed (65) hide show
  1. package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-CPoUY99R.js} +35 -35
  2. package/dist-lib/{Grid-DUjbQg3r.js → Grid--QAEby8k.js} +28 -28
  3. package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-BxZ7Nd9b.js} +920 -922
  4. package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-BPV4GPrv.js} +14 -14
  5. package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-CIKuh_0i.js} +10 -10
  6. package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
  7. package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-DMLkZP3R.js} +120 -122
  8. package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-SnNu6Ug-.js} +376 -377
  9. package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-C73pR7Iw.js} +1098 -1099
  10. package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-rJjQZe1V.js} +183 -183
  11. package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-DQ_KrkWk.js} +1 -1
  12. package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DsuUS7ae.js} +382 -382
  13. package/dist-lib/api/agents.d.ts +0 -1
  14. package/dist-lib/api/events.d.ts +27 -5
  15. package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-BadzqyeQ.js} +146 -204
  16. package/dist-lib/components/actions/ObjectActionBar.d.ts +1 -1
  17. package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
  18. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -1
  19. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -1
  20. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +1 -1
  21. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +1 -1
  22. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +1 -1
  23. package/dist-lib/components/file-widgets/host.d.ts +1 -1
  24. package/dist-lib/components/layout/Layout.d.ts +1 -1
  25. package/dist-lib/components/layout/TopBar.d.ts +1 -1
  26. package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
  27. package/dist-lib/components/list/PeekFieldCell.d.ts +1 -1
  28. package/dist-lib/components/list/QuickPeek.d.ts +1 -1
  29. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  30. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
  31. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  32. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -1
  33. package/dist-lib/components/pages/list/ListCardsBody.d.ts +1 -1
  34. package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
  35. package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
  36. package/dist-lib/components/pages/list/columns.d.ts +1 -1
  37. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  38. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +1 -1
  39. package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
  40. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +1 -1
  41. package/dist-lib/components/pages/list/useListViews.d.ts +1 -1
  42. package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
  43. package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
  44. package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
  45. package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-sMkkAEg9.js} +301 -320
  46. package/dist-lib/{format-count-C3N-WxEy.js → format-count-B5SLlNOb.js} +245 -245
  47. package/dist-lib/hooks/useMutations.d.ts +1 -1
  48. package/dist-lib/hooks/useSSE.d.ts +24 -4
  49. package/dist-lib/index.js +1586 -1858
  50. package/dist-lib/lib/action-dispatch.d.ts +1 -1
  51. package/dist-lib/lib/document-templates.d.ts +1 -1
  52. package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
  53. package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-CbHFwz_F.js} +36 -36
  54. package/dist-lib/{registry-p6CejATt.js → registry-D0RhCnEL.js} +507 -507
  55. package/dist-lib/stores/realtime.d.ts +20 -0
  56. package/dist-lib/testing.js +35 -35
  57. package/dist-lib/types/api.d.ts +8 -4
  58. package/dist-lib/types/schema.d.ts +6 -0
  59. package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-DVTXCj_K.js} +2508 -1557
  60. package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-C2nq58YV.js} +13 -10
  61. package/dist-lib/{useProperties-C5fZp12D.js → useProperties-BcIz-MyO.js} +25 -25
  62. package/dist-lib/useTabSearchMirror-UYCsopxP.js +177 -0
  63. package/dist-lib/{value-DKekzcjz.js → value-CQzGOI0F.js} +25 -25
  64. package/package.json +14 -14
  65. package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
@@ -1,83 +1,83 @@
1
- import { En as e, U as t, W as n } from "./useCurrentScreen-74x5yJNb.js";
2
- import { d as r, f as i, u as a } from "./action-dispatch-C28UhXXA.js";
3
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
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 l(e) {
5
+ function u(e) {
6
6
  return !e || Array.isArray(e) ? null : e;
7
7
  }
8
- function u(e) {
8
+ function d(e) {
9
9
  return Array.isArray(e) ? e : [];
10
10
  }
11
- function d(e) {
11
+ function f(e) {
12
12
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
13
13
  }
14
- function f(e, t) {
15
- return e.mode === "array" ? u(t) : e.mode === "named_map" ? d(t) : l(t);
14
+ function p(e, t) {
15
+ return e.mode === "array" ? d(t) : e.mode === "named_map" ? f(t) : u(t);
16
16
  }
17
- function p(e, t, n, r) {
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 m(e, t) {
24
+ function h(e, t) {
25
25
  if (e.mode === "array") {
26
- let e = u(t);
27
- return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => p(e, t, !0)) };
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 = d(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => p(t, 0, !1, 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 = l(t);
34
- return n ? { set: [p(n, 0, !0)] } : { clear: !0 };
33
+ let n = u(t);
34
+ return n ? { set: [m(n, 0, !0)] } : { clear: !0 };
35
35
  }
36
- function h(e) {
36
+ function g(e) {
37
37
  return JSON.stringify(e);
38
38
  }
39
- function g(e) {
40
- let { entity: t, formData: n, record: o, isNew: s } = e, c = {};
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 i = a(t, e);
44
- if (!i) continue;
45
- let p = f(i, n[e]);
43
+ let a = o(t, e);
44
+ if (!a) continue;
45
+ let l = p(a, n[e]);
46
46
  if (s) {
47
- if (i.mode === "array" ? u(p).length === 0 : i.mode === "named_map" ? Object.values(d(p)).every((e) => e == null) : l(p) == null) continue;
48
- c[e] = m(i, p);
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 g = f(i, o ? r(o, e) : null), _ = m(i, p), v = m(i, g);
52
- h(_) !== h(v) && (c[e] = _);
53
- }
54
- let p = t.fields;
55
- if (!p) return c;
56
- for (let e of p.names()) {
57
- let r = p.get(e)?.files;
58
- if (!r || r.mode !== "rich_text_inline" || !Object.prototype.hasOwnProperty.call(n, e)) continue;
59
- let a = v(r, n[e]);
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 (a.clear) continue;
62
- c[e] = a;
61
+ if (o.clear) continue;
62
+ c[e] = o;
63
63
  continue;
64
64
  }
65
- let l = v(r, o ? i({
65
+ let u = y(i, r ? a({
66
66
  ...t,
67
- fields: p
68
- }, o, e) : null);
69
- h(a) !== h(l) && (c[e] = a);
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 _(e) {
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 v(e, r) {
78
+ function y(e, t) {
79
79
  if (e.mode !== "rich_text_inline") return { clear: !0 };
80
- let i = t(n(r));
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 y = {
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 b({ height: e, width: t }) {
96
- return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("style", { children: "@keyframes declarion-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}" }), /* @__PURE__ */ s("span", { style: {
97
- ...y,
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 x({ rows: e = 8, cols: t = 4 }) {
103
- return /* @__PURE__ */ c("div", {
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__ */ s("div", {
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__ */ s("div", {
115
+ children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ c("div", {
116
116
  style: { flex: 1 },
117
- children: /* @__PURE__ */ s(b, { height: 14 })
117
+ children: /* @__PURE__ */ c(x, { height: 14 })
118
118
  }, t))
119
- }), Array.from({ length: e }).map((e, n) => /* @__PURE__ */ s("div", {
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__ */ s("div", {
124
+ children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ c("div", {
125
125
  style: { flex: 1 },
126
- children: /* @__PURE__ */ s(b, { height: 28 })
126
+ children: /* @__PURE__ */ c(x, { height: 28 })
127
127
  }, t))
128
128
  }, n))]
129
129
  });
130
130
  }
131
- function S() {
132
- return /* @__PURE__ */ c("div", {
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__ */ s(b, {
140
+ /* @__PURE__ */ c(x, {
141
141
  height: 12,
142
142
  width: 160
143
143
  }),
144
- /* @__PURE__ */ c("div", {
144
+ /* @__PURE__ */ l("div", {
145
145
  style: {
146
146
  display: "flex",
147
147
  alignItems: "center",
148
148
  gap: 12
149
149
  },
150
- children: [/* @__PURE__ */ s("span", { style: {
151
- ...y,
150
+ children: [/* @__PURE__ */ c("span", { style: {
151
+ ...b,
152
152
  width: 32,
153
153
  height: 32,
154
154
  borderRadius: 8
155
- } }), /* @__PURE__ */ s(b, {
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__ */ c("div", {
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__ */ s("div", {
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__ */ s(b, {
172
+ children: /* @__PURE__ */ c(x, {
173
173
  height: 13,
174
174
  width: 150
175
175
  })
176
- }), /* @__PURE__ */ s("div", {
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__ */ c("div", {
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__ */ s(b, {
188
+ children: [/* @__PURE__ */ c(x, {
189
189
  height: 13,
190
190
  width: 110
191
- }), /* @__PURE__ */ s("div", {
191
+ }), /* @__PURE__ */ c("div", {
192
192
  style: { flex: 1 },
193
- children: /* @__PURE__ */ s(b, { height: 13 })
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 E = 4, D = 2, O = 2, k = [
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
- ], ie = /* @__PURE__ */ new Set(["_select", "_actions"]), ae = /* @__PURE__ */ new Set([
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
- ]), oe = /* @__PURE__ */ new Set(["enum", "bool"]), se = /* @__PURE__ */ new Set([
219
+ ]), ie = /* @__PURE__ */ new Set(["enum", "bool"]), E = /* @__PURE__ */ new Set([
278
220
  "date",
279
221
  "time",
280
222
  "timestamp"
281
- ]), ce = /* @__PURE__ */ new Set([
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 A(e) {
249
+ function D(e) {
308
250
  let { entity: t, screen: n, savedViewColumns: r } = e, i = n?.card;
309
- if (i) return N(t, i, "screen_card");
310
- if (t?.card) return N(t, t.card, "entity_card");
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 de(t, a.columns, a.source);
254
+ return N(t, a.columns, a.source);
313
255
  }
314
- function le(e) {
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 Ce(), p = r === "cards" ? a.renderFields : L(t, i, { explicit: !0 }), m = r === "cards" ? j(t, n) : [];
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 = pe(t, f), g = _e(t, [
260
+ let h = se(t, f), g = de(t, [
319
261
  o,
320
262
  s,
321
263
  c
322
- ], f), _ = ue(t, n, f), v = ve(t, l, f), y = J(t, n, d, 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 = Se(f);
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 ue(e, t, n) {
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 j(e, t, n) {
297
+ function A(e, t, n) {
356
298
  let r = new $();
357
- for (let i of A({
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 A({
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 M(e, t, n) {
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 L(e, r, { explicit: !0 });
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
- ye(r?.items, new Set(i.map(String)), a);
381
- let o = L(e, a.values(), { explicit: !0 });
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 xe(e);
326
+ return he(e);
385
327
  }
386
- function N(e, t, n) {
387
- let r = t.max_body_fields ?? E, i = R(e, t.title_field, { explicit: !0 }), a = R(e, t.subtitle_field, { explicit: !0 }), o = L(e, t.badge_fields ?? [], { explicit: !0 }), s = L(e, t.fields ?? [], { explicit: !0 }), c = L(e, t.meta_fields ?? [], { explicit: !0 });
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 de(e, t, n) {
402
- let r = L(e, t, { explicit: !1 }), i = E, a = R(e, e?.display?.display_field, { explicit: !1 }), o = a ?? z(e, 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) && V(e, t)), u = new Set([o, l].filter((e) => !!e)), d = fe(e, r).filter((e) => !u.has(e)).slice(0, D);
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, O);
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) && B(e, t)).slice(0, i),
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: k
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: I(e)
404
+ columns: oe(e)
463
405
  };
464
406
  }
465
- function I(e) {
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 L(e, t, n) {
417
+ function I(e, t, n) {
476
418
  let r = new $();
477
419
  for (let i of t) {
478
- let t = R(e, i, n);
420
+ let t = L(e, i, n);
479
421
  t && r.add(t);
480
422
  }
481
423
  return r.values();
482
424
  }
483
- function R(e, t, n) {
484
- if (!t || ie.has(t)) return;
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 z(e, t, n) {
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 B(e, t) {
444
+ function z(e, t) {
503
445
  return !(!W(e, t) || G(e, t) || K(e, t));
504
446
  }
505
- function V(e, t) {
506
- return !(!W(e, t) || G(e, t) || K(e, t) || U(e, t) || H(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 H(e, t) {
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" && oe.has(n.field.type);
453
+ return n.kind === "field" && ie.has(n.field.type);
512
454
  }
513
- function fe(e, t) {
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) H(e, r) && n.add(r);
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" && se.has(n.field.type);
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" && ae.has(n.field.type);
475
+ return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" && re.has(n.field.type);
534
476
  }
535
- function pe(t, n) {
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 = R(t, t.display.display_field, { explicit: !0 });
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 me(t.display.display_template)) {
542
- let i = R(t, e, { explicit: !0 });
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 me(e) {
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 = he(e, r + 2);
499
+ let i = le(e, r + 2);
558
500
  if (i < 0) break;
559
- for (let n of ge(e.slice(r + 2, i))) t.add(n);
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 he(e, t) {
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 ge(e) {
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 _e(e, t, n) {
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 = R(e, i.field, { explicit: !0 });
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 ve(e, t, n) {
610
- let r = typeof t == "string" ? w(t) : t ?? [], i = new $();
611
- for (let t of r) {
612
- let r = R(e, t.field, { explicit: !0 });
613
- r && (i.add(r), n.addField(r, "sort"), Z(e, r, n, "sort"));
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 i.values();
557
+ return a.values();
616
558
  }
617
- function J(e, t, n, r) {
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 M(e, t, n)) i.add(r);
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 M(e, a, n)) i.add(t);
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 ye(e, t, n) {
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 = be(e?.name);
636
- i && t.has(i) && Y(e?.items, n);
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 && Y([r], n);
581
+ "fields" in r && J([r], n);
640
582
  }
641
583
  }
642
584
  }
643
- function Y(e, t) {
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 && Y(n.section?.items, t);
598
+ "section" in n && J(n.section?.items, t);
657
599
  }
658
600
  }
659
601
  }
660
- function be(e) {
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 xe(e) {
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 (!(!ce.has(e) && !i) && (t.push(n), t.length >= 8)) break;
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 Se(e) {
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
- }, Ce = class {
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 { ne as a, re as c, S as d, x as f, j as i, ee as l, _ as m, le as n, te as o, g as p, M as r, w as s, A as t, T as u };
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 };