@declarion/react 0.50.0 → 0.52.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 (45) hide show
  1. package/dist-lib/{DraggableChildrenTable-Dar8C-Z9.js → DraggableChildrenTable-CJCjc_cd.js} +1 -1
  2. package/dist-lib/{Grid-BkHtfsty.js → Grid-DUjbQg3r.js} +2 -2
  3. package/dist-lib/{LayoutRenderer-Cic7IAop.js → LayoutRenderer-DbdxC-Bq.js} +9 -8
  4. package/dist-lib/{ListCardsBody-Dko91bLv.js → ListCardsBody-C8ofksQb.js} +4 -4
  5. package/dist-lib/{MarkdownRenderer-CJrVG5HZ.js → MarkdownRenderer-B9_5fwuE.js} +1 -1
  6. package/dist-lib/{RefreshControl-BS8WWL8i.js → RefreshControl-C-8UCyau.js} +2 -2
  7. package/dist-lib/{SmartDetailPage.impl-DxRDo0p2.js → SmartDetailPage.impl-DWjNQ052.js} +8 -8
  8. package/dist-lib/{SmartListPage.impl-CNdq5Vts.js → SmartListPage.impl-yKBK7a8b.js} +651 -646
  9. package/dist-lib/{SmartRecordListPage.impl-3ct7f4rT.js → SmartRecordListPage.impl-DRpU_DOC.js} +9 -9
  10. package/dist-lib/{SortHeaderMenu-NgjkW8QZ.js → SortHeaderMenu-CbihbEGd.js} +1 -1
  11. package/dist-lib/{action-dispatch-hVrm3Hrg.js → action-dispatch-C28UhXXA.js} +14 -13
  12. package/dist-lib/{cardProjection-BR-fXPvJ.js → cardProjection-Bp_ZPLUE.js} +2 -2
  13. package/dist-lib/components/fields/cells/registry.d.ts +1 -0
  14. package/dist-lib/components/fields/index.d.ts +1 -0
  15. package/dist-lib/components/file-widgets/host.d.ts +1 -0
  16. package/dist-lib/components/pages/list/DataCell.d.ts +2 -3
  17. package/dist-lib/components/pages/list/ListCardRow.d.ts +2 -2
  18. package/dist-lib/components/pages/list/ListCardsBody.d.ts +2 -2
  19. package/dist-lib/components/pages/list/ListTable.d.ts +5 -6
  20. package/dist-lib/components/pages/list/ListTableRow.d.ts +2 -3
  21. package/dist-lib/components/pages/list/column-sizing.d.ts +2 -3
  22. package/dist-lib/components/pages/list/columns.d.ts +2 -2
  23. package/dist-lib/components/pages/list/table-features.d.ts +14 -0
  24. package/dist-lib/{field-classification-Bm0mgbwA.js → field-classification-CeYJlsNq.js} +1 -1
  25. package/dist-lib/{format-count-BfRGwx2v.js → format-count-C3N-WxEy.js} +5 -5
  26. package/dist-lib/hooks/useActionData.d.ts +1 -1
  27. package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
  28. package/dist-lib/hooks/useChildrenData.d.ts +1 -1
  29. package/dist-lib/hooks/useEntityData.d.ts +2 -2
  30. package/dist-lib/hooks/useObject.d.ts +1 -1
  31. package/dist-lib/hooks/useParams.d.ts +3 -3
  32. package/dist-lib/hooks/useSchema.d.ts +1 -1
  33. package/dist-lib/index.js +14 -14
  34. package/dist-lib/{peekDraftStore-bb4WroTA.js → peekDraftStore-D3sowXga.js} +1 -1
  35. package/dist-lib/{registry-CgeGoWpW.js → registry-p6CejATt.js} +3 -3
  36. package/dist-lib/testing.js +1 -1
  37. package/dist-lib/types/files.d.ts +3 -0
  38. package/dist-lib/types/ordmap.d.ts +9 -2
  39. package/dist-lib/types/schema.d.ts +2 -1
  40. package/dist-lib/{useCurrentScreen-D3XH5ptA.js → useCurrentScreen-74x5yJNb.js} +21 -14
  41. package/dist-lib/{useListQuery-CfuINl-0.js → useListQuery-D75bgLLz.js} +3 -3
  42. package/dist-lib/{useProperties-DNocaxBX.js → useProperties-C5fZp12D.js} +1 -1
  43. package/dist-lib/{useTabSearchMirror-d0BAUIcQ.js → useTabSearchMirror-D_wzoYRz.js} +2 -2
  44. package/dist-lib/{value-D71J0sJq.js → value-DKekzcjz.js} +1 -1
  45. package/package.json +20 -20
@@ -1,21 +1,28 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { $n as t, A as n, An as r, At as i, Cn as a, Ct as o, Dn as s, En as c, F as l, M as u, N as d, Pn as f, S as p, Sn as m, Tn as h, Zn as g, _, _n as v, bn as y, bt as b, cr as x, dr as S, er as C, fr as w, gt as T, h as E, i as D, jt as ee, lr as te, m as O, mt as k, pt as ne, q as re, rr as ie, rt as A, tt as ae, un as j, ur as oe, v as M, vn as N, w as se, wn as ce, x as P, xt as F, y as le, zn as I } from "./useCurrentScreen-D3XH5ptA.js";
3
- import { a as ue, i as de, m as fe, s as pe, t as me } from "./RefreshControl-BS8WWL8i.js";
4
- import { t as he } from "./Check-DAfMbQIw.js";
5
- import { E as ge, F as _e, L as ve, O as ye, c as be, f as xe, j as Se, l as Ce, m as we, n as Te, p as Ee, w as De } from "./field-classification-Bm0mgbwA.js";
6
- import { a as Oe, c as ke, f as Ae, h as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, t as Re } from "./action-dispatch-hVrm3Hrg.js";
7
- import { a as ze, c as Be, f as Ve, i as He, l as Ue, m as We, n as Ge, o as Ke, p as qe, r as Je, s as Ye, t as Xe, u as L } from "./cardProjection-BR-fXPvJ.js";
8
- import { l as Ze, m as Qe, n as $e, t as et } from "./useTabSearchMirror-d0BAUIcQ.js";
9
- import { a as tt, c as nt, d as rt, f as it, l as at, o as ot, p as st, s as ct, t as R, u as lt } from "./format-count-BfRGwx2v.js";
10
- import { a as ut, c as dt, i as ft, n as z, o as B, s as pt, t as mt } from "./peekDraftStore-bb4WroTA.js";
11
- import { t as ht } from "./useListQuery-CfuINl-0.js";
12
- import { Suspense as gt, createElement as V, lazy as _t, memo as H, useCallback as U, useEffect as W, useMemo as G, useRef as K, useState as q } from "react";
13
- import { useSearchParams as vt } from "react-router";
14
- import { useQueries as yt, useQueryClient as bt } from "@tanstack/react-query";
15
- import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
16
- import { flexRender as xt, getCoreRowModel as St, useReactTable as Ct } from "@tanstack/react-table";
17
- import { useVirtualizer as wt } from "@tanstack/react-virtual";
18
- var Tt = [
2
+ import { $n as t, A as n, An as r, At as i, Cn as a, Ct as o, Dn as s, En as c, F as l, M as u, N as d, Pn as f, S as p, Sn as m, Tn as h, Zn as g, _, _n as v, bn as y, bt as b, cr as x, dr as S, er as C, fr as w, gt as T, h as E, i as D, jt as ee, lr as te, m as O, mt as k, pt as ne, q as re, rr as ie, rt as A, tt as ae, un as j, ur as oe, v as M, vn as se, w as ce, wn as le, x as N, xt as P, y as ue, zn as F } from "./useCurrentScreen-74x5yJNb.js";
3
+ import { a as de, i as fe, m as pe, s as me, t as he } from "./RefreshControl-C-8UCyau.js";
4
+ import { t as ge } from "./Check-DAfMbQIw.js";
5
+ import { E as _e, F as ve, L as ye, O as be, c as xe, f as Se, j as Ce, l as we, m as Te, n as Ee, p as De, w as Oe } from "./field-classification-CeYJlsNq.js";
6
+ import { a as ke, c as Ae, f as je, h as Me, l as Ne, m as Pe, n as Fe, o as Ie, p as Le, r as Re, t as ze } from "./action-dispatch-C28UhXXA.js";
7
+ import { a as Be, c as Ve, f as He, i as Ue, l as We, m as Ge, n as Ke, o as qe, p as Je, r as Ye, s as Xe, t as Ze, u as I } from "./cardProjection-Bp_ZPLUE.js";
8
+ import { l as Qe, m as $e, n as et, t as tt } from "./useTabSearchMirror-D_wzoYRz.js";
9
+ import { a as nt, c as rt, d as it, f as at, l as ot, o as st, p as ct, s as lt, t as ut, u as dt } from "./format-count-C3N-WxEy.js";
10
+ import { a as ft, c as pt, i as mt, n as L, o as R, s as ht, t as gt } from "./peekDraftStore-D3sowXga.js";
11
+ import { t as _t } from "./useListQuery-D75bgLLz.js";
12
+ import { Suspense as vt, createElement as z, lazy as yt, memo as B, useCallback as V, useEffect as H, useMemo as U, useRef as W, useState as G } from "react";
13
+ import { useSearchParams as bt } from "react-router";
14
+ import { useQueries as xt, useQueryClient as St } from "@tanstack/react-query";
15
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
16
+ import { columnResizingFeature as Ct, columnSizingFeature as wt, columnVisibilityFeature as Tt, flexRender as Et, rowSelectionFeature as Dt, rowSortingFeature as Ot, tableFeatures as kt, useTable as At } from "@tanstack/react-table";
17
+ import { useVirtualizer as jt } from "@tanstack/react-virtual";
18
+ //#region src/components/pages/list/table-features.ts
19
+ var Mt = kt({
20
+ rowSortingFeature: Ot,
21
+ rowSelectionFeature: Dt,
22
+ columnSizingFeature: wt,
23
+ columnResizingFeature: Ct,
24
+ columnVisibilityFeature: Tt
25
+ }), Nt = [
19
26
  25,
20
27
  50,
21
28
  100,
@@ -25,7 +32,7 @@ var Tt = [
25
32
  ];
26
33
  //#endregion
27
34
  //#region src/components/pages/list/filter-meta.ts
28
- function Et(e, t, n) {
35
+ function Pt(e, t, n) {
29
36
  if (!e || !t) return [];
30
37
  let r = e.filters ?? t.fields.names(), i = e.filter_operators ?? {}, a = [];
31
38
  for (let o of r) {
@@ -60,7 +67,7 @@ function Et(e, t, n) {
60
67
  }
61
68
  let c = t.fields.get(o);
62
69
  if (!c) continue;
63
- let l = ce(c, o, n), u = c.values?.map((e) => ({
70
+ let l = le(c, o, n), u = c.values?.map((e) => ({
64
71
  value: e.code,
65
72
  label: s(e.name) || e.code,
66
73
  color: e.color
@@ -79,17 +86,17 @@ function Et(e, t, n) {
79
86
  }
80
87
  //#endregion
81
88
  //#region src/components/pages/list/useListSort.ts
82
- function Dt({ searchParams: e, setSearchParams: t, screenSortDefault: n, commitScreenTabSearch: r }) {
83
- let i = e.get("sort") ?? n ?? "", a = G(() => Ye(i), [i]), o = G(() => {
89
+ function Ft({ searchParams: e, setSearchParams: t, screenSortDefault: n, commitScreenTabSearch: r }) {
90
+ let i = e.get("sort") ?? n ?? "", a = U(() => Xe(i), [i]), o = U(() => {
84
91
  let e = /* @__PURE__ */ new Map();
85
92
  for (let t of a) t.nulls && e.set(t.field, t.nulls);
86
93
  return e;
87
- }, [a]), s = G(() => L(i), [i]), c = G(() => a.map((e) => ({
94
+ }, [a]), s = U(() => I(i), [i]), c = U(() => a.map((e) => ({
88
95
  id: e.field,
89
96
  desc: e.dir === "desc"
90
- })), [a]), l = U((n) => {
97
+ })), [a]), l = V((n) => {
91
98
  let i = n.slice(0, 5), a = new URLSearchParams(e);
92
- i.length === 0 ? a.delete("sort") : a.set("sort", Ue(i)), a.set("page", "1"), r(a.toString()), t(a);
99
+ i.length === 0 ? a.delete("sort") : a.set("sort", We(i)), a.set("page", "1"), r(a.toString()), t(a);
93
100
  }, [
94
101
  e,
95
102
  r,
@@ -101,38 +108,38 @@ function Dt({ searchParams: e, setSearchParams: t, screenSortDefault: n, commitS
101
108
  forRequest: s,
102
109
  tableSorting: c,
103
110
  write: l,
104
- applyColumn: U((e, t, n) => l([{
111
+ applyColumn: V((e, t, n) => l([{
105
112
  field: e,
106
113
  dir: t,
107
114
  ...n ? { nulls: n } : {}
108
115
  }]), [l]),
109
- shiftClickColumn: U((e) => l(Ke(a, e)), [a, l]),
110
- appendColumn: U((e, t, n) => l(ze(a, {
116
+ shiftClickColumn: V((e) => l(qe(a, e)), [a, l]),
117
+ appendColumn: V((e, t, n) => l(Be(a, {
111
118
  field: e,
112
119
  dir: t,
113
120
  ...n ? { nulls: n } : {}
114
121
  })), [a, l]),
115
- clearColumn: U((e) => l(Be(a, e)), [a, l]),
116
- clearAll: U(() => l([]), [l])
122
+ clearColumn: V((e) => l(Ve(a, e)), [a, l]),
123
+ clearAll: V(() => l([]), [l])
117
124
  };
118
125
  }
119
126
  //#endregion
120
127
  //#region src/components/pages/list/useListSelection.ts
121
- var Ot = {};
122
- function kt(e, t) {
128
+ var It = {};
129
+ function Lt(e, t) {
123
130
  return r(e, a(e, t));
124
131
  }
125
- function At(e, t, n) {
132
+ function Rt(e, t, n) {
126
133
  if (!e || n.length === 0) return [];
127
134
  let r = new Set(n);
128
- return t.filter((t) => r.has(kt(e, t))).map((t) => a(e, t));
135
+ return t.filter((t) => r.has(Lt(e, t))).map((t) => a(e, t));
129
136
  }
130
- function jt(e, t, n) {
131
- let [r, i] = rt("selection", Ot, { scope: "path" }), a = G(() => e?.fields.names().find((t) => e.fields.get(t)?.primary) ?? "id", [e]), o = U((t) => e ? kt(e, t) : I(t[a]), [e, a]), s = G(() => Object.keys(r).filter((e) => r[e]), [r]), c = G(() => At(e, t, s), [
137
+ function zt(e, t, n) {
138
+ let [r, i] = it("selection", It, { scope: "path" }), a = U(() => e?.fields.names().find((t) => e.fields.get(t)?.primary) ?? "id", [e]), o = V((t) => e ? Lt(e, t) : F(t[a]), [e, a]), s = U(() => Object.keys(r).filter((e) => r[e]), [r]), c = U(() => Rt(e, t, s), [
132
139
  e,
133
140
  t,
134
141
  s
135
- ]), l = G(() => {
142
+ ]), l = U(() => {
136
143
  if (s.length === 0) return [];
137
144
  let e = /* @__PURE__ */ new Map();
138
145
  for (let n of t) e.set(o(n), n);
@@ -142,7 +149,7 @@ function jt(e, t, n) {
142
149
  t,
143
150
  o
144
151
  ]);
145
- return W(() => {
152
+ return H(() => {
146
153
  n || i((e) => {
147
154
  let n = Object.keys(e);
148
155
  if (n.length === 0) return e;
@@ -166,23 +173,23 @@ function jt(e, t, n) {
166
173
  }
167
174
  //#endregion
168
175
  //#region src/components/pages/list/useListColumnLayout.ts
169
- function Mt({ screenCode: e, screen: t, searchParams: n, setSearchParams: r }) {
170
- let i = G(() => {
176
+ function Bt({ screenCode: e, screen: t, searchParams: n, setSearchParams: r }) {
177
+ let i = U(() => {
171
178
  let e = n.get("columns");
172
179
  return e ? e.split(",").filter(Boolean) : t?.default_columns ?? t?.columns ?? [];
173
180
  }, [
174
181
  n,
175
182
  t?.default_columns,
176
183
  t?.columns
177
- ]), { widths: a, prune: o, setWidths: s, resetWidths: c, resizeEduShown: l, markResizeEduShown: u } = ge(e), [d, f] = q(() => a);
178
- W(() => {
184
+ ]), { widths: a, prune: o, setWidths: s, resetWidths: c, resizeEduShown: l, markResizeEduShown: u } = _e(e), [d, f] = G(() => a);
185
+ H(() => {
179
186
  f(a);
180
187
  }, [a]);
181
- let p = G(() => t?.columns ?? [], [t?.columns]);
182
- W(() => {
188
+ let p = U(() => t?.columns ?? [], [t?.columns]);
189
+ H(() => {
183
190
  p.length > 0 && o(p);
184
191
  }, [p, o]);
185
- let m = U((e) => {
192
+ let m = V((e) => {
186
193
  if (e.length === 0) return;
187
194
  let t = new URLSearchParams(n);
188
195
  t.set("columns", e.join(",")), r(t);
@@ -192,11 +199,11 @@ function Mt({ screenCode: e, screen: t, searchParams: n, setSearchParams: r }) {
192
199
  sizing: d,
193
200
  setSizing: f,
194
201
  apply: m,
195
- clear: U(() => {
202
+ clear: V(() => {
196
203
  let e = new URLSearchParams(n);
197
204
  e.delete("columns"), r(e);
198
205
  }, [n, r]),
199
- move: U((e, t) => {
206
+ move: V((e, t) => {
200
207
  let n = i.indexOf(e);
201
208
  if (n === -1) return;
202
209
  let r = t === "up" ? n - 1 : n + 1;
@@ -204,7 +211,7 @@ function Mt({ screenCode: e, screen: t, searchParams: n, setSearchParams: r }) {
204
211
  let a = [...i];
205
212
  [a[n], a[r]] = [a[r], a[n]], m(a);
206
213
  }, [i, m]),
207
- commitResize: U((e) => {
214
+ commitResize: V((e) => {
208
215
  s(e), !l && (u(), A.info("Column width saved on this device", "Widths are personal and never shared. Column order, sort and filters can be saved into a view."));
209
216
  }, [
210
217
  s,
@@ -214,7 +221,7 @@ function Mt({ screenCode: e, screen: t, searchParams: n, setSearchParams: r }) {
214
221
  resetWidths: c
215
222
  };
216
223
  }
217
- function Nt(e, t, n = 10) {
224
+ function Vt(e, t, n = 10) {
218
225
  switch (t.type) {
219
226
  case "down": return {
220
227
  origin: {
@@ -246,27 +253,27 @@ function Nt(e, t, n = 10) {
246
253
  };
247
254
  }
248
255
  }
249
- function Pt(e) {
256
+ function Ht(e) {
250
257
  return e instanceof Element && e.closest("a, button, input, select, [role='button'], [role='menuitem']") !== null;
251
258
  }
252
- function Ft(e, t) {
259
+ function Ut(e, t) {
253
260
  return e != null && e.rowId === t ? "double" : "single";
254
261
  }
255
262
  //#endregion
256
263
  //#region src/hooks/useLongPress.ts
257
- function It(e) {
258
- let t = K(null), n = K(null), r = K(!1), i = U(() => {
264
+ function Wt(e) {
265
+ let t = W(null), n = W(null), r = W(!1), i = V(() => {
259
266
  n.current !== null && clearTimeout(n.current), n.current = null;
260
267
  }, []);
261
- W(() => i, [i]);
262
- let a = U((e) => {
263
- let n = Nt(t.current, e);
268
+ H(() => i, [i]);
269
+ let a = V((e) => {
270
+ let n = Vt(t.current, e);
264
271
  return t.current = n.origin, n.outcome !== "pending" && i(), n;
265
272
  }, [i]);
266
273
  return {
267
274
  handlers: {
268
275
  onPointerDown: (o) => {
269
- if (o.pointerType === "mouse" || Pt(o.target)) return;
276
+ if (o.pointerType === "mouse" || Ht(o.target)) return;
270
277
  r.current = !1, i();
271
278
  let s = {
272
279
  x: o.clientX,
@@ -276,7 +283,7 @@ function It(e) {
276
283
  type: "down",
277
284
  ...s
278
285
  }), n.current = setTimeout(() => {
279
- let i = Nt(t.current, { type: "held" });
286
+ let i = Vt(t.current, { type: "held" });
280
287
  t.current = i.origin, n.current = null, i.outcome === "fire" && (r.current = !0, e(s));
281
288
  }, 500);
282
289
  },
@@ -291,7 +298,7 @@ function It(e) {
291
298
  onPointerCancel: () => void a({ type: "release" }),
292
299
  onPointerLeave: () => void a({ type: "release" })
293
300
  },
294
- consumePressFired: U(() => {
301
+ consumePressFired: V(() => {
295
302
  let e = r.current;
296
303
  return r.current = !1, e;
297
304
  }, [])
@@ -299,17 +306,17 @@ function It(e) {
299
306
  }
300
307
  //#endregion
301
308
  //#region src/components/pages/list/useListRowInteraction.ts
302
- function Lt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, tabNavigate: c, commitScreenTabSearch: l, isPhone: u, canUpdate: d }) {
303
- let [f, p] = q(null), [m, g] = q(null), _ = K(null), v = K(null);
304
- W(() => () => {
309
+ function Gt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, tabNavigate: c, commitScreenTabSearch: l, isPhone: u, canUpdate: d }) {
310
+ let [f, p] = G(null), [m, g] = G(null), _ = W(null), v = W(null);
311
+ H(() => () => {
305
312
  v.current && clearTimeout(v.current.timer);
306
313
  }, []);
307
- let y = t?.on_row_click === "peek" && t.quick_peek?.enabled !== !1 && !u, x = U((i, u) => {
314
+ let y = t?.on_row_click === "peek" && t.quick_peek?.enabled !== !1 && !u, x = V((i, u) => {
308
315
  if (!e || !t) return;
309
- let d = a(e, i), f = r(e, d), p = N(t, e, n, d);
316
+ let d = a(e, i), f = r(e, d), p = se(t, e, n, d);
310
317
  if (!p) return;
311
318
  if (u?.draft) {
312
- z(f, u.draft);
319
+ L(f, u.draft);
313
320
  let [e, t] = p.split("?", 2), n = new URLSearchParams(t ?? "");
314
321
  n.set("edit", "true"), p = `${e}?${n.toString()}`;
315
322
  }
@@ -325,21 +332,21 @@ function Lt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, ta
325
332
  o,
326
333
  c,
327
334
  l
328
- ]), S = It(U((e) => {
335
+ ]), S = Wt(V((e) => {
329
336
  let t = _.current;
330
337
  t && g({
331
338
  x: e.x,
332
339
  y: e.y,
333
340
  row: t
334
341
  });
335
- }, [])), C = U((t, n) => {
336
- if (S.consumePressFired() || Pt(t.target)) return;
342
+ }, [])), C = V((t, n) => {
343
+ if (S.consumePressFired() || Ht(t.target)) return;
337
344
  if (!y || !e) {
338
345
  x(n);
339
346
  return;
340
347
  }
341
- let r = kt(e, n);
342
- if (Ft(v.current, r) === "double") {
348
+ let r = Lt(e, n);
349
+ if (Ut(v.current, r) === "double") {
343
350
  clearTimeout(v.current.timer), v.current = null, p(null), x(n);
344
351
  return;
345
352
  }
@@ -361,20 +368,20 @@ function Lt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, ta
361
368
  peekAllowed: y,
362
369
  peekRow: f,
363
370
  setPeekRow: p,
364
- peekFields: G(() => {
371
+ peekFields: U(() => {
365
372
  if (!y || !e || !f) return [];
366
- let r = Le(e, t, f);
367
- return Je(e, r, n).map((t) => {
373
+ let r = Re(e, t, f);
374
+ return Ye(e, r, n).map((t) => {
368
375
  if (e.files?.get(t)) return {
369
376
  key: t,
370
- label: Ne(e, t, i),
377
+ label: Pe(e, t, i),
371
378
  kind: "file",
372
379
  readOnly: !d
373
380
  };
374
381
  let n = e.fields.get(t), r = d && !n.primary && !n.auto && !n.ref && n.files?.mode !== "rich_text_inline";
375
382
  return {
376
383
  key: t,
377
- label: ce(n, t, i),
384
+ label: le(n, t, i),
378
385
  kind: "field",
379
386
  field: n,
380
387
  readOnly: !r
@@ -389,9 +396,9 @@ function Lt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, ta
389
396
  n,
390
397
  d
391
398
  ]),
392
- peekActions: G(() => e?.actions ?? {}, [e?.actions]),
393
- peekExecute: U(async (t, n, r) => {
394
- let i = e?.fields.names().find((t) => e.fields.get(t)?.primary), a = i && f ? [I(f[i])] : void 0, o = n.entity ? `${n.entity}.${t}` : t;
399
+ peekActions: U(() => e?.actions ?? {}, [e?.actions]),
400
+ peekExecute: V(async (t, n, r) => {
401
+ let i = e?.fields.names().find((t) => e.fields.get(t)?.primary), a = i && f ? [F(f[i])] : void 0, o = n.entity ? `${n.entity}.${t}` : t;
395
402
  return b(o, T(r, a));
396
403
  }, [e, f]),
397
404
  contextMenu: m,
@@ -404,23 +411,23 @@ function Lt({ entity: e, screen: t, screens: n, entities: i, searchParams: o, ta
404
411
  }
405
412
  //#endregion
406
413
  //#region src/components/pages/list/column-sizing.ts
407
- function Rt(e) {
414
+ function Kt(e) {
408
415
  return `--header-${e}-size`;
409
416
  }
410
- function zt(e) {
417
+ function qt(e) {
411
418
  return `--col-${e}-size`;
412
419
  }
413
- function Z(e) {
420
+ function Jt(e) {
414
421
  return `calc(var(${e}) * 1px)`;
415
422
  }
416
- function Bt(e) {
423
+ function Yt(e) {
417
424
  let t = e.getFlatHeaders(), n = {};
418
- for (let e of t) n[Rt(e.id)] = e.getSize(), n[zt(e.column.id)] = e.column.getSize();
425
+ for (let e of t) n[Kt(e.id)] = e.getSize(), n[qt(e.column.id)] = e.column.getSize();
419
426
  return n;
420
427
  }
421
428
  //#endregion
422
429
  //#region src/components/pages/list/sortable-header.ts
423
- var Vt = /* @__PURE__ */ new Set([
430
+ var Xt = /* @__PURE__ */ new Set([
424
431
  "secret",
425
432
  "password",
426
433
  "json",
@@ -428,29 +435,29 @@ var Vt = /* @__PURE__ */ new Set([
428
435
  "int_array",
429
436
  "uuid_array"
430
437
  ]);
431
- function Ht(e, t) {
438
+ function Zt(e, t) {
432
439
  if (e === "_actions" || e === "_select" || e.startsWith("$property.") || e.startsWith("$refs.")) return !1;
433
440
  if (e.startsWith("$status.")) return !0;
434
441
  let n = t?.fields.get(e);
435
- return !n || t?.list_pagination === "cursor" && n.cross_store_sortable === !1 ? !1 : !Vt.has(n.type);
442
+ return !n || t?.list_pagination === "cursor" && n.cross_store_sortable === !1 ? !1 : !Xt.has(n.type);
436
443
  }
437
444
  //#endregion
438
445
  //#region src/components/pages/list/ListTable.tsx
439
- var Ut = _t(() => import("./SortHeaderMenu-NgjkW8QZ.js").then((e) => ({ default: e.SortHeaderMenu }))), Wt = H(function({ virtualItems: e, topPad: t, bottomPad: n, colSpan: r, rows: i, renderRow: a }) {
440
- return /* @__PURE__ */ X("tbody", { children: [
441
- e.length > 0 && /* @__PURE__ */ Y("tr", { children: /* @__PURE__ */ Y("td", {
446
+ var Qt = yt(() => import("./SortHeaderMenu-CbihbEGd.js").then((e) => ({ default: e.SortHeaderMenu }))), $t = B(function({ virtualItems: e, topPad: t, bottomPad: n, colSpan: r, rows: i, renderRow: a }) {
447
+ return /* @__PURE__ */ J("tbody", { children: [
448
+ e.length > 0 && /* @__PURE__ */ q("tr", { children: /* @__PURE__ */ q("td", {
442
449
  style: { height: t },
443
450
  colSpan: r
444
451
  }) }),
445
452
  e.map((e) => a(i[e.index], e.index)),
446
- e.length > 0 && /* @__PURE__ */ Y("tr", { children: /* @__PURE__ */ Y("td", {
453
+ e.length > 0 && /* @__PURE__ */ q("tr", { children: /* @__PURE__ */ q("td", {
447
454
  style: { height: n },
448
455
  colSpan: r
449
456
  }) })
450
457
  ] });
451
458
  }, (e, t) => t.isResizing);
452
- function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, totalColumnsWidth: o, theadRef: s, virtualizer: c, visibleCols: l, headerReorder: u, sortCols: d, sortNullsMap: f, shiftClickColumn: p, applyColumnSort: m, appendColumnSort: h, clearColumnSort: g, clearAllSorts: _, renderRow: v, isResizingColumn: y }) {
453
- return /* @__PURE__ */ X("table", {
459
+ function en({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, totalColumnsWidth: o, theadRef: s, virtualizer: c, visibleCols: l, headerReorder: u, sortCols: d, sortNullsMap: f, shiftClickColumn: p, applyColumnSort: m, appendColumnSort: h, clearColumnSort: g, clearAllSorts: _, renderRow: v, isResizingColumn: y }) {
460
+ return /* @__PURE__ */ J("table", {
454
461
  "data-virtual-rows": "true",
455
462
  style: {
456
463
  ...a,
@@ -462,22 +469,22 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
462
469
  fontSize: 12.5,
463
470
  color: "var(--text)"
464
471
  },
465
- children: [/* @__PURE__ */ Y("thead", {
472
+ children: [/* @__PURE__ */ q("thead", {
466
473
  ref: s,
467
- children: t.getHeaderGroups().map((t) => /* @__PURE__ */ X("tr", {
474
+ children: t.getHeaderGroups().map((t) => /* @__PURE__ */ J("tr", {
468
475
  style: {
469
476
  height: 32,
470
477
  background: "var(--surface-2)"
471
478
  },
472
479
  children: [t.headers.map((t) => {
473
- let n = Ht(t.id, i), r = t.column.getIsSorted(), a = t.id === "_select", o = t.id === "_actions", s = r ? d.findIndex((e) => e.field === t.id) + 1 : 0, c = d.length > 1 && s > 0, v = s > 0, y = d.length < 5, b = n ? t.column.getToggleSortingHandler() : void 0, x = n ? (e) => {
480
+ let n = Zt(t.id, i), r = t.column.getIsSorted(), a = t.id === "_select", o = t.id === "_actions", s = r ? d.findIndex((e) => e.field === t.id) + 1 : 0, c = d.length > 1 && s > 0, v = s > 0, y = d.length < 5, b = n ? t.column.getToggleSortingHandler() : void 0, x = n ? (e) => {
474
481
  if (e.shiftKey) {
475
482
  e.preventDefault(), p(t.id);
476
483
  return;
477
484
  }
478
485
  b?.(e);
479
486
  } : void 0, S = !a && !o, C = S ? l.indexOf(t.id) : -1, w = u.dragColId === t.id, T = u.isDragging && C !== -1 && u.dropIndex === C, E = u.isDragging && C !== -1 && C === l.length - 1 && u.dropIndex === l.length;
480
- return /* @__PURE__ */ X("th", {
487
+ return /* @__PURE__ */ J("th", {
481
488
  "data-col-id": S ? t.id : void 0,
482
489
  onMouseDown: S ? (e) => u.onHeaderMouseDown(t.id, e) : void 0,
483
490
  onClick: (e) => {
@@ -494,8 +501,8 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
494
501
  cursor: n ? "pointer" : "default",
495
502
  opacity: w ? .4 : 1,
496
503
  boxShadow: T ? "inset 2px 0 0 0 var(--accent)" : E ? "inset -2px 0 0 0 var(--accent)" : void 0,
497
- width: Z(Rt(t.id)),
498
- minWidth: Z(Rt(t.id)),
504
+ width: Jt(Kt(t.id)),
505
+ minWidth: Jt(Kt(t.id)),
499
506
  borderBottom: "1px solid var(--border)",
500
507
  background: "var(--surface-2)",
501
508
  position: "sticky",
@@ -503,7 +510,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
503
510
  left: a ? 0 : "auto",
504
511
  zIndex: a ? 3 : 2
505
512
  },
506
- children: [t.isPlaceholder ? null : n ? /* @__PURE__ */ X("span", {
513
+ children: [t.isPlaceholder ? null : n ? /* @__PURE__ */ J("span", {
507
514
  style: {
508
515
  display: "inline-flex",
509
516
  alignItems: "center",
@@ -513,18 +520,18 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
513
520
  letterSpacing: "0.04em"
514
521
  },
515
522
  children: [
516
- xt(t.column.columnDef.header, t.getContext()),
517
- /* @__PURE__ */ X("span", {
523
+ Et(t.column.columnDef.header, t.getContext()),
524
+ /* @__PURE__ */ J("span", {
518
525
  style: {
519
526
  display: "inline-flex",
520
527
  flexDirection: "column",
521
528
  alignItems: "center",
522
529
  lineHeight: 0
523
530
  },
524
- children: [r === "asc" ? /* @__PURE__ */ Y(e.arrowUp, { size: 11 }) : r === "desc" ? /* @__PURE__ */ Y(e.arrowDown, { size: 11 }) : /* @__PURE__ */ Y(e.sort, {
531
+ children: [r === "asc" ? /* @__PURE__ */ q(e.arrowUp, { size: 11 }) : r === "desc" ? /* @__PURE__ */ q(e.arrowDown, { size: 11 }) : /* @__PURE__ */ q(e.sort, {
525
532
  size: 11,
526
533
  style: { opacity: .35 }
527
- }), r && f.get(t.id) === "first" ? /* @__PURE__ */ Y("span", {
534
+ }), r && f.get(t.id) === "first" ? /* @__PURE__ */ q("span", {
528
535
  "aria-hidden": "true",
529
536
  style: {
530
537
  width: 4,
@@ -535,7 +542,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
535
542
  }
536
543
  }) : null]
537
544
  }),
538
- c ? /* @__PURE__ */ Y("span", {
545
+ c ? /* @__PURE__ */ q("span", {
539
546
  "aria-label": `Sort rank ${s}`,
540
547
  style: {
541
548
  fontSize: 10,
@@ -546,9 +553,9 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
546
553
  },
547
554
  children: s
548
555
  }) : null,
549
- /* @__PURE__ */ Y(gt, {
556
+ /* @__PURE__ */ q(vt, {
550
557
  fallback: null,
551
- children: /* @__PURE__ */ Y(Ut, {
558
+ children: /* @__PURE__ */ q(Qt, {
552
559
  field: t.id,
553
560
  activeDir: r,
554
561
  activeNulls: f.get(t.id),
@@ -561,7 +568,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
561
568
  })
562
569
  })
563
570
  ]
564
- }) : xt(t.column.columnDef.header, t.getContext()), t.column.getCanResize() && /* @__PURE__ */ Y("div", {
571
+ }) : Et(t.column.columnDef.header, t.getContext()), t.column.getCanResize() && /* @__PURE__ */ q("div", {
565
572
  "data-testid": "col-resize-handle",
566
573
  "aria-hidden": "true",
567
574
  onMouseDown: (e) => {
@@ -584,7 +591,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
584
591
  userSelect: "none",
585
592
  zIndex: 3
586
593
  },
587
- children: /* @__PURE__ */ Y("span", { style: {
594
+ children: /* @__PURE__ */ q("span", { style: {
588
595
  width: 2,
589
596
  height: "60%",
590
597
  alignSelf: "center",
@@ -593,7 +600,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
593
600
  } })
594
601
  })]
595
602
  }, t.id);
596
- }), /* @__PURE__ */ Y("th", {
603
+ }), /* @__PURE__ */ q("th", {
597
604
  "aria-hidden": "true",
598
605
  style: {
599
606
  borderBottom: "1px solid var(--border)",
@@ -604,7 +611,7 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
604
611
  }
605
612
  })]
606
613
  }, t.id))
607
- }), /* @__PURE__ */ Y(Wt, {
614
+ }), /* @__PURE__ */ q($t, {
608
615
  virtualItems: c.getVirtualItems(),
609
616
  topPad: c.getVirtualItems()[0]?.start ?? 0,
610
617
  bottomPad: c.getTotalSize() - (c.getVirtualItems().at(-1)?.end ?? 0),
@@ -617,19 +624,19 @@ function Gt({ table: t, columns: n, rows: r, entity: i, columnSizeVars: a, total
617
624
  }
618
625
  //#endregion
619
626
  //#region src/components/pages/list/DataCell.tsx
620
- function Kt({ cell: e }) {
627
+ function tn({ cell: e }) {
621
628
  let t = e.column.id === "_select", n = e.column.id === "_actions", r = e.column.columnDef.cell, i = typeof r == "function" ? r(e.getContext()) : r;
622
- return /* @__PURE__ */ Y("td", {
629
+ return /* @__PURE__ */ q("td", {
623
630
  title: typeof i == "string" ? i : void 0,
624
631
  style: {
625
632
  padding: t ? "0 6px 0 12px" : n ? "0 6px" : "0 10px",
626
633
  verticalAlign: "middle",
627
634
  borderBottom: "1px solid var(--divider)",
628
- width: Z(zt(e.column.id)),
635
+ width: Jt(qt(e.column.id)),
629
636
  whiteSpace: "nowrap",
630
637
  overflow: "hidden",
631
638
  textOverflow: "ellipsis",
632
- maxWidth: Z(zt(e.column.id)),
639
+ maxWidth: Jt(qt(e.column.id)),
633
640
  color: "var(--text)",
634
641
  position: t ? "sticky" : "static",
635
642
  left: t ? 0 : "auto",
@@ -641,9 +648,9 @@ function Kt({ cell: e }) {
641
648
  }
642
649
  //#endregion
643
650
  //#region src/components/pages/list/ListTableRow.tsx
644
- function qt({ row: e, rowIndex: t, entity: n, hasSoftDelete: r, zebra: i, hasDetailTarget: a, interaction: o, measureElement: s }) {
651
+ function nn({ row: e, rowIndex: t, entity: n, hasSoftDelete: r, zebra: i, hasDetailTarget: a, interaction: o, measureElement: s }) {
645
652
  let c = e.original, l = r && c[n.soft_delete] != null, u = e.getIsSelected(), d = i && t % 2 == 1;
646
- return /* @__PURE__ */ X("tr", {
653
+ return /* @__PURE__ */ J("tr", {
647
654
  "data-index": t,
648
655
  "data-row-stripe": d ? "" : void 0,
649
656
  "aria-selected": u,
@@ -667,7 +674,7 @@ function qt({ row: e, rowIndex: t, entity: n, hasSoftDelete: r, zebra: i, hasDet
667
674
  onPointerDown: (e) => {
668
675
  o.pressedRow.current = c, o.longPress.handlers.onPointerDown(e);
669
676
  },
670
- children: [e.getVisibleCells().map((e) => /* @__PURE__ */ Y(Kt, { cell: e }, e.id)), /* @__PURE__ */ Y("td", {
677
+ children: [e.getVisibleCells().map((e) => /* @__PURE__ */ q(tn, { cell: e }, e.id)), /* @__PURE__ */ q("td", {
671
678
  "aria-hidden": "true",
672
679
  style: { borderBottom: "1px solid var(--divider)" }
673
680
  })]
@@ -675,51 +682,51 @@ function qt({ row: e, rowIndex: t, entity: n, hasSoftDelete: r, zebra: i, hasDet
675
682
  }
676
683
  //#endregion
677
684
  //#region src/components/pages/list/ListNoRows.tsx
678
- function Jt(e) {
685
+ function rn(e) {
679
686
  if (e instanceof j) {
680
687
  let t = e.ext("field"), n = e.ext("value");
681
688
  return t && n !== void 0 ? `${e.message} ${t}: "${n}"` : t ? `${e.message} ${t}` : e.message;
682
689
  }
683
690
  return e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
684
691
  }
685
- function Yt({ isLoading: e, tableLoadingStale: t, isError: n, error: r, rowCount: i, entity: a, screen: o, screenName: c, screenIcon: l, isFiltered: u, canCreate: d, toolbarActions: f, onRetry: p }) {
692
+ function an({ isLoading: e, tableLoadingStale: t, isError: n, error: r, rowCount: i, entity: a, screen: o, screenName: c, screenIcon: l, isFiltered: u, canCreate: d, toolbarActions: f, onRetry: p }) {
686
693
  let m = a.display;
687
- return e && t ? /* @__PURE__ */ Y("div", {
694
+ return e && t ? /* @__PURE__ */ q("div", {
688
695
  style: { padding: "0 20px" },
689
- children: /* @__PURE__ */ Y(lt, {
696
+ children: /* @__PURE__ */ q(dt, {
690
697
  icon: "alert-circle",
691
698
  title: "Still loading data",
692
699
  description: "This table is taking longer than expected. Retry the request or check network and server health.",
693
- action: /* @__PURE__ */ Y(w, {
700
+ action: /* @__PURE__ */ q(w, {
694
701
  kind: "primary",
695
702
  size: "sm",
696
703
  onClick: p,
697
704
  children: "Retry"
698
705
  })
699
706
  })
700
- }) : e ? /* @__PURE__ */ Y(Ve, { cols: o.columns?.length ?? 4 }) : n ? /* @__PURE__ */ Y("div", {
707
+ }) : e ? /* @__PURE__ */ q(He, { cols: o.columns?.length ?? 4 }) : n ? /* @__PURE__ */ q("div", {
701
708
  style: { padding: "0 20px" },
702
- children: /* @__PURE__ */ Y(lt, {
709
+ children: /* @__PURE__ */ q(dt, {
703
710
  icon: "alert-circle",
704
711
  title: "Failed to load data",
705
- description: Jt(r),
706
- action: /* @__PURE__ */ Y(w, {
712
+ description: rn(r),
713
+ action: /* @__PURE__ */ q(w, {
707
714
  kind: "primary",
708
715
  size: "sm",
709
716
  onClick: p,
710
717
  children: "Retry"
711
718
  })
712
719
  })
713
- }) : i === 0 ? /* @__PURE__ */ Y("div", {
720
+ }) : i === 0 ? /* @__PURE__ */ q("div", {
714
721
  style: { padding: "0 20px" },
715
722
  children: (() => {
716
723
  let e = m.empty_state, t = s(e?.title), n = s(e?.body), r = ae(e?.learn_more_url), i = u ? "No results found" : t || `No ${s(m.name_plural).toLowerCase() || c.toLowerCase()} yet`, a = d && f.some(({ code: e }) => e === "__new" || e === "__create"), o;
717
- return o = u ? "Try adjusting your search or filters" : n ? /* @__PURE__ */ X(J, { children: [n, r && /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("a", {
724
+ return o = u ? "Try adjusting your search or filters" : n ? /* @__PURE__ */ J(K, { children: [n, r && /* @__PURE__ */ J(K, { children: [" ", /* @__PURE__ */ q("a", {
718
725
  href: r,
719
726
  target: "_blank",
720
727
  rel: "noopener noreferrer",
721
728
  children: "Learn more"
722
- })] })] }) : a ? `Create your first ${s(m.name).toLowerCase()} to get started` : void 0, /* @__PURE__ */ Y(lt, {
729
+ })] })] }) : a ? `Create your first ${s(m.name).toLowerCase()} to get started` : void 0, /* @__PURE__ */ q(dt, {
723
730
  icon: l,
724
731
  title: i,
725
732
  description: o
@@ -729,15 +736,15 @@ function Yt({ isLoading: e, tableLoadingStale: t, isError: n, error: r, rowCount
729
736
  }
730
737
  //#endregion
731
738
  //#region src/components/pages/list/ListFooter.tsx
732
- function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o, countTotal: s, countStrategy: c, countLoading: l, countError: u, page: d, totalPages: f, goToPage: p, perPage: m, setPerPage: h, hasMorePages: g, fetchNextPage: _, isFetchingNextPage: v }) {
733
- let y = pe("list");
734
- return !n && !r ? null : /* @__PURE__ */ X("div", {
739
+ function on({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o, countTotal: s, countStrategy: c, countLoading: l, countError: u, page: d, totalPages: f, goToPage: p, perPage: m, setPerPage: h, hasMorePages: g, fetchNextPage: _, isFetchingNextPage: v }) {
740
+ let y = me("list");
741
+ return !n && !r ? null : /* @__PURE__ */ J("div", {
735
742
  style: {
736
743
  display: "flex",
737
744
  alignItems: "center",
738
745
  paddingTop: 8,
739
746
  paddingBottom: 8,
740
- ...i ? ye(12) : {
747
+ ...i ? be(12) : {
741
748
  paddingLeft: 14,
742
749
  paddingRight: 14
743
750
  },
@@ -749,7 +756,7 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
749
756
  flexWrap: "wrap"
750
757
  },
751
758
  children: [
752
- y.isVisible("show_count") && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
759
+ y.isVisible("show_count") && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("span", {
753
760
  className: "num",
754
761
  "data-testid": "list-footer-count",
755
762
  style: {
@@ -757,26 +764,26 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
757
764
  alignItems: "center",
758
765
  gap: 5
759
766
  },
760
- children: s === void 0 ? l && !u ? /* @__PURE__ */ Y("span", {
767
+ children: s === void 0 ? l && !u ? /* @__PURE__ */ q("span", {
761
768
  "data-testid": "list-footer-count-pending",
762
769
  style: { display: "inline-flex" },
763
- children: /* @__PURE__ */ Y(t, { size: 11 })
764
- }) : /* @__PURE__ */ X(J, { children: [
770
+ children: /* @__PURE__ */ q(t, { size: 11 })
771
+ }) : /* @__PURE__ */ J(K, { children: [
765
772
  a,
766
773
  " ",
767
774
  a === 1 ? "record" : "records"
768
- ] }) : /* @__PURE__ */ X(J, { children: [
775
+ ] }) : /* @__PURE__ */ J(K, { children: [
769
776
  a,
770
777
  " of ",
771
- R(s, c ?? "exact"),
778
+ ut(s, c ?? "exact"),
772
779
  " ",
773
780
  s === 1 ? "record" : "records"
774
781
  ] })
775
- }), /* @__PURE__ */ Y("span", { children: "·" })] }),
776
- /* @__PURE__ */ X("span", { children: [
782
+ }), /* @__PURE__ */ q("span", { children: "·" })] }),
783
+ /* @__PURE__ */ J("span", { children: [
777
784
  "Selected:",
778
785
  " ",
779
- /* @__PURE__ */ Y("span", {
786
+ /* @__PURE__ */ q("span", {
780
787
  className: "num",
781
788
  style: {
782
789
  color: "var(--text-2)",
@@ -785,9 +792,9 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
785
792
  children: o
786
793
  })
787
794
  ] }),
788
- /* @__PURE__ */ Y("div", { style: { flex: i ? "1 1 100%" : 1 } }),
789
- !i && /* @__PURE__ */ Y("span", { children: "Rows per page" }),
790
- /* @__PURE__ */ Y("select", {
795
+ /* @__PURE__ */ q("div", { style: { flex: i ? "1 1 100%" : 1 } }),
796
+ !i && /* @__PURE__ */ q("span", { children: "Rows per page" }),
797
+ /* @__PURE__ */ q("select", {
791
798
  "aria-label": "Rows per page",
792
799
  value: m,
793
800
  onChange: (e) => h(parseInt(e.target.value, 10)),
@@ -800,12 +807,12 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
800
807
  color: "var(--text-2)",
801
808
  cursor: "pointer"
802
809
  },
803
- children: Tt.map((e) => /* @__PURE__ */ Y("option", {
810
+ children: Nt.map((e) => /* @__PURE__ */ q("option", {
804
811
  value: e,
805
812
  children: e
806
813
  }, e))
807
814
  }),
808
- r ? g && /* @__PURE__ */ X("button", {
815
+ r ? g && /* @__PURE__ */ J("button", {
809
816
  type: "button",
810
817
  className: "num",
811
818
  "data-testid": "list-footer-load-more",
@@ -822,21 +829,21 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
822
829
  color: "var(--text-2)",
823
830
  cursor: v ? "default" : "pointer"
824
831
  },
825
- children: [v ? /* @__PURE__ */ Y(t, { size: 11 }) : null, "Load more"]
826
- }) : (g || d > 1) && /* @__PURE__ */ X("div", {
832
+ children: [v ? /* @__PURE__ */ q(t, { size: 11 }) : null, "Load more"]
833
+ }) : (g || d > 1) && /* @__PURE__ */ J("div", {
827
834
  style: {
828
835
  display: "flex",
829
836
  alignItems: "center",
830
837
  gap: 4
831
838
  },
832
839
  children: [
833
- /* @__PURE__ */ Y(S, {
840
+ /* @__PURE__ */ q(S, {
834
841
  size: 22,
835
- icon: /* @__PURE__ */ Y(e.left, { size: 12 }),
842
+ icon: /* @__PURE__ */ q(e.left, { size: 12 }),
836
843
  onClick: () => p(d - 1),
837
844
  disabled: d <= 1
838
845
  }),
839
- /* @__PURE__ */ X("span", {
846
+ /* @__PURE__ */ J("span", {
840
847
  className: "num",
841
848
  style: { padding: "0 6px" },
842
849
  children: [
@@ -845,9 +852,9 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
845
852
  f === void 0 ? "" : ` of ${f}`
846
853
  ]
847
854
  }),
848
- /* @__PURE__ */ Y(S, {
855
+ /* @__PURE__ */ q(S, {
849
856
  size: 22,
850
- icon: /* @__PURE__ */ Y(e.right, { size: 12 }),
857
+ icon: /* @__PURE__ */ q(e.right, { size: 12 }),
851
858
  onClick: () => p(d + 1),
852
859
  disabled: f === void 0 ? !g : d >= f
853
860
  })
@@ -858,25 +865,25 @@ function Xt({ meta: n, isCursor: r, isPhone: i, rowsLoaded: a, selectedCount: o,
858
865
  }
859
866
  //#endregion
860
867
  //#region src/components/pages/ExportMenu.tsx
861
- function Zt(e) {
868
+ function sn(e) {
862
869
  return !(e && e.enabled === !1);
863
870
  }
864
- function Qt(e) {
871
+ function cn(e) {
865
872
  return e == null ? "all matching rows" : `${e.toLocaleString()} ${e === 1 ? "row" : "rows"}`;
866
873
  }
867
- function $t(t) {
868
- let { isPhone: n } = ie(), { entityCode: r, entity: i, screen: a, viewState: o, visibleColumns: s, selectedRowPKs: c, totalRows: l, pageSize: u, locale: d, align: f = "end", variant: p = "toolbar", onBeforeOpen: m } = t, [h, g] = q(!1), [_, v] = q(!1), [y, b] = q(null), S = K(null), T = Zt(i.export), E = Zt(a?.export);
874
+ function ln(t) {
875
+ let { isPhone: n } = ie(), { entityCode: r, entity: i, screen: a, viewState: o, visibleColumns: s, selectedRowPKs: c, totalRows: l, pageSize: u, locale: d, align: f = "end", variant: p = "toolbar", onBeforeOpen: m } = t, [h, g] = G(!1), [_, v] = G(!1), [y, b] = G(null), S = W(null), T = sn(i.export), E = sn(a?.export);
869
876
  if (!T || !E) return null;
870
877
  async function D(e) {
871
878
  b(null), v(!0);
872
879
  try {
873
- let t = dt(o, {
880
+ let t = pt(o, {
874
881
  scope: e,
875
882
  visibleColumns: s,
876
883
  selectedRowPKs: e === "selected_rows" ? c : void 0,
877
884
  locale: d
878
- }), { blob: n, filename: i } = await F(r, t);
879
- tn(n, i || `${r}-${en()}.csv`), g(!1);
885
+ }), { blob: n, filename: i } = await P(r, t);
886
+ dn(n, i || `${r}-${un()}.csv`), g(!1);
880
887
  } catch (e) {
881
888
  let t = e instanceof j ? {
882
889
  code: e.code,
@@ -892,8 +899,8 @@ function $t(t) {
892
899
  }
893
900
  if (p === "selection-menu-item") {
894
901
  let t = _ || c.length === 0;
895
- return /* @__PURE__ */ Y(C, {
896
- icon: /* @__PURE__ */ Y(e.download, { size: 12 }),
902
+ return /* @__PURE__ */ q(C, {
903
+ icon: /* @__PURE__ */ q(e.download, { size: 12 }),
897
904
  "data-testid": "export-selection-menu-item",
898
905
  onClick: t ? void 0 : () => {
899
906
  m?.(), D("selected_rows");
@@ -902,11 +909,11 @@ function $t(t) {
902
909
  });
903
910
  }
904
911
  let ee = c.length > 0, te = i.list_pagination === "cursor";
905
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(w, {
912
+ return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(w, {
906
913
  ref: S,
907
914
  kind: "ghost",
908
915
  size: "sm",
909
- icon: /* @__PURE__ */ Y(e.download, { size: 12 }),
916
+ icon: /* @__PURE__ */ q(e.download, { size: 12 }),
910
917
  onClick: () => {
911
918
  m?.(), g((e) => !e);
912
919
  },
@@ -914,38 +921,38 @@ function $t(t) {
914
921
  "aria-label": "Export",
915
922
  title: "Export",
916
923
  children: n ? null : _ ? "Exporting…" : "Export"
917
- }), /* @__PURE__ */ X(x, {
924
+ }), /* @__PURE__ */ J(x, {
918
925
  open: h,
919
926
  anchor: S.current,
920
927
  onClose: () => g(!1),
921
928
  align: f,
922
929
  width: 260,
923
930
  children: [
924
- /* @__PURE__ */ X(C, {
925
- icon: /* @__PURE__ */ Y(e.download, { size: 12 }),
931
+ /* @__PURE__ */ J(C, {
932
+ icon: /* @__PURE__ */ q(e.download, { size: 12 }),
926
933
  onClick: _ ? void 0 : () => void D("current_view"),
927
- children: ["Current view (CSV) · ", Qt(l)]
934
+ children: ["Current view (CSV) · ", cn(l)]
928
935
  }),
929
- ee && /* @__PURE__ */ X(C, {
930
- icon: /* @__PURE__ */ Y(e.check, { size: 12 }),
936
+ ee && /* @__PURE__ */ J(C, {
937
+ icon: /* @__PURE__ */ q(e.check, { size: 12 }),
931
938
  onClick: _ ? void 0 : () => void D("selected_rows"),
932
939
  children: ["Selected rows (CSV) · ", c.length]
933
940
  }),
934
- te ? /* @__PURE__ */ Y(C, {
935
- icon: /* @__PURE__ */ Y(e.columns, { size: 12 }),
941
+ te ? /* @__PURE__ */ q(C, {
942
+ icon: /* @__PURE__ */ q(e.columns, { size: 12 }),
936
943
  "data-testid": "export-current-page-disabled",
937
944
  disabled: !0,
938
945
  children: "Current page · n/a (infinite scroll)"
939
- }) : /* @__PURE__ */ X(C, {
940
- icon: /* @__PURE__ */ Y(e.columns, { size: 12 }),
946
+ }) : /* @__PURE__ */ J(C, {
947
+ icon: /* @__PURE__ */ q(e.columns, { size: 12 }),
941
948
  onClick: _ ? void 0 : () => void D("current_page"),
942
949
  children: ["Current page (CSV) · ", u ? `${u} rows` : "page window"]
943
950
  }),
944
- /* @__PURE__ */ Y(C, {
945
- icon: /* @__PURE__ */ Y(e.grid, { size: 12 }),
951
+ /* @__PURE__ */ q(C, {
952
+ icon: /* @__PURE__ */ q(e.grid, { size: 12 }),
946
953
  children: "XLSX (coming soon)"
947
954
  }),
948
- y && /* @__PURE__ */ Y("div", {
955
+ y && /* @__PURE__ */ q("div", {
949
956
  role: "alert",
950
957
  style: {
951
958
  padding: "6px 10px",
@@ -959,21 +966,21 @@ function $t(t) {
959
966
  ]
960
967
  })] });
961
968
  }
962
- function en() {
969
+ function un() {
963
970
  let e = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
964
971
  return `${e.getUTCFullYear()}${t(e.getUTCMonth() + 1)}${t(e.getUTCDate())}-${t(e.getUTCHours())}${t(e.getUTCMinutes())}`;
965
972
  }
966
- function tn(e, t) {
973
+ function dn(e, t) {
967
974
  let n = URL.createObjectURL(e), r = document.createElement("a");
968
975
  r.href = n, r.download = t, r.style.display = "none", document.body.appendChild(r), r.click(), document.body.removeChild(r), setTimeout(() => URL.revokeObjectURL(n), 0);
969
976
  }
970
977
  //#endregion
971
978
  //#region src/components/pages/list/ListToolbar.tsx
972
- function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, screenName: o, locale: c, isPhone: l, isCardsPresentation: u, sort: d, columns: f, views: p, query: m, selection: h, filters: _, searchValue: v, onSearchChange: y, onSaveView: b, page: T, perPage: E, includeDeleted: D, canViewDeleted: ee, onToggleDeleted: O, isLive: k }) {
973
- let [ne, re] = q(!1), [ie, A] = q(!1), [ae, j] = q(!1), M = K(null), N = K(null), se = ve((e) => e.density), ce = () => {
974
- let e = se === "compact" ? "comfortable" : se === "comfortable" ? "cozy" : "compact";
975
- ve.getState().setMany({ density: e });
976
- }, P = !l || ne || v !== "", F = (e) => {
979
+ function fn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, screenName: o, locale: c, isPhone: l, isCardsPresentation: u, sort: d, columns: f, views: p, query: m, selection: h, filters: _, searchValue: v, onSearchChange: y, onSaveView: b, page: T, perPage: E, includeDeleted: D, canViewDeleted: ee, onToggleDeleted: O, isLive: k }) {
980
+ let [ne, re] = G(!1), [ie, A] = G(!1), [ae, j] = G(!1), M = W(null), se = W(null), ce = ye((e) => e.density), le = () => {
981
+ let e = ce === "compact" ? "comfortable" : ce === "comfortable" ? "cozy" : "compact";
982
+ ye.getState().setMany({ density: e });
983
+ }, N = !l || ne || v !== "", P = (e) => {
977
984
  if (e.startsWith("$status.")) {
978
985
  let t = e.slice(8), r = n.status_groups?.[t];
979
986
  return r ? s(r.name) || t : e;
@@ -982,41 +989,41 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
982
989
  let t = e.slice(10), r = n.properties?.[t];
983
990
  return r ? s(r.name) || t : e;
984
991
  }
985
- return Ne(n, e, i?.entities);
986
- }, le = (t.columns ?? []).filter((e) => Ht(e, n));
987
- return /* @__PURE__ */ X("div", {
992
+ return Pe(n, e, i?.entities);
993
+ }, ue = (t.columns ?? []).filter((e) => Zt(e, n));
994
+ return /* @__PURE__ */ J("div", {
988
995
  style: {
989
996
  display: "flex",
990
997
  alignItems: "center",
991
998
  gap: l ? 6 : 8,
992
999
  paddingTop: 0,
993
1000
  paddingBottom: 10,
994
- ...l ? ye(12) : {
1001
+ ...l ? be(12) : {
995
1002
  paddingLeft: 20,
996
1003
  paddingRight: 20
997
1004
  },
998
1005
  flexWrap: "wrap"
999
1006
  },
1000
1007
  children: [
1001
- /* @__PURE__ */ Y(ot, {
1008
+ /* @__PURE__ */ q(st, {
1002
1009
  views: p.all,
1003
1010
  activeViewId: p.activeId,
1004
1011
  isDirty: p.isDirty,
1005
1012
  onSelect: p.apply,
1006
1013
  onSaveAs: b
1007
1014
  }),
1008
- P ? /* @__PURE__ */ X("div", {
1015
+ N ? /* @__PURE__ */ J("div", {
1009
1016
  style: {
1010
1017
  position: "relative",
1011
1018
  width: l ? "100%" : 260,
1012
1019
  order: l ? -1 : 0
1013
1020
  },
1014
- children: [/* @__PURE__ */ Y(g, {
1021
+ children: [/* @__PURE__ */ q(g, {
1015
1022
  value: v,
1016
1023
  onChange: y,
1017
1024
  placeholder: `Search ${o.toLowerCase()}…`,
1018
- prefix: /* @__PURE__ */ Y(e.search, { size: 13 })
1019
- }), /* @__PURE__ */ Y("span", {
1025
+ prefix: /* @__PURE__ */ q(e.search, { size: 13 })
1026
+ }), /* @__PURE__ */ q("span", {
1020
1027
  style: {
1021
1028
  position: "absolute",
1022
1029
  right: 6,
@@ -1024,43 +1031,43 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1024
1031
  transform: "translateY(-50%)",
1025
1032
  pointerEvents: "none"
1026
1033
  },
1027
- children: /* @__PURE__ */ Y(te, { children: "/" })
1034
+ children: /* @__PURE__ */ q(te, { children: "/" })
1028
1035
  })]
1029
- }) : /* @__PURE__ */ Y(S, {
1030
- icon: /* @__PURE__ */ Y(e.search, { size: 14 }),
1036
+ }) : /* @__PURE__ */ q(S, {
1037
+ icon: /* @__PURE__ */ q(e.search, { size: 14 }),
1031
1038
  title: `Search ${o.toLowerCase()}`,
1032
1039
  onClick: () => re(!0)
1033
1040
  }),
1034
- /* @__PURE__ */ X(w, {
1035
- icon: /* @__PURE__ */ Y(e.filter, { size: 13 }),
1041
+ /* @__PURE__ */ J(w, {
1042
+ icon: /* @__PURE__ */ q(e.filter, { size: 13 }),
1036
1043
  onClick: _.onOpen,
1037
1044
  active: _.count > 0,
1038
- children: ["Filters", _.count > 0 && /* @__PURE__ */ Y(oe, {
1045
+ children: ["Filters", _.count > 0 && /* @__PURE__ */ q(oe, {
1039
1046
  tone: "violet",
1040
1047
  size: "xs",
1041
1048
  style: { marginLeft: 4 },
1042
1049
  children: _.count
1043
1050
  })]
1044
1051
  }),
1045
- u && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X(w, {
1052
+ u && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(w, {
1046
1053
  ref: M,
1047
- icon: /* @__PURE__ */ Y(e.sort, { size: 13 }),
1054
+ icon: /* @__PURE__ */ q(e.sort, { size: 13 }),
1048
1055
  onClick: () => A((e) => !e),
1049
1056
  active: ie || d.cols.length > 0,
1050
- children: ["Sort", d.cols.length > 0 && /* @__PURE__ */ Y(oe, {
1057
+ children: ["Sort", d.cols.length > 0 && /* @__PURE__ */ q(oe, {
1051
1058
  tone: "slate",
1052
1059
  size: "xs",
1053
1060
  style: { marginLeft: 4 },
1054
1061
  children: d.cols.length
1055
1062
  })]
1056
- }), /* @__PURE__ */ X(x, {
1063
+ }), /* @__PURE__ */ J(x, {
1057
1064
  open: ie,
1058
1065
  anchor: M.current,
1059
1066
  onClose: () => A(!1),
1060
1067
  align: "start",
1061
1068
  width: 280,
1062
1069
  children: [
1063
- /* @__PURE__ */ Y("div", {
1070
+ /* @__PURE__ */ q("div", {
1064
1071
  style: {
1065
1072
  padding: "6px 8px 4px",
1066
1073
  fontSize: 10,
@@ -1071,10 +1078,10 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1071
1078
  },
1072
1079
  children: "Sort by"
1073
1080
  }),
1074
- le.map((t) => {
1081
+ ue.map((t) => {
1075
1082
  let n = d.cols.find((e) => e.field === t);
1076
- return /* @__PURE__ */ Y(C, {
1077
- icon: n ? n.dir === "desc" ? /* @__PURE__ */ Y(e.arrowDown, { size: 12 }) : /* @__PURE__ */ Y(e.arrowUp, { size: 12 }) : /* @__PURE__ */ Y("span", { style: {
1083
+ return /* @__PURE__ */ q(C, {
1084
+ icon: n ? n.dir === "desc" ? /* @__PURE__ */ q(e.arrowDown, { size: 12 }) : /* @__PURE__ */ q(e.arrowUp, { size: 12 }) : /* @__PURE__ */ q("span", { style: {
1078
1085
  width: 12,
1079
1086
  display: "inline-block"
1080
1087
  } }),
@@ -1082,11 +1089,11 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1082
1089
  onClick: () => {
1083
1090
  d.applyColumn(t, n?.dir === "asc" ? "desc" : "asc", void 0), A(!1);
1084
1091
  },
1085
- children: F(t)
1092
+ children: P(t)
1086
1093
  }, t);
1087
1094
  }),
1088
- d.cols.length > 0 && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(C, { divider: !0 }), /* @__PURE__ */ Y(C, {
1089
- icon: /* @__PURE__ */ Y(e.x, { size: 12 }),
1095
+ d.cols.length > 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(C, { divider: !0 }), /* @__PURE__ */ q(C, {
1096
+ icon: /* @__PURE__ */ q(e.x, { size: 12 }),
1090
1097
  onClick: () => {
1091
1098
  d.clearAll(), A(!1);
1092
1099
  },
@@ -1094,7 +1101,7 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1094
1101
  })] })
1095
1102
  ]
1096
1103
  })] }),
1097
- !u && /* @__PURE__ */ Y(ct, {
1104
+ !u && /* @__PURE__ */ q(lt, {
1098
1105
  availableColumns: t.columns ?? [],
1099
1106
  visibleColumns: f.visible,
1100
1107
  onToggle: (e) => {
@@ -1105,20 +1112,20 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1105
1112
  onReset: f.clear,
1106
1113
  onShowAll: () => f.apply(t.columns ?? []),
1107
1114
  onResetWidths: f.resetWidths,
1108
- columnLabel: F
1115
+ columnLabel: P
1109
1116
  }),
1110
- !l && /* @__PURE__ */ Y("span", { style: {
1117
+ !l && /* @__PURE__ */ q("span", { style: {
1111
1118
  width: 1,
1112
1119
  height: 20,
1113
1120
  background: "var(--divider)"
1114
1121
  } }),
1115
- !l && /* @__PURE__ */ Y(S, {
1116
- icon: /* @__PURE__ */ Y(e.grid, { size: 14 }),
1122
+ !l && /* @__PURE__ */ q(S, {
1123
+ icon: /* @__PURE__ */ q(e.grid, { size: 14 }),
1117
1124
  title: "Density",
1118
- active: se !== "compact",
1119
- onClick: ce
1125
+ active: ce !== "compact",
1126
+ onClick: le
1120
1127
  }),
1121
- /* @__PURE__ */ Y(me, {
1128
+ /* @__PURE__ */ q(he, {
1122
1129
  liveObject: {
1123
1130
  refetch: m.retry,
1124
1131
  isFetching: m.isFetching,
@@ -1127,42 +1134,42 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1127
1134
  },
1128
1135
  realtime: k
1129
1136
  }),
1130
- !l && /* @__PURE__ */ Y("div", { style: { flex: 1 } }),
1131
- !l && ee && /* @__PURE__ */ Y(w, {
1137
+ !l && /* @__PURE__ */ q("div", { style: { flex: 1 } }),
1138
+ !l && ee && /* @__PURE__ */ q(w, {
1132
1139
  kind: "ghost",
1133
1140
  size: "sm",
1134
- icon: Y(D ? e.eyeOff : e.eye, { size: 12 }),
1141
+ icon: q(D ? e.eyeOff : e.eye, { size: 12 }),
1135
1142
  onClick: O,
1136
1143
  active: D,
1137
1144
  children: D ? "Hide deleted" : "Show deleted"
1138
1145
  }),
1139
- l && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(S, {
1140
- ref: N,
1141
- icon: /* @__PURE__ */ Y(e.more, { size: 14 }),
1146
+ l && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(S, {
1147
+ ref: se,
1148
+ icon: /* @__PURE__ */ q(e.more, { size: 14 }),
1142
1149
  title: "More",
1143
1150
  active: ae,
1144
1151
  onClick: () => j((e) => !e)
1145
- }), /* @__PURE__ */ X(x, {
1152
+ }), /* @__PURE__ */ J(x, {
1146
1153
  open: ae,
1147
- anchor: N.current,
1154
+ anchor: se.current,
1148
1155
  onClose: () => j(!1),
1149
1156
  align: "end",
1150
1157
  width: 220,
1151
- children: [/* @__PURE__ */ Y(C, {
1152
- icon: /* @__PURE__ */ Y(e.grid, { size: 13 }),
1158
+ children: [/* @__PURE__ */ q(C, {
1159
+ icon: /* @__PURE__ */ q(e.grid, { size: 13 }),
1153
1160
  onClick: () => {
1154
- ce(), j(!1);
1161
+ le(), j(!1);
1155
1162
  },
1156
1163
  children: "Density"
1157
- }), ee && /* @__PURE__ */ Y(C, {
1158
- icon: Y(D ? e.eyeOff : e.eye, { size: 13 }),
1164
+ }), ee && /* @__PURE__ */ q(C, {
1165
+ icon: q(D ? e.eyeOff : e.eye, { size: 13 }),
1159
1166
  onClick: () => {
1160
1167
  O(), j(!1);
1161
1168
  },
1162
1169
  children: D ? "Hide deleted" : "Show deleted"
1163
1170
  })]
1164
1171
  })] }),
1165
- r && n && /* @__PURE__ */ Y(pt, {
1172
+ r && n && /* @__PURE__ */ q(ht, {
1166
1173
  entityCode: r,
1167
1174
  scope: "list",
1168
1175
  selectedIds: h.ids,
@@ -1177,9 +1184,9 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1177
1184
  },
1178
1185
  locale: c,
1179
1186
  capability: n.documents,
1180
- canManageTemplates: B(i)
1187
+ canManageTemplates: R(i)
1181
1188
  }),
1182
- r && n && /* @__PURE__ */ Y($t, {
1189
+ r && n && /* @__PURE__ */ q(ln, {
1183
1190
  entityCode: r,
1184
1191
  entity: n,
1185
1192
  screen: t,
@@ -1203,7 +1210,7 @@ function nn({ screen: t, entity: n, entityCode: r, schema: i, screenCode: a, scr
1203
1210
  }
1204
1211
  //#endregion
1205
1212
  //#region src/components/pages/list/useListViews.ts
1206
- function rn(e) {
1213
+ function pn(e) {
1207
1214
  let t = new URLSearchParams(), n = e.get("search");
1208
1215
  n && t.set("search", n);
1209
1216
  for (let n of k) {
@@ -1212,16 +1219,16 @@ function rn(e) {
1212
1219
  }
1213
1220
  return t;
1214
1221
  }
1215
- function an(e, t) {
1216
- let n = I(t.id);
1217
- n && e.setQueriesData({ queryKey: ["entity-data", "view"] }, (e) => !e || e.data.some((e) => I(e.id) === n) ? e : {
1222
+ function mn(e, t) {
1223
+ let n = F(t.id);
1224
+ n && e.setQueriesData({ queryKey: ["entity-data", "view"] }, (e) => !e || e.data.some((e) => F(e.id) === n) ? e : {
1218
1225
  ...e,
1219
1226
  data: [t, ...e.data]
1220
1227
  });
1221
1228
  }
1222
- function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, userId: i, tenantId: a, filterError: o, filters: s, visibleColumns: c, sort: l }) {
1223
- let u = bt(), d = it(e, i), f = n.get("view"), p = G(() => d.find((e) => e.id === f), [d, f]), m = Ce("view"), h = xe("view"), g = `dcl:smartlist:default-view-cleared:${e}`, _ = K(!1);
1224
- W(() => {
1229
+ function hn({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, userId: i, tenantId: a, filterError: o, filters: s, visibleColumns: c, sort: l }) {
1230
+ let u = St(), d = at(e, i), f = n.get("view"), p = U(() => d.find((e) => e.id === f), [d, f]), m = we("view"), h = Se("view"), g = `dcl:smartlist:default-view-cleared:${e}`, _ = W(!1);
1231
+ H(() => {
1225
1232
  if (_.current) return;
1226
1233
  if (o) {
1227
1234
  _.current = !0;
@@ -1239,7 +1246,7 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1239
1246
  let e = d.find((e) => e.source === "personal" && e.is_default) ?? (t?.default_view ? d.find((e) => e.source === "system" && e.id === t.default_view) : void 0);
1240
1247
  if (!e || !e.id) return;
1241
1248
  _.current = !0;
1242
- let i = rn(n);
1249
+ let i = pn(n);
1243
1250
  i.set("view", e.id), e.filters && Array.isArray(e.filters) && e.filters.length > 0 && i.set("filters", JSON.stringify(e.filters)), e.columns && e.columns.length > 0 && i.set("columns", e.columns.join(",")), e.sort && i.set("sort", e.sort), r(i, { replace: !0 });
1244
1251
  }, [
1245
1252
  d,
@@ -1249,7 +1256,7 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1249
1256
  g,
1250
1257
  t?.default_view
1251
1258
  ]);
1252
- let v = G(() => {
1259
+ let v = U(() => {
1253
1260
  if (!f || !p) return !1;
1254
1261
  let e = p.filters ?? [], n = p.columns?.length ? p.columns : t?.default_columns ?? t?.columns ?? [], r = p.sort ?? t?.sort_default ?? "";
1255
1262
  return JSON.stringify(s) !== JSON.stringify(e) || c.join(",") !== n.join(",") || (l ?? "") !== r;
@@ -1262,8 +1269,8 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1262
1269
  t?.default_columns,
1263
1270
  t?.columns,
1264
1271
  t?.sort_default
1265
- ]), y = U((e) => {
1266
- let i = new URLSearchParams(n), a = rn(n);
1272
+ ]), y = V((e) => {
1273
+ let i = new URLSearchParams(n), a = pn(n);
1267
1274
  e.id ? (a.set("view", e.id), e.filters && Array.isArray(e.filters) && e.filters.length > 0 && a.set("filters", JSON.stringify(e.filters)), e.columns && e.columns.length > 0 && a.set("columns", e.columns.join(",")), e.sort && a.set("sort", e.sort), a.set("page", "1")) : typeof window < "u" && window.sessionStorage?.setItem(g, "1"), r(a);
1268
1275
  let o = i.get("view"), s = o ? d.find((e) => e.id === o) : void 0, c = (s?.columns?.length ? s.columns : t?.default_columns ?? t?.columns ?? []).join(",");
1269
1276
  (i.get("columns") ?? c) !== c && A.info("View applied", "Your unsaved column changes were replaced.", { action: {
@@ -1277,7 +1284,7 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1277
1284
  d,
1278
1285
  t?.default_columns,
1279
1286
  t?.columns
1280
- ]), b = U(async () => {
1287
+ ]), b = V(async () => {
1281
1288
  !p?.id || p.source !== "personal" || (await h.mutateAsync({
1282
1289
  pkValues: p.id,
1283
1290
  data: {
@@ -1300,7 +1307,7 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1300
1307
  active: p,
1301
1308
  isDirty: v,
1302
1309
  apply: y,
1303
- saveAsNew: U(async (t) => {
1310
+ saveAsNew: V(async (t) => {
1304
1311
  if (!i || !a) return;
1305
1312
  let o = await m.mutateAsync({
1306
1313
  tenant_id: a,
@@ -1312,9 +1319,9 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1312
1319
  ...l ? { sort: l } : {},
1313
1320
  is_shared: !1,
1314
1321
  is_default: !1
1315
- }), d = I(o.data.id);
1322
+ }), d = F(o.data.id);
1316
1323
  if (!d) return;
1317
- an(u, o.data), await u.invalidateQueries({ queryKey: ["entity-data", "view"] });
1324
+ mn(u, o.data), await u.invalidateQueries({ queryKey: ["entity-data", "view"] });
1318
1325
  let f = new URLSearchParams(n);
1319
1326
  f.set("view", d), r(f);
1320
1327
  }, [
@@ -1333,16 +1340,16 @@ function on({ screenCode: e, screen: t, searchParams: n, setSearchParams: r, use
1333
1340
  isSaving: m.isPending || h.isPending
1334
1341
  };
1335
1342
  }
1336
- function sn(e) {
1343
+ function gn(e) {
1337
1344
  return e && e.source === "personal" ? s(e.name) : null;
1338
1345
  }
1339
1346
  //#endregion
1340
1347
  //#region src/components/pages/list/use-filter-value-labels.ts
1341
- var cn = 200;
1342
- function ln(e, t, n, r) {
1343
- let i = new Map(e.map((e) => [e.code, e])), a = un(i, t, n, r), c = yt({ queries: a.map((e) => {
1348
+ var _n = 200;
1349
+ function vn(e, t, n, r) {
1350
+ let i = new Map(e.map((e) => [e.code, e])), a = Y(i, t, n, r), c = xt({ queries: a.map((e) => {
1344
1351
  let t = {
1345
- per_page: cn,
1352
+ per_page: _n,
1346
1353
  filters: [{
1347
1354
  field: e.lookupField,
1348
1355
  op: "in",
@@ -1369,14 +1376,14 @@ function ln(e, t, n, r) {
1369
1376
  if (r) {
1370
1377
  let e = l[n.entity] ??= {};
1371
1378
  for (let t of r) {
1372
- let r = I(t[n.lookupField]);
1379
+ let r = F(t[n.lookupField]);
1373
1380
  r && (e[r] = t);
1374
1381
  }
1375
1382
  }
1376
1383
  if (e.isLoading) for (let e of n.values) l[n.entity]?.[e] || u.add(`${n.entity}::${e}`);
1377
1384
  }), {
1378
1385
  labelFor: (e, t) => {
1379
- let n = I(t), a = i.get(e);
1386
+ let n = F(t), a = i.get(e);
1380
1387
  if (!a) return {
1381
1388
  status: "plain",
1382
1389
  raw: n
@@ -1421,15 +1428,15 @@ function ln(e, t, n, r) {
1421
1428
  refs: l
1422
1429
  };
1423
1430
  }
1424
- function un(e, t, n, r) {
1431
+ function Y(e, t, n, r) {
1425
1432
  let i = /* @__PURE__ */ new Map();
1426
- for (let a of Ze(t)) {
1433
+ for (let a of Qe(t)) {
1427
1434
  if (!a.field) continue;
1428
1435
  let t = e.get(a.field);
1429
1436
  if (!t || t.type !== "ref" || !t.ref?.entity) continue;
1430
1437
  let o = t.ref.entity, s = r?.[o], l = t.ref.field || (s ? c(s)[0] : "id") || "id", u = Array.isArray(a.value) ? a.value : [a.value];
1431
1438
  for (let e of u) {
1432
- let r = I(e);
1439
+ let r = F(e);
1433
1440
  if (!r || t.specialValues?.some((e) => e.code === r) || n?.[o]?.[r]) continue;
1434
1441
  let a = `${o}::${l}`, s = i.get(a);
1435
1442
  s || (s = {
@@ -1446,13 +1453,13 @@ function un(e, t, n, r) {
1446
1453
  }
1447
1454
  //#endregion
1448
1455
  //#region src/components/pages/list/SaveViewDialog.tsx
1449
- function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i, onOverwrite: a }) {
1450
- let [o, s] = q(""), c = !!(i && a);
1451
- if (W(() => {
1456
+ function yn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i, onOverwrite: a }) {
1457
+ let [o, s] = G(""), c = !!(i && a);
1458
+ if (H(() => {
1452
1459
  e && s("");
1453
1460
  }, [e]), !e) return null;
1454
1461
  let l = o.trim();
1455
- return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
1462
+ return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
1456
1463
  onClick: n,
1457
1464
  style: {
1458
1465
  position: "fixed",
@@ -1460,7 +1467,7 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1460
1467
  background: "var(--scrim)",
1461
1468
  zIndex: 70
1462
1469
  }
1463
- }), /* @__PURE__ */ X("div", {
1470
+ }), /* @__PURE__ */ J("div", {
1464
1471
  role: "dialog",
1465
1472
  "aria-label": "Save view",
1466
1473
  "aria-modal": "true",
@@ -1482,14 +1489,14 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1482
1489
  gap: 12
1483
1490
  },
1484
1491
  children: [
1485
- /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h3", {
1492
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
1486
1493
  style: {
1487
1494
  margin: 0,
1488
1495
  fontSize: 14,
1489
1496
  color: "var(--text)"
1490
1497
  },
1491
1498
  children: "Save view"
1492
- }), /* @__PURE__ */ Y("p", {
1499
+ }), /* @__PURE__ */ q("p", {
1493
1500
  style: {
1494
1501
  margin: "4px 0 0",
1495
1502
  fontSize: 12,
@@ -1497,20 +1504,20 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1497
1504
  },
1498
1505
  children: "Views save columns, order, filters, and sort. Widths stay personal to this device and are never part of a view."
1499
1506
  })] }),
1500
- /* @__PURE__ */ X("label", {
1507
+ /* @__PURE__ */ J("label", {
1501
1508
  style: {
1502
1509
  display: "flex",
1503
1510
  flexDirection: "column",
1504
1511
  gap: 4
1505
1512
  },
1506
- children: [/* @__PURE__ */ Y("span", {
1513
+ children: [/* @__PURE__ */ q("span", {
1507
1514
  style: {
1508
1515
  fontSize: 11.5,
1509
1516
  color: "var(--text-3)",
1510
1517
  fontWeight: 500
1511
1518
  },
1512
1519
  children: "Name"
1513
- }), /* @__PURE__ */ Y(g, {
1520
+ }), /* @__PURE__ */ q(g, {
1514
1521
  autoFocus: !0,
1515
1522
  "aria-label": "View name",
1516
1523
  value: o,
@@ -1521,19 +1528,19 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1521
1528
  }
1522
1529
  })]
1523
1530
  }),
1524
- /* @__PURE__ */ X("div", {
1531
+ /* @__PURE__ */ J("div", {
1525
1532
  style: {
1526
1533
  display: "flex",
1527
1534
  justifyContent: "flex-end",
1528
1535
  gap: 8
1529
1536
  },
1530
1537
  children: [
1531
- /* @__PURE__ */ Y(w, {
1538
+ /* @__PURE__ */ q(w, {
1532
1539
  onClick: n,
1533
1540
  disabled: t,
1534
1541
  children: "Cancel"
1535
1542
  }),
1536
- c && /* @__PURE__ */ X(w, {
1543
+ c && /* @__PURE__ */ J(w, {
1537
1544
  onClick: () => void a(),
1538
1545
  disabled: t,
1539
1546
  children: [
@@ -1542,7 +1549,7 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1542
1549
  "”"
1543
1550
  ]
1544
1551
  }),
1545
- /* @__PURE__ */ Y(w, {
1552
+ /* @__PURE__ */ q(w, {
1546
1553
  kind: "primary",
1547
1554
  onClick: () => void r(l),
1548
1555
  disabled: !l || t,
@@ -1555,16 +1562,16 @@ function dn({ open: e, pending: t, onClose: n, onSave: r, overwriteViewName: i,
1555
1562
  }
1556
1563
  //#endregion
1557
1564
  //#region src/components/pages/list/ListHeader.tsx
1558
- function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i, entityActionLayout: a, selectedIds: o, data: c, rowKey: l, onActionSuccess: u, widgetContext: d }) {
1559
- let { run: f } = D(), { isPhone: p } = ie(), m = pe("list"), h = m.isVisible("show_title"), g = m.isVisible("show_actions"), v = be(), y = G(() => {
1565
+ function bn({ title: t, description: n, toolbarActions: r, screenActionLayout: i, entityActionLayout: a, selectedIds: o, data: c, rowKey: l, onActionSuccess: u, widgetContext: d }) {
1566
+ let { run: f } = D(), { isPhone: p } = ie(), m = me("list"), h = m.isVisible("show_title"), g = m.isVisible("show_actions"), v = xe(), y = U(() => {
1560
1567
  let e = {};
1561
1568
  for (let { code: t, action: n } of r) e[t] = n;
1562
1569
  return e;
1563
- }, [r]), x = G(() => P((i ?? a) || M(y, "list_toolbar"), y, void 0, "list_toolbar"), [
1570
+ }, [r]), x = U(() => N((i ?? a) || M(y, "list_toolbar"), y, void 0, "list_toolbar"), [
1564
1571
  i,
1565
1572
  a,
1566
1573
  y
1567
- ]), C = G(() => le(x, y, void 0, E, "Select one or more rows first"), [x, y]), w = G(() => {
1574
+ ]), C = U(() => ue(x, y, void 0, E, "Select one or more rows first"), [x, y]), w = U(() => {
1568
1575
  if (o.length === 0) return [];
1569
1576
  let e = /* @__PURE__ */ new Map();
1570
1577
  for (let t of c) e.set(l(t), t);
@@ -1573,12 +1580,12 @@ function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i
1573
1580
  o,
1574
1581
  c,
1575
1582
  l
1576
- ]), ee = G(() => _(x, y, void 0, {}, w), [
1583
+ ]), ee = U(() => _(x, y, void 0, {}, w), [
1577
1584
  x,
1578
1585
  y,
1579
1586
  w
1580
1587
  ]), te = o.length > 0 ? ee : C, O = (e, t) => {
1581
- let n = Re(e, t, {});
1588
+ let n = ze(e, t, {});
1582
1589
  if (n === null) return;
1583
1590
  let r = s(t.display?.name) || e;
1584
1591
  return f({
@@ -1591,7 +1598,7 @@ function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i
1591
1598
  }
1592
1599
  });
1593
1600
  };
1594
- return !h && !g ? null : /* @__PURE__ */ X("div", {
1601
+ return !h && !g ? null : /* @__PURE__ */ J("div", {
1595
1602
  style: {
1596
1603
  display: "flex",
1597
1604
  alignItems: "center",
@@ -1599,29 +1606,29 @@ function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i
1599
1606
  flexWrap: p ? "wrap" : "nowrap",
1600
1607
  paddingTop: p ? 12 : 16,
1601
1608
  paddingBottom: 10,
1602
- ...p ? ye(12) : {
1609
+ ...p ? be(12) : {
1603
1610
  paddingLeft: 20,
1604
1611
  paddingRight: 20
1605
1612
  }
1606
1613
  },
1607
1614
  children: [
1608
- h && v.hasOriginBack && /* @__PURE__ */ Y(S, {
1609
- icon: /* @__PURE__ */ Y(e.back, { size: 14 }),
1615
+ h && v.hasOriginBack && /* @__PURE__ */ q(S, {
1616
+ icon: /* @__PURE__ */ q(e.back, { size: 14 }),
1610
1617
  title: "Back",
1611
1618
  onClick: v.goBack
1612
1619
  }),
1613
- h && /* @__PURE__ */ Y("div", {
1620
+ h && /* @__PURE__ */ q("div", {
1614
1621
  style: {
1615
1622
  flex: p ? "1 1 100%" : "1 1 auto",
1616
1623
  minWidth: 0
1617
1624
  },
1618
- children: /* @__PURE__ */ X("div", {
1625
+ children: /* @__PURE__ */ J("div", {
1619
1626
  style: {
1620
1627
  display: "flex",
1621
1628
  alignItems: "baseline",
1622
1629
  gap: 10
1623
1630
  },
1624
- children: [/* @__PURE__ */ Y("h1", {
1631
+ children: [/* @__PURE__ */ q("h1", {
1625
1632
  style: {
1626
1633
  margin: 0,
1627
1634
  minWidth: 0,
@@ -1635,13 +1642,13 @@ function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i
1635
1642
  color: "var(--text)"
1636
1643
  },
1637
1644
  children: t
1638
- }), n && /* @__PURE__ */ Y(fe, {
1645
+ }), n && /* @__PURE__ */ q(pe, {
1639
1646
  label: n,
1640
1647
  "data-testid": "list-description-info"
1641
1648
  })]
1642
1649
  })
1643
1650
  }),
1644
- g && te.length > 0 && /* @__PURE__ */ Y(ke, {
1651
+ g && te.length > 0 && /* @__PURE__ */ q(Ae, {
1645
1652
  layout: te,
1646
1653
  kind: "toolbar",
1647
1654
  entityActions: y,
@@ -1654,12 +1661,12 @@ function fn({ title: t, description: n, toolbarActions: r, screenActionLayout: i
1654
1661
  }
1655
1662
  //#endregion
1656
1663
  //#region src/components/pages/list/ListFloatbar.tsx
1657
- function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityActionLayout: i, data: a, rowKey: o, entityCode: c, entity: l, screen: u, onClear: d, onActionSuccess: f, widgetContext: p }) {
1658
- let { run: m } = D(), h = G(() => {
1664
+ function xn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityActionLayout: i, data: a, rowKey: o, entityCode: c, entity: l, screen: u, onClear: d, onActionSuccess: f, widgetContext: p }) {
1665
+ let { run: m } = D(), h = U(() => {
1659
1666
  let e = {};
1660
1667
  for (let { code: t, action: r } of n) e[t] = r;
1661
1668
  return e;
1662
- }, [n]), g = G(() => {
1669
+ }, [n]), g = U(() => {
1663
1670
  if (t.length === 0) return [];
1664
1671
  let e = /* @__PURE__ */ new Map();
1665
1672
  for (let t of a) e.set(o(t), t);
@@ -1668,26 +1675,26 @@ function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityA
1668
1675
  t,
1669
1676
  a,
1670
1677
  o
1671
- ]), v = G(() => {
1678
+ ]), v = U(() => {
1672
1679
  if (!l || !u || g.length === 0) return r;
1673
- let e = g.map((e) => Oe(l, u, e));
1674
- return e.some((t) => t !== e[0]) ? r : Le(l, u, g[0])?.action_layout;
1680
+ let e = g.map((e) => ke(l, u, e));
1681
+ return e.some((t) => t !== e[0]) ? r : Re(l, u, g[0])?.action_layout;
1675
1682
  }, [
1676
1683
  l,
1677
1684
  u,
1678
1685
  g,
1679
1686
  r
1680
- ]), y = G(() => P((v ?? i) || M(h, "list_floatbar"), h, void 0, "list_floatbar"), [
1687
+ ]), y = U(() => N((v ?? i) || M(h, "list_floatbar"), h, void 0, "list_floatbar"), [
1681
1688
  v,
1682
1689
  i,
1683
1690
  h
1684
- ]), x = G(() => _(y, h, void 0, {}, g, Pe(l, g)), [
1691
+ ]), x = U(() => _(y, h, void 0, {}, g, Fe(l, g)), [
1685
1692
  y,
1686
1693
  h,
1687
1694
  g,
1688
1695
  l
1689
1696
  ]);
1690
- return x.length === 0 ? null : /* @__PURE__ */ X("div", {
1697
+ return x.length === 0 ? null : /* @__PURE__ */ J("div", {
1691
1698
  style: {
1692
1699
  position: "fixed",
1693
1700
  left: "50%",
@@ -1708,13 +1715,13 @@ function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityA
1708
1715
  animation: "floatbarIn .15s ease-out"
1709
1716
  },
1710
1717
  children: [
1711
- /* @__PURE__ */ Y("style", { children: "@keyframes floatbarIn{from{transform:translateX(-50%) translateY(8px);opacity:0}to{transform:translateX(-50%) translateY(0);opacity:1}}" }),
1712
- /* @__PURE__ */ X("span", {
1718
+ /* @__PURE__ */ q("style", { children: "@keyframes floatbarIn{from{transform:translateX(-50%) translateY(8px);opacity:0}to{transform:translateX(-50%) translateY(0);opacity:1}}" }),
1719
+ /* @__PURE__ */ J("span", {
1713
1720
  style: {
1714
1721
  fontSize: 12.5,
1715
1722
  fontWeight: 600
1716
1723
  },
1717
- children: [/* @__PURE__ */ Y("span", {
1724
+ children: [/* @__PURE__ */ q("span", {
1718
1725
  style: {
1719
1726
  padding: "1px 7px",
1720
1727
  borderRadius: 4,
@@ -1726,13 +1733,13 @@ function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityA
1726
1733
  children: t.length
1727
1734
  }), "selected"]
1728
1735
  }),
1729
- /* @__PURE__ */ Y(ke, {
1736
+ /* @__PURE__ */ q(Ae, {
1730
1737
  layout: x,
1731
1738
  kind: "toolbar",
1732
1739
  entityActions: h,
1733
1740
  rowSelection: g,
1734
1741
  onRun: (e, n) => {
1735
- let r = Re(e, n, {}, c);
1742
+ let r = ze(e, n, {}, c);
1736
1743
  if (r !== null) return m({
1737
1744
  action: n,
1738
1745
  title: s(n.display?.name) || e,
@@ -1748,7 +1755,7 @@ function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityA
1748
1755
  ariaLabel: "Floating action bar",
1749
1756
  constrain: !1
1750
1757
  }),
1751
- /* @__PURE__ */ Y("button", {
1758
+ /* @__PURE__ */ q("button", {
1752
1759
  onClick: d,
1753
1760
  style: {
1754
1761
  background: "none",
@@ -1760,20 +1767,20 @@ function pn({ selectedIds: t, floatbarActions: n, screenActionLayout: r, entityA
1760
1767
  borderRadius: 6
1761
1768
  },
1762
1769
  title: "Clear selection",
1763
- children: /* @__PURE__ */ Y(e.x, { size: 14 })
1770
+ children: /* @__PURE__ */ q(e.x, { size: 14 })
1764
1771
  })
1765
1772
  ]
1766
1773
  });
1767
1774
  }
1768
1775
  //#endregion
1769
1776
  //#region src/components/pages/list/useRowMenu.ts
1770
- function mn(e, t) {
1777
+ function X(e, t) {
1771
1778
  let n = (e) => e === "__peek" && !t.peek || e === "__open" && !t.open, r = [];
1772
1779
  for (let i of e) if (i.kind === "action") {
1773
1780
  if (n(i.code)) continue;
1774
1781
  r.push(i);
1775
1782
  } else {
1776
- let e = mn(i.items, t);
1783
+ let e = X(i.items, t);
1777
1784
  e.length > 0 && r.push({
1778
1785
  ...i,
1779
1786
  items: e
@@ -1781,21 +1788,21 @@ function mn(e, t) {
1781
1788
  }
1782
1789
  return r;
1783
1790
  }
1784
- function hn(e, t) {
1791
+ function Sn(e, t) {
1785
1792
  for (let n of e) if (n.kind === "action") {
1786
1793
  if (n.code === t) return !0;
1787
- } else if (hn(n.items, t)) return !0;
1794
+ } else if (Sn(n.items, t)) return !0;
1788
1795
  return !1;
1789
1796
  }
1790
- function gn({ row: e, rowId: t, screen: n, fullScreen: r, entity: i, entityCode: a, rowActions: o, tabNavigate: c, locale: l, peekAllowed: u, hasDetailTarget: d, onPeek: f }) {
1797
+ function Cn({ row: e, rowId: t, screen: n, fullScreen: r, entity: i, entityCode: a, rowActions: o, tabNavigate: c, locale: l, peekAllowed: u, hasDetailTarget: d, onPeek: f }) {
1791
1798
  let { run: p } = D(), m = r.detail_screen === void 0 && n.detail_screen !== void 0 ? {
1792
1799
  ...r,
1793
1800
  detail_screen: n.detail_screen
1794
- } : r, h = Le(i, m, e) ?? m, g = G(() => {
1801
+ } : r, h = Re(i, m, e) ?? m, g = U(() => {
1795
1802
  let e = {}, t = h.row_actions === void 0 ? void 0 : new Set(h.row_actions);
1796
1803
  for (let { code: n, action: r } of o) (!t || t.has(n)) && (e[n] = r);
1797
1804
  return e;
1798
- }, [o, h.row_actions]), v = G(() => ({
1805
+ }, [o, h.row_actions]), v = U(() => ({
1799
1806
  entity: i,
1800
1807
  entityCode: a ?? "",
1801
1808
  screen: h,
@@ -1818,14 +1825,14 @@ function gn({ row: e, rowId: t, screen: n, fullScreen: r, entity: i, entityCode:
1818
1825
  c,
1819
1826
  f,
1820
1827
  e
1821
- ]), y = G(() => {
1828
+ ]), y = U(() => {
1822
1829
  let e = h.action_layout ?? null, t = i.action_layout ?? null, n = e ?? t ?? M(g, "list_row");
1823
- return P(n, g, void 0, "list_row");
1830
+ return N(n, g, void 0, "list_row");
1824
1831
  }, [
1825
1832
  h,
1826
1833
  i,
1827
1834
  g
1828
- ]), x = G(() => mn(_(y, g, void 0, e, [], Fe(i, e)), {
1835
+ ]), x = U(() => X(_(y, g, void 0, e, [], Ie(i, e)), {
1829
1836
  peek: u,
1830
1837
  open: d
1831
1838
  }), [
@@ -1839,8 +1846,8 @@ function gn({ row: e, rowId: t, screen: n, fullScreen: r, entity: i, entityCode:
1839
1846
  return {
1840
1847
  layout: x,
1841
1848
  entityActions: g,
1842
- runRowAction: U((n, r) => {
1843
- let i = Re(n, r, { row: e });
1849
+ runRowAction: V((n, r) => {
1850
+ let i = ze(n, r, { row: e });
1844
1851
  if (i !== null) return p({
1845
1852
  action: r,
1846
1853
  title: s(r.display?.name) || n,
@@ -1853,13 +1860,13 @@ function gn({ row: e, rowId: t, screen: n, fullScreen: r, entity: i, entityCode:
1853
1860
  e
1854
1861
  ]),
1855
1862
  widgetContext: v,
1856
- hasPeek: G(() => hn(x, O), [x])
1863
+ hasPeek: U(() => Sn(x, O), [x])
1857
1864
  };
1858
1865
  }
1859
1866
  //#endregion
1860
1867
  //#region src/components/pages/list/RowActionsCell.tsx
1861
- function _n({ row: t, rowId: n, screen: r, fullScreen: i, entity: a, entityCode: o, rowActions: s, tabNavigate: c, peekAllowed: l, hasDetailTarget: u, onPeek: d, locale: f }) {
1862
- let { layout: p, entityActions: m, runRowAction: h, widgetContext: g, hasPeek: _ } = gn({
1868
+ function wn({ row: t, rowId: n, screen: r, fullScreen: i, entity: a, entityCode: o, rowActions: s, tabNavigate: c, peekAllowed: l, hasDetailTarget: u, onPeek: d, locale: f }) {
1869
+ let { layout: p, entityActions: m, runRowAction: h, widgetContext: g, hasPeek: _ } = Cn({
1863
1870
  row: t,
1864
1871
  rowId: n,
1865
1872
  screen: r,
@@ -1873,7 +1880,7 @@ function _n({ row: t, rowId: n, screen: r, fullScreen: i, entity: a, entityCode:
1873
1880
  hasDetailTarget: u,
1874
1881
  onPeek: d
1875
1882
  });
1876
- return /* @__PURE__ */ X("div", {
1883
+ return /* @__PURE__ */ J("div", {
1877
1884
  className: "sl-row-actions",
1878
1885
  style: {
1879
1886
  display: "flex",
@@ -1881,14 +1888,14 @@ function _n({ row: t, rowId: n, screen: r, fullScreen: i, entity: a, entityCode:
1881
1888
  gap: 2,
1882
1889
  justifyContent: "flex-end"
1883
1890
  },
1884
- children: [_ && /* @__PURE__ */ Y(S, {
1891
+ children: [_ && /* @__PURE__ */ q(S, {
1885
1892
  size: 22,
1886
- icon: /* @__PURE__ */ Y(e.eye, { size: 12 }),
1893
+ icon: /* @__PURE__ */ q(e.eye, { size: 12 }),
1887
1894
  onClick: (e) => {
1888
1895
  e.stopPropagation(), d(t);
1889
1896
  },
1890
1897
  title: "Peek"
1891
- }), p.length > 0 && /* @__PURE__ */ Y(ke, {
1898
+ }), p.length > 0 && /* @__PURE__ */ q(Ae, {
1892
1899
  layout: p,
1893
1900
  row: t,
1894
1901
  kind: "row",
@@ -1901,36 +1908,36 @@ function _n({ row: t, rowId: n, screen: r, fullScreen: i, entity: a, entityCode:
1901
1908
  }
1902
1909
  //#endregion
1903
1910
  //#region src/components/pages/list/columns.ts
1904
- function vn(t, n, r, i) {
1905
- let a = Te(n, r);
1906
- if (!a || a.read !== "denied") return i ? V("span", { title: i }, t) : t;
1911
+ function Z(t, n, r, i) {
1912
+ let a = Ee(n, r);
1913
+ if (!a || a.read !== "denied") return i ? z("span", { title: i }, t) : t;
1907
1914
  let o = a.required_permission ? `Locked column: requires "${a.required_permission}"` : `Locked column: ${a.classification} classification`;
1908
- return V("span", {
1915
+ return z("span", {
1909
1916
  title: o,
1910
1917
  "aria-label": o,
1911
1918
  className: "inline-flex items-center gap-1"
1912
- }, V(e.lock, { size: 12 }), t);
1919
+ }, z(e.lock, { size: 12 }), t);
1913
1920
  }
1914
- function Q(e) {
1921
+ function Tn(e) {
1915
1922
  return {
1916
1923
  minSize: Math.min(60, e),
1917
- maxSize: Math.max(De, e)
1924
+ maxSize: Math.max(Oe, e)
1918
1925
  };
1919
1926
  }
1920
- function yn(e) {
1927
+ function En(e) {
1921
1928
  let { visibleCols: t, entity: n, screen: r, schema: i, entityCode: a, rowActions: o, hasBatchActions: c, hasExplicitRowActions: l, canUpdate: d, canDelete: f, peekEnabled: p, hasDetailTarget: m, userLocale: h, tabNavigate: g, refsRef: _, rowSelectionKey: v, setPeekRow: y } = e;
1922
1929
  if (t.length === 0 || !n) return [];
1923
1930
  let b = [];
1924
1931
  c && b.push({
1925
1932
  id: "_select",
1926
1933
  enableResizing: !1,
1927
- header: ({ table: e }) => V(he, {
1934
+ header: ({ table: e }) => z(ge, {
1928
1935
  checked: e.getIsAllRowsSelected(),
1929
1936
  indeterminate: e.getIsSomeRowsSelected(),
1930
1937
  onChange: () => e.toggleAllRowsSelected()
1931
1938
  }),
1932
1939
  size: 34,
1933
- cell: ({ row: e }) => V("span", { "data-testid": "row-select-checkbox" }, V(he, {
1940
+ cell: ({ row: e }) => z("span", { "data-testid": "row-select-checkbox" }, z(ge, {
1934
1941
  checked: e.getIsSelected(),
1935
1942
  onChange: () => e.toggleSelected()
1936
1943
  }))
@@ -1944,12 +1951,12 @@ function yn(e) {
1944
1951
  id: e,
1945
1952
  header: s(r.name) || t,
1946
1953
  size: 140,
1947
- ...Q(140),
1954
+ ...Tn(140),
1948
1955
  cell: ({ row: e }) => {
1949
1956
  let n = e.original.$statuses?.find((e) => e.group_code === t);
1950
- if (!n) return V("span", { className: "text-sm text-muted-foreground" }, "-");
1957
+ if (!n) return z("span", { className: "text-sm text-muted-foreground" }, "-");
1951
1958
  let r = i.get(n.status_code);
1952
- return V(oe, {
1959
+ return z(oe, {
1953
1960
  tone: r?.color ?? "slate",
1954
1961
  size: "xs"
1955
1962
  }, s(r?.name) || n.status_code);
@@ -1962,13 +1969,13 @@ function yn(e) {
1962
1969
  if (!r) continue;
1963
1970
  b.push({
1964
1971
  id: e,
1965
- header: () => vn(s(r.name) || t, n, t, s(r.description) || void 0),
1972
+ header: () => Z(s(r.name) || t, n, t, s(r.description) || void 0),
1966
1973
  size: 150,
1967
- ...Q(150),
1974
+ ...Tn(150),
1968
1975
  enableSorting: !1,
1969
1976
  cell: ({ row: e }) => {
1970
1977
  let n = e.original.$properties?.find((e) => e.property_code === t);
1971
- return !n || n.value == null ? V("span", { className: "text-sm text-muted-foreground" }, "-") : V("span", { className: "text-sm" }, I(n.value));
1978
+ return !n || n.value == null ? z("span", { className: "text-sm text-muted-foreground" }, "-") : z("span", { className: "text-sm" }, F(n.value));
1972
1979
  }
1973
1980
  });
1974
1981
  continue;
@@ -1978,15 +1985,15 @@ function yn(e) {
1978
1985
  id: e,
1979
1986
  header: "Evidence",
1980
1987
  size: 140,
1981
- ...Q(140),
1988
+ ...Tn(140),
1982
1989
  enableSorting: !1,
1983
1990
  cell: ({ row: e }) => {
1984
1991
  let t = e.original.$evidence?.verdict ?? "unverified";
1985
- return V(oe, {
1986
- tone: ut(t),
1992
+ return z(oe, {
1993
+ tone: ft(t),
1987
1994
  size: "xs",
1988
1995
  dot: !0
1989
- }, ft(t));
1996
+ }, mt(t));
1990
1997
  }
1991
1998
  });
1992
1999
  continue;
@@ -1995,10 +2002,10 @@ function yn(e) {
1995
2002
  b.push({
1996
2003
  id: e,
1997
2004
  accessorFn: (t) => t.$files?.[e] ?? null,
1998
- header: () => vn(Ne(n, e, i?.entities), n, e),
2005
+ header: () => Z(Pe(n, e, i?.entities), n, e),
1999
2006
  size: 150,
2000
- ...Q(150),
2001
- cell: ({ row: t }) => Ie({
2007
+ ...Tn(150),
2008
+ cell: ({ row: t }) => Le({
2002
2009
  entity: n,
2003
2010
  entityCode: a,
2004
2011
  fieldName: e,
@@ -2013,7 +2020,7 @@ function yn(e) {
2013
2020
  }
2014
2021
  let t = n.fields.get(e);
2015
2022
  if (!t) continue;
2016
- let r = ce(t, e, i?.entities), o = t.display?.width, c = u({
2023
+ let r = le(t, e, i?.entities), o = t.display?.width, c = u({
2017
2024
  field: t,
2018
2025
  fieldName: e,
2019
2026
  surface: "list",
@@ -2026,10 +2033,10 @@ function yn(e) {
2026
2033
  b.push({
2027
2034
  id: e,
2028
2035
  accessorKey: e,
2029
- header: () => vn(r, n, e, s(t.display?.description) || void 0),
2036
+ header: () => Z(r, n, e, s(t.display?.description) || void 0),
2030
2037
  enableSorting: t.type !== "json",
2031
2038
  size: o ?? 150,
2032
- ...Q(o ?? 150),
2039
+ ...Tn(o ?? 150),
2033
2040
  cell: ({ getValue: e, row: t }) => c(e(), t.original)
2034
2041
  });
2035
2042
  }
@@ -2038,7 +2045,7 @@ function yn(e) {
2038
2045
  enableResizing: !1,
2039
2046
  header: "",
2040
2047
  size: 40,
2041
- cell: ({ row: e }) => V(_n, {
2048
+ cell: ({ row: e }) => z(wn, {
2042
2049
  row: e.original,
2043
2050
  rowId: v(n, e.original),
2044
2051
  screen: r,
@@ -2056,8 +2063,8 @@ function yn(e) {
2056
2063
  }
2057
2064
  //#endregion
2058
2065
  //#region src/components/pages/list/RowContextMenu.tsx
2059
- function bn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o, entityCode: s, rowActions: c, tabNavigate: l, locale: u, peekAllowed: d, hasDetailTarget: f, onPeek: p, onClose: m }) {
2060
- let { layout: h, entityActions: g, runRowAction: _, widgetContext: v } = gn({
2066
+ function Dn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o, entityCode: s, rowActions: c, tabNavigate: l, locale: u, peekAllowed: d, hasDetailTarget: f, onPeek: p, onClose: m }) {
2067
+ let { layout: h, entityActions: g, runRowAction: _, widgetContext: v } = Cn({
2061
2068
  row: n,
2062
2069
  rowId: r,
2063
2070
  screen: i,
@@ -2070,8 +2077,8 @@ function bn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o,
2070
2077
  peekAllowed: d,
2071
2078
  hasDetailTarget: f,
2072
2079
  onPeek: p
2073
- }), [y, b] = q(null), S = U((e, t) => (m(), _(e, t)), [m, _]);
2074
- return h.length === 0 ? null : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
2080
+ }), [y, b] = G(null), S = V((e, t) => (m(), _(e, t)), [m, _]);
2081
+ return h.length === 0 ? null : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
2075
2082
  onClick: m,
2076
2083
  onContextMenu: (e) => {
2077
2084
  e.preventDefault(), m();
@@ -2081,7 +2088,7 @@ function bn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o,
2081
2088
  inset: 0,
2082
2089
  zIndex: 190
2083
2090
  }
2084
- }), /* @__PURE__ */ Y(x, {
2091
+ }), /* @__PURE__ */ q(x, {
2085
2092
  open: !0,
2086
2093
  anchor: null,
2087
2094
  anchorPoint: {
@@ -2090,9 +2097,9 @@ function bn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o,
2090
2097
  },
2091
2098
  onClose: m,
2092
2099
  width: 220,
2093
- children: /* @__PURE__ */ Y("div", {
2100
+ children: /* @__PURE__ */ q("div", {
2094
2101
  onClick: m,
2095
- children: /* @__PURE__ */ Y(Me, {
2102
+ children: /* @__PURE__ */ q(Ne, {
2096
2103
  layout: h,
2097
2104
  entityActions: g,
2098
2105
  onRun: S,
@@ -2106,41 +2113,41 @@ function bn({ x: e, y: t, row: n, rowId: r, screen: i, fullScreen: a, entity: o,
2106
2113
  }
2107
2114
  //#endregion
2108
2115
  //#region src/components/pages/list/useHeaderReorder.ts
2109
- var xn = 5, Sn = 48, Cn = 18;
2110
- function wn({ visibleCols: e, onReorder: t, scrollElRef: n, theadRef: r }) {
2111
- let [i, a] = q(null), [o, s] = q(null), [c, l] = q(!1), u = K(null), d = K(!1), f = K(!1), p = K([]), m = K(null), h = K(0), g = K(null), _ = K(0), v = U(() => {
2116
+ var On = 5, Q = 48, $ = 18;
2117
+ function kn({ visibleCols: e, onReorder: t, scrollElRef: n, theadRef: r }) {
2118
+ let [i, a] = G(null), [o, s] = G(null), [c, l] = G(!1), u = W(null), d = W(!1), f = W(!1), p = W([]), m = W(null), h = W(0), g = W(null), _ = W(0), v = V(() => {
2112
2119
  g.current !== null && (cancelAnimationFrame(g.current), g.current = null);
2113
- }, []), y = U(() => {
2120
+ }, []), y = V(() => {
2114
2121
  u.current = null, d.current = !1, p.current = [], m.current = null, v(), a(null), s(null), l(!1);
2115
- }, [v]), b = U((e) => {
2122
+ }, [v]), b = V((e) => {
2116
2123
  let t = p.current, r = e + ((n.current?.scrollLeft ?? 0) - _.current);
2117
2124
  for (let e = 0; e < t.length; e++) if (r < (t[e].left + t[e].right) / 2) return e;
2118
2125
  return t.length;
2119
- }, [n]), x = U(() => {
2126
+ }, [n]), x = V(() => {
2120
2127
  let e = n.current;
2121
2128
  if (!d.current || !e) {
2122
2129
  g.current = null;
2123
2130
  return;
2124
2131
  }
2125
2132
  let t = e.getBoundingClientRect(), r = h.current, i = 0;
2126
- if (r < t.left + Sn ? i = -Math.ceil((t.left + Sn - r) / Sn * Cn) : r > t.right - Sn && (i = Math.ceil((r - (t.right - Sn)) / Sn * Cn)), i !== 0) {
2133
+ if (r < t.left + Q ? i = -Math.ceil((t.left + Q - r) / Q * $) : r > t.right - Q && (i = Math.ceil((r - (t.right - Q)) / Q * $)), i !== 0) {
2127
2134
  e.scrollLeft += i;
2128
2135
  let t = b(h.current);
2129
2136
  m.current = t, s(t);
2130
2137
  }
2131
2138
  g.current = requestAnimationFrame(x);
2132
- }, [n, b]), S = U((e, t) => {
2139
+ }, [n, b]), S = V((e, t) => {
2133
2140
  t.button === 0 && (u.current = {
2134
2141
  colId: e,
2135
2142
  x: t.clientX
2136
2143
  }, d.current = !1, f.current = !1);
2137
- }, []), C = U(() => f.current ? (f.current = !1, !0) : !1, []);
2138
- return W(() => {
2144
+ }, []), C = V(() => f.current ? (f.current = !1, !0) : !1, []);
2145
+ return H(() => {
2139
2146
  let i = (t) => {
2140
2147
  let i = u.current;
2141
2148
  if (!i) return;
2142
2149
  if (h.current = t.clientX, !d.current) {
2143
- if (Math.abs(t.clientX - i.x) < xn) return;
2150
+ if (Math.abs(t.clientX - i.x) < On) return;
2144
2151
  let o = r.current, s = [];
2145
2152
  if (o) for (let t of e) {
2146
2153
  let e = o.querySelector(`[data-col-id="${CSS.escape(t)}"]`);
@@ -2187,7 +2194,7 @@ function wn({ visibleCols: e, onReorder: t, scrollElRef: n, theadRef: r }) {
2187
2194
  b,
2188
2195
  x,
2189
2196
  y
2190
- ]), W(() => y, [y]), {
2197
+ ]), H(() => y, [y]), {
2191
2198
  dragColId: i,
2192
2199
  dropIndex: o,
2193
2200
  isDragging: c,
@@ -2197,18 +2204,18 @@ function wn({ visibleCols: e, onReorder: t, scrollElRef: n, theadRef: r }) {
2197
2204
  }
2198
2205
  //#endregion
2199
2206
  //#region src/components/pages/SmartListPage.impl.tsx
2200
- var Tn = _t(() => import("./ListCardsBody-Dko91bLv.js").then((e) => ({ default: e.ListCardsBody })));
2201
- function En({ screenCode: e }) {
2202
- return /* @__PURE__ */ Y(d, { children: /* @__PURE__ */ Y(Dn, { screenCode: e }) });
2207
+ var An = yt(() => import("./ListCardsBody-C8ofksQb.js").then((e) => ({ default: e.ListCardsBody })));
2208
+ function jn({ screenCode: e }) {
2209
+ return /* @__PURE__ */ q(d, { children: /* @__PURE__ */ q(Mn, { screenCode: e }) });
2203
2210
  }
2204
- function Dn({ screenCode: e }) {
2205
- let t = Se(), [a, o] = vt(), { data: c } = i(), d = n(), [f, h] = q(!1), [g, _] = q(!1), { filters: y, filterError: x, activeCount: S, setFilters: C, clearFilters: T } = st(), E = ee((e) => e.user), D = ee((e) => e.activeTenant), te = l(), O = c?.screens[e], k = O?.entity ? c?.entities[O.entity] : void 0, A = O?.entity, ae = m(k, "create"), j = m(k, "update"), oe = m(k, "delete"), M = c?.actions, N = G(() => p(se(k?.actions, O?.actions, "list_toolbar", M), k), [
2211
+ function Mn({ screenCode: e }) {
2212
+ let t = Ce(), [a, o] = bt(), { data: c } = i(), d = n(), [f, h] = G(!1), [g, _] = G(!1), { filters: y, filterError: x, activeCount: S, setFilters: C, clearFilters: T } = ct(), E = ee((e) => e.user), D = ee((e) => e.activeTenant), te = l(), O = c?.screens[e], k = O?.entity ? c?.entities[O.entity] : void 0, A = O?.entity, ae = m(k, "create"), j = m(k, "update"), oe = m(k, "delete"), M = c?.actions, se = U(() => p(ce(k?.actions, O?.actions, "list_toolbar", M), k), [
2206
2213
  k,
2207
2214
  O?.actions,
2208
2215
  M
2209
- ]), P = G(() => p(se(k?.actions, void 0, "list_floatbar", M), k), [k, M]), F = G(() => {
2216
+ ]), N = U(() => p(ce(k?.actions, void 0, "list_floatbar", M), k), [k, M]), P = U(() => {
2210
2217
  let e = /* @__PURE__ */ new Map(), t = (t) => {
2211
- for (let n of se(k?.actions, t, "list_row", M)) e.set(n.code, n);
2218
+ for (let n of ce(k?.actions, t, "list_row", M)) e.set(n.code, n);
2212
2219
  };
2213
2220
  t(O?.row_actions);
2214
2221
  for (let e of O?.variants?.items() ?? []) e.row_actions !== void 0 && t(e.row_actions);
@@ -2217,20 +2224,20 @@ function Dn({ screenCode: e }) {
2217
2224
  k,
2218
2225
  O,
2219
2226
  M
2220
- ]), le = O?.row_actions !== void 0, fe = G(() => P.length > 0 || k?.export?.enabled !== !1 && O?.export?.enabled !== !1, [
2221
- P,
2227
+ ]), ue = O?.row_actions !== void 0, pe = U(() => N.length > 0 || k?.export?.enabled !== !1 && O?.export?.enabled !== !1, [
2228
+ N,
2222
2229
  k?.export?.enabled,
2223
2230
  O?.export?.enabled
2224
- ]), pe = !!k?.soft_delete, me = pe && (E?.permissions ?? []).some((e) => e === "feature:view_deleted" || e === "feature:*" || e === "*"), he = me && a.get("include_deleted") === "true", ge = ne(), { openTab: ye, updateTabSearch: be, findTabByPathname: Ce } = _e();
2225
- $e(O, k, a.toString()), et(O?.route);
2226
- let Te = U((e) => {
2227
- if (!O?.route || !k || ge.enabled) return;
2228
- let t = Ce(O.route);
2231
+ ]), me = !!k?.soft_delete, he = me && (E?.permissions ?? []).some((e) => e === "feature:view_deleted" || e === "feature:*" || e === "*"), ge = he && a.get("include_deleted") === "true", _e = ne(), { openTab: be, updateTabSearch: xe, findTabByPathname: we } = ve();
2232
+ et(O, k, a.toString()), tt(O?.route);
2233
+ let Ee = V((e) => {
2234
+ if (!O?.route || !k || _e.enabled) return;
2235
+ let t = we(O.route);
2229
2236
  if (t) {
2230
- be(t.id, e);
2237
+ xe(t.id, e);
2231
2238
  return;
2232
2239
  }
2233
- ye({
2240
+ be({
2234
2241
  pathname: O.route,
2235
2242
  search: e,
2236
2243
  title: s(O.display?.name) || s(k.display.name_plural),
@@ -2240,28 +2247,28 @@ function Dn({ screenCode: e }) {
2240
2247
  }, [
2241
2248
  O,
2242
2249
  k,
2243
- ge.enabled,
2244
- Ce,
2245
- be,
2246
- ye
2247
- ]), De = parseInt(a.get("page") ?? "1", 10), Oe = (() => {
2250
+ _e.enabled,
2251
+ we,
2252
+ xe,
2253
+ be
2254
+ ]), Oe = parseInt(a.get("page") ?? "1", 10), ke = (() => {
2248
2255
  let e = parseInt(a.get("per_page") ?? "", 10);
2249
2256
  return !Number.isFinite(e) || e <= 0 || e > 1e3 ? 200 : e;
2250
- })(), ke = a.get("search") ?? "", Me = Dt({
2257
+ })(), Ae = a.get("search") ?? "", Ne = Ft({
2251
2258
  searchParams: a,
2252
2259
  setSearchParams: o,
2253
2260
  screenSortDefault: O?.sort_default,
2254
- commitScreenTabSearch: Te
2255
- }), { cols: Ne, nullsByField: Pe, forRequest: Fe, tableSorting: Ie, write: Re, applyColumn: ze, shiftClickColumn: Be, appendColumn: Ve, clearColumn: Ue, clearAll: Ke } = Me, Je = G(() => Et(O, k, c?.entities), [
2261
+ commitScreenTabSearch: Ee
2262
+ }), { cols: Pe, nullsByField: Fe, forRequest: Ie, tableSorting: Le, write: ze, applyColumn: Be, shiftClickColumn: Ve, appendColumn: He, clearColumn: We, clearAll: qe } = Ne, Ye = U(() => Pt(O, k, c?.entities), [
2256
2263
  O,
2257
2264
  k,
2258
2265
  c?.entities
2259
- ]), Ye = Mt({
2266
+ ]), Xe = Bt({
2260
2267
  screenCode: e,
2261
2268
  screen: O,
2262
2269
  searchParams: a,
2263
2270
  setSearchParams: o
2264
- }), { visible: L, sizing: Ze, setSizing: rt, apply: it, commitResize: ot } = Ye, ct = on({
2271
+ }), { visible: I, sizing: Qe, setSizing: it, apply: at, commitResize: st } = Xe, lt = hn({
2265
2272
  screenCode: e,
2266
2273
  screen: O,
2267
2274
  searchParams: a,
@@ -2270,63 +2277,63 @@ function Dn({ screenCode: e }) {
2270
2277
  tenantId: D?.id,
2271
2278
  filterError: !!x,
2272
2279
  filters: y,
2273
- visibleColumns: L,
2274
- sort: Fe
2275
- }), { active: R, saveAsNew: lt, overwriteActive: ut, isSaving: dt } = ct, ft = re(ke, 300), z = ie(), B = G(() => {
2276
- let e = O?.responsive?.[z.category]?.presentation;
2277
- return e === "table" || e === "cards" ? e : z.category === "phone" ? "cards" : "table";
2278
- }, [O?.responsive, z.category]), pt = G(() => Xe({
2280
+ visibleColumns: I,
2281
+ sort: Ie
2282
+ }), { active: ut, saveAsNew: dt, overwriteActive: ft, isSaving: pt } = lt, mt = re(Ae, 300), L = ie(), R = U(() => {
2283
+ let e = O?.responsive?.[L.category]?.presentation;
2284
+ return e === "table" || e === "cards" ? e : L.category === "phone" ? "cards" : "table";
2285
+ }, [O?.responsive, L.category]), ht = U(() => Ze({
2279
2286
  entity: k,
2280
2287
  screen: O,
2281
- savedViewColumns: R?.columns
2288
+ savedViewColumns: ut?.columns
2282
2289
  }), [
2283
2290
  k,
2284
2291
  O,
2285
- R?.columns
2286
- ]), V = G(() => Ge({
2292
+ ut?.columns
2293
+ ]), z = U(() => Ke({
2287
2294
  entity: k,
2288
2295
  screen: O,
2289
- presentation: B,
2290
- visibleColumns: L,
2291
- card: pt,
2292
- rowActions: F,
2293
- toolbarActions: N,
2294
- bulkActions: P,
2295
- sort: Ne,
2296
+ presentation: R,
2297
+ visibleColumns: I,
2298
+ card: ht,
2299
+ rowActions: P,
2300
+ toolbarActions: se,
2301
+ bulkActions: N,
2302
+ sort: Pe,
2296
2303
  screens: c?.screens
2297
2304
  }), [
2298
2305
  k,
2299
2306
  O,
2300
- B,
2301
- L,
2302
- pt,
2303
- F,
2304
- N,
2307
+ R,
2308
+ I,
2309
+ ht,
2305
2310
  P,
2306
- Ne,
2311
+ se,
2312
+ N,
2313
+ Pe,
2307
2314
  c?.screens
2308
- ]), _t = ht({
2315
+ ]), yt = _t({
2309
2316
  entity: k,
2310
2317
  entityCode: A,
2311
2318
  screen: O,
2312
2319
  screenCode: e,
2313
- page: De,
2314
- perPage: Oe,
2315
- sortForRequest: Fe,
2316
- debouncedSearch: ft,
2320
+ page: Oe,
2321
+ perPage: ke,
2322
+ sortForRequest: Ie,
2323
+ debouncedSearch: mt,
2317
2324
  filters: y,
2318
2325
  filterError: !!x,
2319
- includeDeleted: he,
2320
- expand: V.expandFields,
2321
- select: V.selectFields,
2326
+ includeDeleted: ge,
2327
+ expand: z.expandFields,
2328
+ select: z.selectFields,
2322
2329
  runCountQuery: !0,
2323
2330
  urlKey: `${A ?? ""}|${a.toString()}`
2324
- }), { rows: H, meta: yt, refs: bt, isLoading: xt, isFetching: Tt, isError: Ot, error: At, isLoadingStale: Nt, retry: Pt, countTotal: Ft, countStrategy: It, countLoading: Rt, countError: zt, totalPages: Z, hasMorePages: Vt, isCursor: Ht, fetchNextPage: Ut, isFetchingNextPage: Wt } = _t, Kt = jt(k, H, Tt), { state: Jt, setState: Zt, ids: Qt, pkValues: $t, rows: en, keyOf: tn } = Kt, rn = we((e) => e.degradedEntities), an = Ee(k?.realtime, rn, A ?? ""), cn = xe(A ?? ""), un = K(bt);
2325
- un.current = bt;
2326
- let mn = G(() => {
2331
+ }), { rows: B, meta: xt, refs: St, isLoading: Ct, isFetching: wt, isError: Tt, error: Et, isLoadingStale: Dt, retry: Ot, countTotal: kt, countStrategy: Nt, countLoading: It, countError: Rt, totalPages: Vt, hasMorePages: Ht, isCursor: Ut, fetchNextPage: Wt, isFetchingNextPage: Kt } = yt, qt = zt(k, B, wt), { state: Jt, setState: Xt, ids: Zt, pkValues: Qt, rows: $t, keyOf: tn } = qt, rn = Te((e) => e.degradedEntities), sn = De(k?.realtime, rn, A ?? ""), cn = Se(A ?? ""), ln = W(St);
2332
+ ln.current = St;
2333
+ let un = U(() => {
2327
2334
  let e = /* @__PURE__ */ new Map();
2328
2335
  if (!k) return e;
2329
- for (let t of He(k, O, R?.columns)) {
2336
+ for (let t of Ue(k, O, ut?.columns)) {
2330
2337
  if (t.startsWith("$") || k.files?.get(t)) continue;
2331
2338
  let n = k.fields.get(t);
2332
2339
  n && e.set(t, u({
@@ -2336,7 +2343,7 @@ function Dn({ screenCode: e }) {
2336
2343
  entity: k,
2337
2344
  entities: c?.entities,
2338
2345
  screens: c?.screens,
2339
- refs: () => un.current,
2346
+ refs: () => ln.current,
2340
2347
  locale: d
2341
2348
  }));
2342
2349
  }
@@ -2344,104 +2351,102 @@ function Dn({ screenCode: e }) {
2344
2351
  }, [
2345
2352
  k,
2346
2353
  O,
2347
- R?.columns,
2354
+ ut?.columns,
2348
2355
  c?.entities,
2349
2356
  c?.screens,
2350
- un,
2357
+ ln,
2351
2358
  d
2352
- ]), { labelFor: hn, refs: gn } = ln(Je, y, bt, c?.entities), _n = Lt({
2359
+ ]), { labelFor: dn, refs: pn } = vn(Ye, y, St, c?.entities), mn = Gt({
2353
2360
  entity: k,
2354
2361
  screen: O,
2355
2362
  screens: c?.screens,
2356
2363
  entities: c?.entities,
2357
2364
  searchParams: a,
2358
2365
  tabNavigate: t,
2359
- commitScreenTabSearch: Te,
2360
- isPhone: z.category === "phone",
2366
+ commitScreenTabSearch: Ee,
2367
+ isPhone: L.category === "phone",
2361
2368
  canUpdate: j
2362
- }), { peekAllowed: vn, peekRow: Q, setPeekRow: xn, peekFields: Sn, peekActions: Cn, peekExecute: En, contextMenu: Dn, setContextMenu: On } = _n, kn = G(() => !O || !k ? !1 : v(O, "_", k, c?.screens) !== null, [
2369
+ }), { peekAllowed: _n, peekRow: Y, setPeekRow: X, peekFields: Sn, peekActions: Cn, peekExecute: wn, contextMenu: Z, setContextMenu: Tn } = mn, On = U(() => !O || !k ? !1 : v(O, "_", k, c?.screens) !== null, [
2363
2370
  O,
2364
2371
  k,
2365
2372
  c?.screens
2366
- ]), An = G(() => yn({
2367
- visibleCols: L,
2373
+ ]), Q = U(() => En({
2374
+ visibleCols: I,
2368
2375
  entity: k,
2369
2376
  screen: O,
2370
2377
  schema: c,
2371
2378
  entityCode: A,
2372
- rowActions: F,
2373
- hasBatchActions: fe,
2374
- hasExplicitRowActions: le,
2379
+ rowActions: P,
2380
+ hasBatchActions: pe,
2381
+ hasExplicitRowActions: ue,
2375
2382
  canUpdate: j,
2376
2383
  canDelete: oe,
2377
- peekEnabled: vn,
2378
- hasDetailTarget: kn,
2384
+ peekEnabled: _n,
2385
+ hasDetailTarget: On,
2379
2386
  userLocale: d,
2380
2387
  tabNavigate: t,
2381
- refsRef: un,
2382
- rowSelectionKey: kt,
2383
- setPeekRow: xn
2388
+ refsRef: ln,
2389
+ rowSelectionKey: Lt,
2390
+ setPeekRow: X
2384
2391
  }), [
2385
2392
  O,
2386
2393
  k,
2387
- L,
2394
+ I,
2388
2395
  t,
2389
- fe,
2390
- F,
2391
- le,
2396
+ pe,
2397
+ P,
2398
+ ue,
2392
2399
  A,
2393
- vn,
2394
- kn,
2400
+ _n,
2401
+ On,
2395
2402
  c,
2396
2403
  d,
2397
2404
  j,
2398
2405
  oe,
2399
- un,
2400
- xn
2401
- ]), jn = Ct({
2402
- data: H,
2403
- columns: An,
2404
- getCoreRowModel: St(),
2406
+ ln,
2407
+ X
2408
+ ]), $ = At({
2409
+ features: Mt,
2410
+ data: B,
2411
+ columns: Q,
2405
2412
  manualSorting: !0,
2406
- manualPagination: !0,
2407
2413
  enableColumnResizing: !0,
2408
2414
  columnResizeMode: "onChange",
2409
- onColumnSizingChange: rt,
2415
+ onColumnSizingChange: it,
2410
2416
  state: {
2411
- sorting: Ie,
2417
+ sorting: Le,
2412
2418
  rowSelection: Jt,
2413
- columnSizing: Ze
2419
+ columnSizing: Qe
2414
2420
  },
2415
2421
  onSortingChange: (e) => {
2416
- let t = (typeof e == "function" ? e(Ie) : e).slice(0, 5);
2422
+ let t = (typeof e == "function" ? e(Le) : e).slice(0, 5);
2417
2423
  if (t.length === 0) {
2418
- Re([]);
2424
+ ze([]);
2419
2425
  return;
2420
2426
  }
2421
2427
  let n = t.map((e) => {
2422
- let t = Pe.get(e.id);
2428
+ let t = Fe.get(e.id);
2423
2429
  return {
2424
2430
  field: e.id,
2425
2431
  dir: e.desc ? "desc" : "asc",
2426
2432
  ...t ? { nulls: t } : {}
2427
2433
  };
2428
2434
  });
2429
- Re(n);
2435
+ ze(n);
2430
2436
  },
2431
- onRowSelectionChange: Zt,
2432
- getRowId: tn,
2433
- rowCount: Ft ?? H.length
2434
- }), Mn = jn.getState().columnSizingInfo.isResizingColumn, Nn = K(!1);
2435
- W(() => {
2436
- let e = !!Nn.current && !Mn;
2437
- Nn.current = Mn, e && ot(jn.getState().columnSizing);
2437
+ onRowSelectionChange: Xt,
2438
+ getRowId: tn
2439
+ }), jn = $.state.columnResizing.isResizingColumn, Mn = W(!1);
2440
+ H(() => {
2441
+ let e = !!Mn.current && !jn;
2442
+ Mn.current = jn, e && st($.state.columnSizing);
2438
2443
  }, [
2439
- Mn,
2440
- ot,
2441
- jn
2444
+ jn,
2445
+ st,
2446
+ $
2442
2447
  ]);
2443
- let Pn = Bt(jn), Fn = jn.getTotalSize();
2444
- W(() => {
2448
+ let Nn = Yt($), Pn = $.getTotalSize();
2449
+ H(() => {
2445
2450
  let e = (e) => {
2446
2451
  let t = e.target?.tagName;
2447
2452
  if (t === "INPUT" || t === "TEXTAREA" || t === "SELECT") {
@@ -2452,68 +2457,68 @@ function Dn({ screenCode: e }) {
2452
2457
  };
2453
2458
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
2454
2459
  }, []);
2455
- let In = K(null), { rows: Ln } = jn.getRowModel(), Rn = K(null), zn = wn({
2456
- visibleCols: L,
2457
- onReorder: it,
2458
- scrollElRef: In,
2459
- theadRef: Rn
2460
- }), Bn = ve((e) => e.density), Vn = ve((e) => e.zebra), Hn = de(), $ = wt({
2461
- count: Ln.length,
2462
- getScrollElement: () => In.current,
2463
- estimateSize: () => B === "cards" ? 142 : 48,
2460
+ let Fn = W(null), { rows: In } = $.getRowModel(), Ln = W(null), Rn = kn({
2461
+ visibleCols: I,
2462
+ onReorder: at,
2463
+ scrollElRef: Fn,
2464
+ theadRef: Ln
2465
+ }), zn = ye((e) => e.density), Bn = ye((e) => e.zebra), Vn = fe(), Hn = jt({
2466
+ count: In.length,
2467
+ getScrollElement: () => Fn.current,
2468
+ estimateSize: () => R === "cards" ? 142 : 48,
2464
2469
  overscan: 10,
2465
- initialOffset: Hn
2466
- }), Un = G(() => Ln.map((e) => e.id), [Ln]);
2467
- ue({
2468
- virtualizer: $,
2469
- scrollElementRef: In,
2470
+ initialOffset: Vn
2471
+ }), Un = U(() => In.map((e) => e.id), [In]);
2472
+ de({
2473
+ virtualizer: Hn,
2474
+ scrollElementRef: Fn,
2470
2475
  rowKeys: Un
2471
- }), W(() => {
2472
- $.measure();
2473
- }, [Bn, $]), W(() => {
2474
- $.measure();
2476
+ }), H(() => {
2477
+ Hn.measure();
2478
+ }, [zn, Hn]), H(() => {
2479
+ Hn.measure();
2475
2480
  }, [
2476
- z.width,
2477
- z.height,
2478
- B,
2479
- $
2481
+ L.width,
2482
+ L.height,
2483
+ R,
2484
+ Hn
2480
2485
  ]);
2481
- let Wn = U((e) => {
2486
+ let Wn = V((e) => {
2482
2487
  o((t) => {
2483
2488
  let n = new URLSearchParams(t);
2484
2489
  return e ? n.set("search", e) : n.delete("search"), n.set("page", "1"), n;
2485
2490
  });
2486
- }, [o]), Gn = U(() => {
2491
+ }, [o]), Gn = V(() => {
2487
2492
  o((e) => {
2488
2493
  let t = new URLSearchParams(e);
2489
2494
  return t.get("include_deleted") ? t.delete("include_deleted") : t.set("include_deleted", "true"), t.set("page", "1"), t;
2490
2495
  });
2491
- }, [o]), Kn = U((e) => {
2496
+ }, [o]), Kn = V((e) => {
2492
2497
  o((t) => {
2493
2498
  let n = new URLSearchParams(t);
2494
2499
  return n.set("page", String(e)), n;
2495
2500
  });
2496
2501
  }, [o]);
2497
- W(() => {
2498
- Z !== void 0 && De > Z && Kn(Z);
2502
+ H(() => {
2503
+ Vt !== void 0 && Oe > Vt && Kn(Vt);
2499
2504
  }, [
2500
- Z,
2501
- De,
2505
+ Vt,
2506
+ Oe,
2502
2507
  Kn
2503
2508
  ]);
2504
- let qn = U((e) => {
2509
+ let qn = V((e) => {
2505
2510
  o((t) => {
2506
2511
  let n = new URLSearchParams(t);
2507
2512
  return n.set("per_page", String(e)), n.set("page", "1"), n;
2508
2513
  });
2509
2514
  }, [o]);
2510
2515
  if (!O || !k) return null;
2511
- let Jn = k.display, Yn = s(O.display?.name) || s(Jn.name), Xn = O.display?.icon || Jn.icon, Zn = s(O.display?.description) || s(Jn.description), Qn = z.category === "phone", $n = B === "cards", er = $t.map((e) => r(k, e)), tr = {
2516
+ let Jn = k.display, Yn = s(O.display?.name) || s(Jn.name), Xn = O.display?.icon || Jn.icon, Zn = s(O.display?.description) || s(Jn.description), Qn = L.category === "phone", $n = R === "cards", er = Qt.map((e) => r(k, e)), tr = {
2512
2517
  entity: k,
2513
2518
  entityCode: A ?? "",
2514
2519
  screen: O,
2515
2520
  screenRoute: O.route,
2516
- selectedRows: en,
2521
+ selectedRows: $t,
2517
2522
  selectedIds: er,
2518
2523
  locale: d,
2519
2524
  tabNavigate: (e, n) => t(e, {
@@ -2523,7 +2528,7 @@ function Dn({ screenCode: e }) {
2523
2528
  }),
2524
2529
  runActionApi: (e, t) => b(e, t)
2525
2530
  };
2526
- return /* @__PURE__ */ X("div", {
2531
+ return /* @__PURE__ */ J("div", {
2527
2532
  style: {
2528
2533
  display: "flex",
2529
2534
  flexDirection: "column",
@@ -2531,20 +2536,20 @@ function Dn({ screenCode: e }) {
2531
2536
  background: "var(--background)"
2532
2537
  },
2533
2538
  children: [
2534
- /* @__PURE__ */ X(J, { children: [
2535
- /* @__PURE__ */ Y(fn, {
2539
+ /* @__PURE__ */ J(K, { children: [
2540
+ /* @__PURE__ */ q(bn, {
2536
2541
  title: Yn,
2537
2542
  description: Zn,
2538
- toolbarActions: N,
2543
+ toolbarActions: se,
2539
2544
  screenActionLayout: O.action_layout,
2540
2545
  entityActionLayout: k.action_layout,
2541
- selectedIds: Qt,
2542
- data: H,
2546
+ selectedIds: Zt,
2547
+ data: B,
2543
2548
  rowKey: tn,
2544
- onActionSuccess: () => Zt({}),
2549
+ onActionSuccess: () => Xt({}),
2545
2550
  widgetContext: tr
2546
2551
  }),
2547
- /* @__PURE__ */ Y(nn, {
2552
+ /* @__PURE__ */ q(fn, {
2548
2553
  screen: O,
2549
2554
  entity: k,
2550
2555
  entityCode: A,
@@ -2554,28 +2559,28 @@ function Dn({ screenCode: e }) {
2554
2559
  locale: d,
2555
2560
  isPhone: Qn,
2556
2561
  isCardsPresentation: $n,
2557
- sort: Me,
2558
- columns: Ye,
2559
- views: ct,
2560
- query: _t,
2561
- selection: Kt,
2562
+ sort: Ne,
2563
+ columns: Xe,
2564
+ views: lt,
2565
+ query: yt,
2566
+ selection: qt,
2562
2567
  filters: {
2563
2568
  json: y,
2564
- debouncedSearch: ft,
2569
+ debouncedSearch: mt,
2565
2570
  count: S,
2566
2571
  onOpen: () => h(!0)
2567
2572
  },
2568
- searchValue: ke,
2573
+ searchValue: Ae,
2569
2574
  onSearchChange: Wn,
2570
2575
  onSaveView: () => _(!0),
2571
- page: De,
2572
- perPage: Oe,
2573
- includeDeleted: he,
2574
- canViewDeleted: me,
2576
+ page: Oe,
2577
+ perPage: ke,
2578
+ includeDeleted: ge,
2579
+ canViewDeleted: he,
2575
2580
  onToggleDeleted: Gn,
2576
- isLive: an
2581
+ isLive: sn
2577
2582
  }),
2578
- x && /* @__PURE__ */ X("div", {
2583
+ x && /* @__PURE__ */ J("div", {
2579
2584
  role: "alert",
2580
2585
  "data-testid": "filter-url-error",
2581
2586
  style: {
@@ -2589,19 +2594,19 @@ function Dn({ screenCode: e }) {
2589
2594
  alignItems: "center",
2590
2595
  gap: 8
2591
2596
  },
2592
- children: [/* @__PURE__ */ X("span", { children: [x, " Showing this list without URL filters."] }), /* @__PURE__ */ Y(w, {
2597
+ children: [/* @__PURE__ */ J("span", { children: [x, " Showing this list without URL filters."] }), /* @__PURE__ */ q(w, {
2593
2598
  kind: "ghost",
2594
2599
  size: "xs",
2595
2600
  onClick: T,
2596
2601
  children: "Clear"
2597
2602
  })]
2598
2603
  }),
2599
- y.length > 0 && /* @__PURE__ */ Y("div", {
2604
+ y.length > 0 && /* @__PURE__ */ q("div", {
2600
2605
  style: { padding: "0 20px 10px" },
2601
- children: /* @__PURE__ */ Y(nt, {
2606
+ children: /* @__PURE__ */ q(rt, {
2602
2607
  filters: y,
2603
- resolveValue: hn,
2604
- onRemove: (e) => C(Qe(y, e)),
2608
+ resolveValue: dn,
2609
+ onRemove: (e) => C($e(y, e)),
2605
2610
  onClearAll: T,
2606
2611
  onChipClick: () => h(!0),
2607
2612
  fieldLabel: (e) => {
@@ -2614,27 +2619,27 @@ function Dn({ screenCode: e }) {
2614
2619
  return n ? s(n.name) || t : e;
2615
2620
  }
2616
2621
  let t = k.fields.get(e);
2617
- return t ? ce(t, e, c?.entities) : e;
2622
+ return t ? le(t, e, c?.entities) : e;
2618
2623
  }
2619
2624
  })
2620
2625
  })
2621
2626
  ] }),
2622
- /* @__PURE__ */ Y(Yt, {
2623
- isLoading: xt,
2624
- tableLoadingStale: Nt,
2625
- isError: Ot,
2626
- error: At,
2627
- rowCount: H.length,
2627
+ /* @__PURE__ */ q(an, {
2628
+ isLoading: Ct,
2629
+ tableLoadingStale: Dt,
2630
+ isError: Tt,
2631
+ error: Et,
2632
+ rowCount: B.length,
2628
2633
  entity: k,
2629
2634
  screen: O,
2630
2635
  screenName: Yn,
2631
2636
  screenIcon: Xn,
2632
- isFiltered: !!ft || S > 0,
2637
+ isFiltered: !!mt || S > 0,
2633
2638
  canCreate: ae,
2634
- toolbarActions: N,
2635
- onRetry: Pt
2639
+ toolbarActions: se,
2640
+ onRetry: Ot
2636
2641
  }),
2637
- xt || Ot || H.length === 0 ? null : /* @__PURE__ */ Y("div", {
2642
+ Ct || Tt || B.length === 0 ? null : /* @__PURE__ */ q("div", {
2638
2643
  style: {
2639
2644
  flex: 1,
2640
2645
  minHeight: 0,
@@ -2642,7 +2647,7 @@ function Dn({ screenCode: e }) {
2642
2647
  display: "flex",
2643
2648
  flexDirection: "column"
2644
2649
  },
2645
- children: /* @__PURE__ */ X("div", {
2650
+ children: /* @__PURE__ */ J("div", {
2646
2651
  style: {
2647
2652
  background: "var(--surface)",
2648
2653
  border: "1px solid var(--border)",
@@ -2654,186 +2659,186 @@ function Dn({ screenCode: e }) {
2654
2659
  flex: 1,
2655
2660
  minHeight: 0
2656
2661
  },
2657
- children: [/* @__PURE__ */ Y("div", {
2658
- ref: In,
2662
+ children: [/* @__PURE__ */ q("div", {
2663
+ ref: Fn,
2659
2664
  "data-testid": "list-scroll",
2660
- "data-presentation": B,
2665
+ "data-presentation": R,
2661
2666
  style: {
2662
2667
  overflow: "auto",
2663
2668
  flex: 1,
2664
2669
  minHeight: 0
2665
2670
  },
2666
- children: B === "cards" ? /* @__PURE__ */ Y(gt, {
2671
+ children: R === "cards" ? /* @__PURE__ */ q(vt, {
2667
2672
  fallback: null,
2668
- children: /* @__PURE__ */ Y(Tn, {
2669
- rows: Ln,
2670
- virtualizer: $,
2673
+ children: /* @__PURE__ */ q(An, {
2674
+ rows: In,
2675
+ virtualizer: Hn,
2671
2676
  entity: k,
2672
2677
  screen: O,
2673
2678
  entityCode: A,
2674
2679
  entities: c?.entities,
2675
- savedViewColumns: R?.columns,
2676
- refs: un.current,
2680
+ savedViewColumns: ut?.columns,
2681
+ refs: ln.current,
2677
2682
  locale: d,
2678
- renderers: mn,
2679
- rowActions: F,
2683
+ renderers: un,
2684
+ rowActions: P,
2680
2685
  tabNavigate: t,
2681
- interaction: _n,
2682
- hasSoftDelete: pe,
2683
- zebra: Vn,
2684
- hasBatchActions: fe,
2685
- hasDetailTarget: kn,
2686
+ interaction: mn,
2687
+ hasSoftDelete: me,
2688
+ zebra: Bn,
2689
+ hasBatchActions: pe,
2690
+ hasDetailTarget: On,
2686
2691
  rowKey: tn
2687
2692
  })
2688
- }) : /* @__PURE__ */ Y(Gt, {
2689
- table: jn,
2690
- columns: An,
2691
- rows: Ln,
2693
+ }) : /* @__PURE__ */ q(en, {
2694
+ table: $,
2695
+ columns: Q,
2696
+ rows: In,
2692
2697
  entity: k,
2693
- columnSizeVars: Pn,
2694
- totalColumnsWidth: Fn,
2695
- theadRef: Rn,
2696
- virtualizer: $,
2697
- visibleCols: L,
2698
- headerReorder: zn,
2699
- sortCols: Ne,
2700
- sortNullsMap: Pe,
2701
- shiftClickColumn: Be,
2702
- applyColumnSort: ze,
2703
- appendColumnSort: Ve,
2704
- clearColumnSort: Ue,
2705
- clearAllSorts: Ke,
2706
- renderRow: (e, t) => /* @__PURE__ */ Y(qt, {
2698
+ columnSizeVars: Nn,
2699
+ totalColumnsWidth: Pn,
2700
+ theadRef: Ln,
2701
+ virtualizer: Hn,
2702
+ visibleCols: I,
2703
+ headerReorder: Rn,
2704
+ sortCols: Pe,
2705
+ sortNullsMap: Fe,
2706
+ shiftClickColumn: Ve,
2707
+ applyColumnSort: Be,
2708
+ appendColumnSort: He,
2709
+ clearColumnSort: We,
2710
+ clearAllSorts: qe,
2711
+ renderRow: (e, t) => /* @__PURE__ */ q(nn, {
2707
2712
  row: e,
2708
2713
  rowIndex: t,
2709
2714
  entity: k,
2710
- hasSoftDelete: pe,
2711
- zebra: Vn,
2712
- hasDetailTarget: kn,
2713
- interaction: _n,
2714
- measureElement: $.measureElement
2715
+ hasSoftDelete: me,
2716
+ zebra: Bn,
2717
+ hasDetailTarget: On,
2718
+ interaction: mn,
2719
+ measureElement: Hn.measureElement
2715
2720
  }, e.id),
2716
- isResizingColumn: Mn
2721
+ isResizingColumn: jn
2717
2722
  })
2718
- }), /* @__PURE__ */ Y(Xt, {
2719
- meta: yt,
2720
- isCursor: Ht,
2723
+ }), /* @__PURE__ */ q(on, {
2724
+ meta: xt,
2725
+ isCursor: Ut,
2721
2726
  isPhone: Qn,
2722
- rowsLoaded: H.length,
2723
- selectedCount: Qt.length,
2724
- countTotal: Ft,
2725
- countStrategy: It,
2726
- countLoading: Rt,
2727
- countError: zt,
2728
- page: De,
2729
- totalPages: Z,
2727
+ rowsLoaded: B.length,
2728
+ selectedCount: Zt.length,
2729
+ countTotal: kt,
2730
+ countStrategy: Nt,
2731
+ countLoading: It,
2732
+ countError: Rt,
2733
+ page: Oe,
2734
+ totalPages: Vt,
2730
2735
  goToPage: Kn,
2731
- perPage: Oe,
2736
+ perPage: ke,
2732
2737
  setPerPage: qn,
2733
- hasMorePages: Vt,
2734
- fetchNextPage: Ut,
2735
- isFetchingNextPage: Wt
2738
+ hasMorePages: Ht,
2739
+ fetchNextPage: Wt,
2740
+ isFetchingNextPage: Kt
2736
2741
  })]
2737
2742
  })
2738
2743
  }),
2739
- /* @__PURE__ */ Y(at, {
2744
+ /* @__PURE__ */ q(ot, {
2740
2745
  open: f,
2741
2746
  onClose: () => h(!1),
2742
2747
  filters: y,
2743
2748
  onApply: C,
2744
- availableFields: Je,
2749
+ availableFields: Ye,
2745
2750
  defaultFilters: O?.default_filters,
2746
- refs: gn
2751
+ refs: pn
2747
2752
  }),
2748
- /* @__PURE__ */ Y(dn, {
2753
+ /* @__PURE__ */ q(yn, {
2749
2754
  open: g,
2750
- pending: dt,
2755
+ pending: pt,
2751
2756
  onClose: () => _(!1),
2752
- overwriteViewName: sn(R),
2757
+ overwriteViewName: gn(ut),
2753
2758
  onOverwrite: async () => {
2754
- await ut(), _(!1);
2759
+ await ft(), _(!1);
2755
2760
  },
2756
2761
  onSave: async (e) => {
2757
- await lt(e), _(!1);
2762
+ await dt(e), _(!1);
2758
2763
  }
2759
2764
  }),
2760
- Qt.length > 0 && /* @__PURE__ */ Y(pn, {
2761
- selectedIds: Qt,
2762
- floatbarActions: P,
2765
+ Zt.length > 0 && /* @__PURE__ */ q(xn, {
2766
+ selectedIds: Zt,
2767
+ floatbarActions: N,
2763
2768
  screenActionLayout: O.action_layout,
2764
2769
  entityActionLayout: k.action_layout,
2765
- data: H,
2770
+ data: B,
2766
2771
  rowKey: tn,
2767
2772
  entityCode: A,
2768
2773
  entity: k,
2769
2774
  screen: O,
2770
- onClear: () => Zt({}),
2771
- onActionSuccess: () => Zt({}),
2775
+ onClear: () => Xt({}),
2776
+ onActionSuccess: () => Xt({}),
2772
2777
  widgetContext: tr
2773
2778
  }),
2774
- Dn && k && O && /* @__PURE__ */ Y(bn, {
2775
- x: Dn.x,
2776
- y: Dn.y,
2777
- row: Dn.row,
2778
- rowId: tn(Dn.row),
2779
+ Z && k && O && /* @__PURE__ */ q(Dn, {
2780
+ x: Z.x,
2781
+ y: Z.y,
2782
+ row: Z.row,
2783
+ rowId: tn(Z.row),
2779
2784
  screen: O,
2780
2785
  fullScreen: O,
2781
2786
  entity: k,
2782
2787
  entityCode: A,
2783
- rowActions: F,
2788
+ rowActions: P,
2784
2789
  tabNavigate: t,
2785
2790
  locale: d,
2786
- peekAllowed: vn,
2787
- hasDetailTarget: kn,
2788
- onPeek: xn,
2789
- onClose: () => On(null)
2791
+ peekAllowed: _n,
2792
+ hasDetailTarget: On,
2793
+ onPeek: X,
2794
+ onClose: () => Tn(null)
2790
2795
  }),
2791
- vn && Q && k && /* @__PURE__ */ Y(tt, {
2796
+ _n && Y && k && /* @__PURE__ */ q(nt, {
2792
2797
  entity: k,
2793
2798
  entityCode: A,
2794
- record: Q,
2799
+ record: Y,
2795
2800
  title: (() => {
2796
2801
  let e = O.columns?.find((e) => !e.startsWith("$status.") && !e.startsWith("$property."));
2797
- return e ? I(Q[e] ?? s(k.display.name)) : s(k.display.name);
2802
+ return e ? F(Y[e] ?? s(k.display.name)) : s(k.display.name);
2798
2803
  })(),
2799
2804
  recordId: (() => {
2800
2805
  let e = k.fields.names()?.find((e) => k.fields.get(e)?.primary);
2801
- return e ? I(Q[e]) : void 0;
2806
+ return e ? F(Y[e]) : void 0;
2802
2807
  })(),
2803
2808
  fields: Sn,
2804
- screen: Le(k, O, Q),
2809
+ screen: Re(k, O, Y),
2805
2810
  actions: Cn,
2806
- screenActionLayout: Le(k, O, Q)?.action_layout,
2811
+ screenActionLayout: Re(k, O, Y)?.action_layout,
2807
2812
  entityActionLayout: k.action_layout,
2808
- executeAction: En,
2813
+ executeAction: wn,
2809
2814
  onClose: () => {
2810
- if (k && Q) {
2815
+ if (k && Y) {
2811
2816
  let e = k.fields.names()?.find((e) => k.fields.get(e)?.primary);
2812
- e && mt(I(Q[e]));
2817
+ e && gt(F(Y[e]));
2813
2818
  }
2814
- xn(null);
2819
+ X(null);
2815
2820
  },
2816
2821
  onOpen: (e) => {
2817
- let t = Q;
2818
- xn(null), _n.navigateToDetail(t, { draft: e });
2822
+ let t = Y;
2823
+ X(null), mn.navigateToDetail(t, { draft: e });
2819
2824
  },
2820
2825
  onSave: (e) => {
2821
- xn(e);
2826
+ X(e);
2822
2827
  let t = k.fields.names()?.find((e) => k.fields.get(e)?.primary);
2823
2828
  if (!t) return;
2824
- let n = I(e[t]), r = {};
2829
+ let n = F(e[t]), r = {};
2825
2830
  for (let t of k.fields.names()) {
2826
- let n = Ae(k, e, t), i = Ae(k, Q, t), a = je(k, t, n), o = je(k, t, i);
2831
+ let n = je(k, e, t), i = je(k, Y, t), a = Me(k, t, n), o = Me(k, t, i);
2827
2832
  (a === "" ? null : a) !== (o === "" || o === void 0 ? null : o) && (r[t] = a);
2828
2833
  }
2829
- let i = qe({
2834
+ let i = Je({
2830
2835
  entity: k,
2831
2836
  formData: e,
2832
- record: Q,
2837
+ record: Y,
2833
2838
  isNew: !1
2834
2839
  });
2835
2840
  if (Object.keys(i).length > 0 && (r.$files = i), Object.keys(r).length === 0) return;
2836
- let a = We(i);
2841
+ let a = Ge(i);
2837
2842
  cn.mutate({
2838
2843
  pkValues: n,
2839
2844
  data: r
@@ -2846,4 +2851,4 @@ function Dn({ screenCode: e }) {
2846
2851
  });
2847
2852
  }
2848
2853
  //#endregion
2849
- export { En as SmartListPage, _n as t };
2854
+ export { jn as SmartListPage, wn as t };