@declarion/react 0.59.2 → 0.61.1

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 (39) hide show
  1. package/dist-lib/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-rgkewyMl.js} +40 -40
  2. package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-CSXZoy7v.js} +12 -12
  3. package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-DruYOxKm.js} +35 -35
  4. package/dist-lib/{Grid-CQabaBLx.js → Grid-Dsf3I0xG.js} +3 -3
  5. package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-QN7Wp2W6.js} +465 -465
  6. package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-CNaZ0xwz.js} +27 -27
  7. package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-BuO5hYJh.js} +2 -2
  8. package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-DO9rYcdq.js} +27 -27
  9. package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-DFIIx80b.js} +471 -471
  10. package/dist-lib/SmartListPage.impl-D694R32H.js +3051 -0
  11. package/dist-lib/SmartRecordListPage.impl-CB5cuQJV.js +780 -0
  12. package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-BV-aQbPy.js} +2 -2
  13. package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-gWmOYjOP.js} +189 -189
  14. package/dist-lib/api/data.d.ts +5 -1
  15. package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-BnmWukxk.js} +1 -1
  16. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  17. package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
  18. package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
  19. package/dist-lib/components/primitives/Fields.d.ts +3 -1
  20. package/dist-lib/{failure-v-uGSpbX.js → failure-BUxXuP4c.js} +6 -6
  21. package/dist-lib/{format-count-DA4wmmWR.js → format-count-bXVfHzbI.js} +247 -247
  22. package/dist-lib/hooks/useObject.d.ts +3 -2
  23. package/dist-lib/index.js +1055 -1047
  24. package/dist-lib/lib/field-classification.d.ts +10 -1
  25. package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-Dk1Ha5u3.js} +7 -7
  26. package/dist-lib/{registry-Cb3W-czW.js → registry-nSeHd5si.js} +445 -439
  27. package/dist-lib/testing.js +3 -3
  28. package/dist-lib/types/api.d.ts +0 -1
  29. package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-nT5UypJX.js} +15 -15
  30. package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-0WBj7wT6.js} +1176 -1090
  31. package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-C7dq_sEo.js} +5 -5
  32. package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-q80kCMMh.js} +134 -160
  33. package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-CeGKtq7Q.js} +3 -3
  34. package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-CzNAj82Q.js} +2 -2
  35. package/dist-lib/{useText-BFDCTUSo.js → useText-BsedsJ-J.js} +2 -2
  36. package/dist-lib/{value-By1-WJ8J.js → value-Dwfyghtj.js} +1 -1
  37. package/package.json +9 -9
  38. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
  39. package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
@@ -1,9 +1,9 @@
1
1
  import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
2
- import { Et as n, Fn as r, G as i, J as a, Ln as o, Mn as s, Pn as c, Rn as l, W as u, Zt as d, bt as f, en as p, i as m, jn as h, on as g, qt as _, rn as v, rt as y } from "./useCurrentScreen-BL5NZFCw.js";
3
- import { d as b, f as x, t as S } from "./useText-BFDCTUSo.js";
4
- import { C, M as w, S as T, u as E } from "./field-classification-C28XE-_P.js";
5
- import { c as ee, o as D, p as te, r as ne } from "./action-dispatch-DY0c8U81.js";
6
- import { a as O, d as k, f as A, h as j, i as M, o as N, s as P, u as F } from "./useTabSearchMirror-ZVLlINBX.js";
2
+ import { G as n, Gn as r, Hn as i, It as a, J as o, Jn as s, Vn as c, W as l, Wn as u, bt as d, gn as f, i as p, pn as m, qn as h, rn as g, rt as _, sn as v, un as y } from "./useCurrentScreen-0WBj7wT6.js";
3
+ import { d as b, f as x, t as S } from "./useText-BsedsJ-J.js";
4
+ import { T as C, g as w, h as T, r as E } from "./useOwnRefresh-q80kCMMh.js";
5
+ import { c as ee, o as D, p as te, r as ne } from "./action-dispatch-gWmOYjOP.js";
6
+ import { a as O, d as k, f as A, h as j, i as M, o as N, s as P, u as F } from "./useTabSearchMirror-CzNAj82Q.js";
7
7
  import { Fragment as I, useCallback as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
8
8
  import { useLocation as re, useSearchParams as ie } from "react-router";
9
9
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
@@ -38,10 +38,10 @@ function G({ name: e, size: t = 22, color: n }) {
38
38
  }
39
39
  //#endregion
40
40
  //#region src/components/shared/ConfirmDialog.tsx
41
- function ae({ open: t, onOpenChange: n, title: r, description: i, confirmLabel: a, onConfirm: s, destructive: c = !1 }) {
42
- let u = S(), d = B(null);
41
+ function ae({ open: t, onOpenChange: n, title: r, description: i, confirmLabel: a, onConfirm: o, destructive: c = !1 }) {
42
+ let l = S(), u = B(null);
43
43
  return R(() => {
44
- t && d.current?.focus();
44
+ t && u.current?.focus();
45
45
  }, [t]), t ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
46
46
  onClick: () => n(!1),
47
47
  style: {
@@ -52,7 +52,7 @@ function ae({ open: t, onOpenChange: n, title: r, description: i, confirmLabel:
52
52
  backdropFilter: "blur(2px)"
53
53
  }
54
54
  }), /* @__PURE__ */ W("div", {
55
- ref: d,
55
+ ref: u,
56
56
  role: "dialog",
57
57
  "aria-modal": "true",
58
58
  "aria-label": r,
@@ -123,7 +123,7 @@ function ae({ open: t, onOpenChange: n, title: r, description: i, confirmLabel:
123
123
  children: i
124
124
  })]
125
125
  }),
126
- /* @__PURE__ */ U(o, {
126
+ /* @__PURE__ */ U(h, {
127
127
  icon: /* @__PURE__ */ U(e.x, { size: 14 }),
128
128
  onClick: () => n(!1)
129
129
  })
@@ -142,17 +142,17 @@ function ae({ open: t, onOpenChange: n, title: r, description: i, confirmLabel:
142
142
  },
143
143
  children: [
144
144
  /* @__PURE__ */ U("div", { style: { flex: 1 } }),
145
- /* @__PURE__ */ U(l, {
145
+ /* @__PURE__ */ U(s, {
146
146
  onClick: () => n(!1),
147
- children: u("dialog.cancel", "Cancel")
147
+ children: l("dialog.cancel", "Cancel")
148
148
  }),
149
- /* @__PURE__ */ U(l, {
149
+ /* @__PURE__ */ U(s, {
150
150
  kind: "primary",
151
151
  danger: c,
152
152
  onClick: () => {
153
- s(), n(!1);
153
+ o(), n(!1);
154
154
  },
155
- children: a ?? u("dialog.confirm", "Confirm")
155
+ children: a ?? l("dialog.confirm", "Confirm")
156
156
  })
157
157
  ]
158
158
  })]
@@ -193,7 +193,7 @@ function q(e, t) {
193
193
  let n = t && String(e.user_id) === t;
194
194
  return {
195
195
  id: String(e.id),
196
- name: typeof e.name == "object" && e.name !== null ? e.name : { en: h(e.name) },
196
+ name: typeof e.name == "object" && e.name !== null ? e.name : { en: c(e.name) },
197
197
  icon: e.icon,
198
198
  source: n ? "personal" : "shared",
199
199
  is_default: e.is_default === !0,
@@ -203,17 +203,17 @@ function q(e, t) {
203
203
  };
204
204
  }
205
205
  function ce(e, t) {
206
- let r = n("view", {
206
+ let n = a("view", {
207
207
  filters: [{
208
208
  field: "id",
209
209
  op: "eq",
210
210
  value: e ?? ""
211
211
  }],
212
212
  per_page: 1
213
- }, !!e), i = r.data?.data?.[0], a = z(() => i ? q(i, t) : void 0, [i, t]);
213
+ }, !!e), r = n.data?.data?.[0], i = z(() => r ? q(r, t) : void 0, [r, t]);
214
214
  return e ? {
215
- view: a,
216
- isSettled: !r.isPending || r.fetchStatus === "paused"
215
+ view: i,
216
+ isSettled: !n.isPending || n.fetchStatus === "paused"
217
217
  } : {
218
218
  view: void 0,
219
219
  isSettled: !0
@@ -223,7 +223,7 @@ function le(e, t) {
223
223
  return J(e, t).views;
224
224
  }
225
225
  function J(e, t) {
226
- let r = K(e), i = n("view", {
226
+ let n = K(e), r = a("view", {
227
227
  filters: [{
228
228
  field: "screen_code",
229
229
  op: "eq",
@@ -239,9 +239,9 @@ function J(e, t) {
239
239
  }] }] : []],
240
240
  sort: "created_at:desc",
241
241
  per_page: 100
242
- }), a = i.data, o = z(() => {
242
+ }), i = r.data, o = z(() => {
243
243
  let e = [];
244
- if (r?.views) for (let t of r.views) e.push({
244
+ if (n?.views) for (let t of n.views) e.push({
245
245
  id: t.code,
246
246
  name: t.name,
247
247
  icon: t.icon,
@@ -250,17 +250,17 @@ function J(e, t) {
250
250
  columns: t.columns,
251
251
  sort: t.sort
252
252
  });
253
- if (a?.data) for (let n of a.data) e.push(q(n, t));
253
+ if (i?.data) for (let n of i.data) e.push(q(n, t));
254
254
  return e;
255
255
  }, [
256
- r?.views,
257
- a?.data,
256
+ n?.views,
257
+ i?.data,
258
258
  t
259
- ]), { refetch: s } = i;
259
+ ]), { refetch: s } = r;
260
260
  return {
261
261
  views: o,
262
- isSettled: !i.isPending || i.fetchStatus === "paused",
263
- isFetching: i.isFetching,
262
+ isSettled: !r.isPending || r.fetchStatus === "paused",
263
+ isFetching: r.isFetching,
264
264
  refetch: L(() => {
265
265
  s();
266
266
  }, [s])
@@ -269,13 +269,13 @@ function J(e, t) {
269
269
  //#endregion
270
270
  //#region src/hooks/usePageState.ts
271
271
  function ue(e, t, n) {
272
- let r = re(), i = n?.scope === "path" ? T(r) : C(r), a = B(i);
272
+ let r = re(), i = n?.scope === "path" ? T(r) : w(r), a = B(i);
273
273
  a.current = i;
274
- let o = B(t), s = w((t) => t.ttlMs <= 0 ? void 0 : t.entries[i]?.bag[e]), c = s === void 0 ? o.current : s;
274
+ let o = B(t), s = C((t) => t.ttlMs <= 0 ? void 0 : t.entries[i]?.bag[e]), c = s === void 0 ? o.current : s;
275
275
  return R(() => {
276
- w.getState().touch(i);
276
+ C.getState().touch(i);
277
277
  }, [i]), [c, L((t) => {
278
- let n = a.current, r = w.getState(), i = r.read(n, e), s = i === void 0 ? o.current : i, c = typeof t == "function" ? t(s) : t;
278
+ let n = a.current, r = C.getState(), i = r.read(n, e), s = i === void 0 ? o.current : i, c = typeof t == "function" ? t(s) : t;
279
279
  r.set(n, e, c);
280
280
  }, [e])];
281
281
  }
@@ -340,12 +340,12 @@ function Y(e, t) {
340
340
  }
341
341
  //#endregion
342
342
  //#region src/components/filters/FilterDrawer.tsx
343
- function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, defaultFilters: s, refs: c }) {
344
- let u = S(), d = g().category === "phone", [f, p] = V(r), [m, h] = V(!1);
343
+ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, defaultFilters: o, refs: c }) {
344
+ let l = S(), u = f().category === "phone", [d, p] = V(r), [m, g] = V(!1);
345
345
  if (R(() => {
346
346
  if (t) {
347
- if (r.length === 0 && s && s.length > 0) {
348
- let e = s.flatMap((e) => {
347
+ if (r.length === 0 && o && o.length > 0) {
348
+ let e = o.flatMap((e) => {
349
349
  let t = a.find((t) => t.code === e);
350
350
  return t ? [{
351
351
  field: e,
@@ -360,10 +360,10 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
360
360
  }, [
361
361
  t,
362
362
  r,
363
- s,
363
+ o,
364
364
  a
365
365
  ]), !t) return null;
366
- let _ = k(f), v = new Set(F(f).filter((e) => e.field).map((e) => e.field)), y = (e = f) => {
366
+ let _ = k(d), v = new Set(F(d).filter((e) => e.field).map((e) => e.field)), y = (e = d) => {
367
367
  let t = new Set(F(e).map((e) => e.field).filter(Boolean)), n = a.find((e) => !t.has(e.code)) ?? a[0];
368
368
  return n ? {
369
369
  field: n.code,
@@ -376,9 +376,9 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
376
376
  p((t) => [...t, {
377
377
  field: e,
378
378
  op: n
379
- }]), h(!1);
379
+ }]), g(!1);
380
380
  }, x = () => {
381
- let e = f.filter((e) => e.field && e.op), t = f.filter((e) => !e.field || !e.op), n = e.length === 1 ? e[0] : e.length > 1 ? { and: e } : {};
381
+ let e = d.filter((e) => e.field && e.op), t = d.filter((e) => !e.field || !e.op), n = e.length === 1 ? e[0] : e.length > 1 ? { and: e } : {};
382
382
  p([...t, { or: [n, {}] }]);
383
383
  }, C = (e, t) => {
384
384
  p((n) => Q(n, e, (e) => ({
@@ -398,7 +398,7 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
398
398
  and: [...e.and, t]
399
399
  } : e));
400
400
  }, ee = (e, t) => {
401
- let n = [...e, t], r = be(f, n);
401
+ let n = [...e, t], r = be(d, n);
402
402
  if (!r) return;
403
403
  let i = y();
404
404
  r.and ? E(n, i) : r.field || r.op || r.or ? w(n, { and: [r, i] }) : w(n, i);
@@ -433,7 +433,7 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
433
433
  }
434
434
  }), /* @__PURE__ */ W("div", {
435
435
  role: "dialog",
436
- "aria-label": u("filter.drawer.title", "Filters"),
436
+ "aria-label": l("filter.drawer.title", "Filters"),
437
437
  "aria-modal": "true",
438
438
  "data-testid": "filter-drawer",
439
439
  style: {
@@ -475,12 +475,12 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
475
475
  fontWeight: 600,
476
476
  color: "var(--text)"
477
477
  },
478
- children: u("filter.drawer.title", "Filters")
478
+ children: l("filter.drawer.title", "Filters")
479
479
  })]
480
- }), /* @__PURE__ */ U(o, {
480
+ }), /* @__PURE__ */ U(h, {
481
481
  icon: /* @__PURE__ */ U(e.x, { size: 14 }),
482
482
  onClick: n,
483
- title: u("filter.drawer.close", "Close")
483
+ title: l("filter.drawer.close", "Close")
484
484
  })]
485
485
  }),
486
486
  /* @__PURE__ */ W("div", {
@@ -494,7 +494,7 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
494
494
  minWidth: 0,
495
495
  minHeight: 0
496
496
  },
497
- children: [f.map((e, t) => D(e, [t])), /* @__PURE__ */ U("div", {
497
+ children: [d.map((e, t) => D(e, [t])), /* @__PURE__ */ U("div", {
498
498
  style: {
499
499
  display: "flex",
500
500
  alignItems: "center",
@@ -504,18 +504,18 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
504
504
  children: m ? /* @__PURE__ */ U(Ce, {
505
505
  fields: a,
506
506
  activeFields: v,
507
- compact: d,
507
+ compact: u,
508
508
  onSelect: b,
509
- onCancel: () => h(!1)
510
- }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(l, {
509
+ onCancel: () => g(!1)
510
+ }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(s, {
511
511
  icon: /* @__PURE__ */ U(e.plus, { size: 12 }),
512
- onClick: () => h(!0),
513
- children: u("filter.drawer.add_filter", "Add filter")
514
- }), !_ && F(f).length > 0 && /* @__PURE__ */ U(l, {
512
+ onClick: () => g(!0),
513
+ children: l("filter.drawer.add_filter", "Add filter")
514
+ }), !_ && F(d).length > 0 && /* @__PURE__ */ U(s, {
515
515
  kind: "ghost",
516
516
  icon: /* @__PURE__ */ U(e.plus, { size: 12 }),
517
517
  onClick: x,
518
- children: u("filter.drawer.add_or_group", "Add OR group")
518
+ children: l("filter.drawer.add_or_group", "Add OR group")
519
519
  })] })
520
520
  })]
521
521
  }),
@@ -532,24 +532,24 @@ function fe({ open: t, onClose: n, filters: r, onApply: i, availableFields: a, d
532
532
  paddingBottom: "calc(10px + var(--safe-area-bottom))"
533
533
  },
534
534
  children: [
535
- /* @__PURE__ */ U(l, {
535
+ /* @__PURE__ */ U(s, {
536
536
  kind: "ghost",
537
537
  onClick: () => {
538
538
  p([]);
539
539
  },
540
- children: u("filter.drawer.reset", "Reset")
540
+ children: l("filter.drawer.reset", "Reset")
541
541
  }),
542
542
  /* @__PURE__ */ U("div", { style: { flex: 1 } }),
543
- /* @__PURE__ */ U(l, {
543
+ /* @__PURE__ */ U(s, {
544
544
  onClick: n,
545
- children: u("dialog.cancel", "Cancel")
545
+ children: l("dialog.cancel", "Cancel")
546
546
  }),
547
- /* @__PURE__ */ U(l, {
547
+ /* @__PURE__ */ U(s, {
548
548
  kind: "primary",
549
549
  onClick: () => {
550
- i(X(f)), n();
550
+ i(X(d)), n();
551
551
  },
552
- children: u("filter.drawer.apply", "Apply")
552
+ children: l("filter.drawer.apply", "Apply")
553
553
  })
554
554
  ]
555
555
  })
@@ -602,14 +602,14 @@ function Z(e, t) {
602
602
  }
603
603
  var me = "__custom__";
604
604
  function he({ meta: e, value: t, onUpdate: n }) {
605
- let r = S(), i = e.specialValues ?? [], a = h(t), o = i.some((e) => e.code === a), [s, c] = V(!o && a !== "");
606
- return s ? /* @__PURE__ */ U(p, {
605
+ let r = S(), i = e.specialValues ?? [], a = c(t), o = i.some((e) => e.code === a), [s, l] = V(!o && a !== "");
606
+ return s ? /* @__PURE__ */ U(y, {
607
607
  "aria-label": r("filter.value.aria", "{field} filter value", { field: e.label }),
608
608
  value: a,
609
609
  onChange: (e) => n({ value: e }),
610
610
  placeholder: r("filter.value.placeholder", "Value…"),
611
611
  autoFocus: !0
612
- }) : /* @__PURE__ */ U(d, {
612
+ }) : /* @__PURE__ */ U(v, {
613
613
  "aria-label": r("filter.value.aria", "{field} filter value", { field: e.label }),
614
614
  value: a,
615
615
  options: [
@@ -624,21 +624,21 @@ function he({ meta: e, value: t, onUpdate: n }) {
624
624
  }
625
625
  ],
626
626
  onChange: (e) => {
627
- e === me ? (c(!0), n({ value: "" })) : n({ value: e });
627
+ e === me ? (l(!0), n({ value: "" })) : n({ value: e });
628
628
  }
629
629
  });
630
630
  }
631
631
  function ge(e) {
632
- return Array.isArray(e) ? e.map((e) => h(e)) : e == null || e === "" ? [] : [h(e)];
632
+ return Array.isArray(e) ? e.map((e) => c(e)) : e == null || e === "" ? [] : [c(e)];
633
633
  }
634
634
  function _e(e) {
635
- return Array.isArray(e) ? e.length > 0 ? h(e[0]) : "" : h(e);
635
+ return Array.isArray(e) ? e.length > 0 ? c(e[0]) : "" : c(e);
636
636
  }
637
637
  function ve({ node: t, meta: n, refs: r, onUpdate: i, onRemove: a }) {
638
- let s = S(), c = O.has(t.op), l = M.has(t.op), u = n.operators.map((e) => ({
638
+ let o = S(), s = O.has(t.op), l = M.has(t.op), u = n.operators.map((e) => ({
639
639
  value: e,
640
- label: Y(s, e)
641
- })), m = s("filter.value.aria", "{field} filter value", { field: n.label }), g = (e) => {
640
+ label: Y(o, e)
641
+ })), f = o("filter.value.aria", "{field} filter value", { field: n.label }), p = (e) => {
642
642
  let n = M.has(t.op), r = M.has(e);
643
643
  if (r === n) {
644
644
  i({ op: e });
@@ -676,66 +676,66 @@ function ve({ node: t, meta: n, refs: r, onUpdate: i, onRemove: a }) {
676
676
  },
677
677
  title: n.label,
678
678
  children: n.label
679
- }), /* @__PURE__ */ U(o, {
679
+ }), /* @__PURE__ */ U(h, {
680
680
  size: 22,
681
681
  icon: /* @__PURE__ */ U(e.x, { size: 12 }),
682
682
  onClick: a,
683
- title: s("filter.drawer.remove", "Remove")
683
+ title: o("filter.drawer.remove", "Remove")
684
684
  })]
685
685
  }), /* @__PURE__ */ W("div", {
686
686
  style: {
687
687
  display: "grid",
688
- gridTemplateColumns: c ? "minmax(0, 1fr)" : "minmax(112px, 152px) minmax(0, 1fr)",
688
+ gridTemplateColumns: s ? "minmax(0, 1fr)" : "minmax(112px, 152px) minmax(0, 1fr)",
689
689
  gap: 6,
690
690
  alignItems: "start",
691
691
  minWidth: 0
692
692
  },
693
- children: [/* @__PURE__ */ U(d, {
694
- "aria-label": s("filter.operator.aria", "{field} filter operator", { field: n.label }),
693
+ children: [/* @__PURE__ */ U(v, {
694
+ "aria-label": o("filter.operator.aria", "{field} filter operator", { field: n.label }),
695
695
  value: t.op ?? u[0]?.value,
696
696
  options: u,
697
- onChange: (e) => g(e)
698
- }), c ? null : l && n.options ? /* @__PURE__ */ U(_, {
699
- "aria-label": m,
697
+ onChange: (e) => p(e)
698
+ }), s ? null : l && n.options ? /* @__PURE__ */ U(g, {
699
+ "aria-label": f,
700
700
  value: ge(t.value),
701
- options: [...Z(s, n.specialValues), ...n.options.map((e) => ({
701
+ options: [...Z(o, n.specialValues), ...n.options.map((e) => ({
702
702
  value: e.value,
703
703
  label: e.label
704
704
  }))],
705
705
  onChange: (e) => i({ value: e }),
706
- placeholder: s("filter.value.select", "Select…")
707
- }) : n.type === "ref" && n.ref?.entity ? /* @__PURE__ */ U(f, {
706
+ placeholder: o("filter.value.select", "Select…")
707
+ }) : n.type === "ref" && n.ref?.entity ? /* @__PURE__ */ U(d, {
708
708
  ref: n.ref,
709
709
  value: t.value,
710
710
  onChange: (e) => i({ value: e ?? "" }),
711
711
  refs: r,
712
- ariaLabel: m,
713
- placeholder: s("filter.value.select", "Select…"),
712
+ ariaLabel: f,
713
+ placeholder: o("filter.value.select", "Select…"),
714
714
  specialValues: n.specialValues
715
- }) : n.options ? /* @__PURE__ */ U(d, {
716
- "aria-label": m,
717
- value: h(t.value),
718
- options: [...Z(s, n.specialValues), ...n.options.map((e) => ({
715
+ }) : n.options ? /* @__PURE__ */ U(v, {
716
+ "aria-label": f,
717
+ value: c(t.value),
718
+ options: [...Z(o, n.specialValues), ...n.options.map((e) => ({
719
719
  value: e.value,
720
720
  label: e.label
721
721
  }))],
722
722
  onChange: (e) => i({ value: e }),
723
- placeholder: s("filter.value.select", "Select…")
723
+ placeholder: o("filter.value.select", "Select…")
724
724
  }) : n.specialValues && n.specialValues.length > 0 ? /* @__PURE__ */ U(he, {
725
725
  meta: n,
726
726
  value: t.value,
727
727
  onUpdate: i
728
- }) : /* @__PURE__ */ U(p, {
729
- "aria-label": m,
730
- value: h(t.value),
728
+ }) : /* @__PURE__ */ U(y, {
729
+ "aria-label": f,
730
+ value: c(t.value),
731
731
  onChange: (e) => i({ value: e }),
732
- placeholder: s("filter.value.placeholder", "Value…")
732
+ placeholder: o("filter.value.placeholder", "Value…")
733
733
  })]
734
734
  })]
735
735
  });
736
736
  }
737
- function ye({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: i, onAddBranch: a, path: s }) {
738
- let c = S(), u = t.or ?? t.and ?? [], d = t.or !== void 0;
737
+ function ye({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: i, onAddBranch: a, path: o }) {
738
+ let c = S(), l = t.or ?? t.and ?? [], u = t.or !== void 0;
739
739
  return /* @__PURE__ */ W("div", {
740
740
  style: {
741
741
  display: "flex",
@@ -743,9 +743,9 @@ function ye({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: i, onAdd
743
743
  gap: 8
744
744
  },
745
745
  children: [
746
- u.map((t, a) => {
747
- let u = [...s, a], f = d && t.and ? t.and : [t];
748
- return /* @__PURE__ */ W("div", { children: [d && a > 0 && /* @__PURE__ */ W("div", {
746
+ l.map((t, a) => {
747
+ let l = [...o, a], d = u && t.and ? t.and : [t];
748
+ return /* @__PURE__ */ W("div", { children: [u && a > 0 && /* @__PURE__ */ W("div", {
749
749
  style: {
750
750
  display: "flex",
751
751
  alignItems: "center",
@@ -781,7 +781,7 @@ function ye({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: i, onAdd
781
781
  gap: 8
782
782
  },
783
783
  children: [
784
- d && /* @__PURE__ */ U("div", {
784
+ u && /* @__PURE__ */ U("div", {
785
785
  style: {
786
786
  fontSize: 10.5,
787
787
  fontWeight: 600,
@@ -791,31 +791,31 @@ function ye({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: i, onAdd
791
791
  },
792
792
  children: c("filter.group.match_all", "Match ALL")
793
793
  }),
794
- f.map((e, r) => n(e, d && t.and ? [...u, r] : u)),
795
- d && /* @__PURE__ */ U(l, {
794
+ d.map((e, r) => n(e, u && t.and ? [...l, r] : l)),
795
+ u && /* @__PURE__ */ U(s, {
796
796
  kind: "ghost",
797
797
  size: "xs",
798
798
  icon: /* @__PURE__ */ U(e.plus, { size: 11 }),
799
799
  onClick: () => i(a),
800
800
  children: c("filter.group.add_condition", "Add condition")
801
801
  }),
802
- d && /* @__PURE__ */ U(o, {
802
+ u && /* @__PURE__ */ U(h, {
803
803
  size: 22,
804
804
  icon: /* @__PURE__ */ U(e.x, { size: 12 }),
805
- onClick: () => r(u),
805
+ onClick: () => r(l),
806
806
  title: c("filter.group.remove_alternative", "Remove OR alternative")
807
807
  })
808
808
  ]
809
809
  })] }, a);
810
810
  }),
811
- !d && /* @__PURE__ */ U(l, {
811
+ !u && /* @__PURE__ */ U(s, {
812
812
  kind: "ghost",
813
813
  size: "xs",
814
814
  icon: /* @__PURE__ */ U(e.plus, { size: 11 }),
815
815
  onClick: () => i(),
816
816
  children: c("filter.group.add_condition", "Add condition")
817
817
  }),
818
- d && /* @__PURE__ */ U(l, {
818
+ u && /* @__PURE__ */ U(s, {
819
819
  kind: "ghost",
820
820
  size: "xs",
821
821
  icon: /* @__PURE__ */ U(e.plus, { size: 11 }),
@@ -888,7 +888,7 @@ function Se(e, t) {
888
888
  });
889
889
  }
890
890
  function Ce({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: a }) {
891
- let o = S(), [s, c] = V(""), u = t.filter((e) => !n.has(e.code) && (s === "" || e.label.toLowerCase().includes(s.toLowerCase()) || e.code.toLowerCase().includes(s.toLowerCase())));
891
+ let o = S(), [c, l] = V(""), u = t.filter((e) => !n.has(e.code) && (c === "" || e.label.toLowerCase().includes(c.toLowerCase()) || e.code.toLowerCase().includes(c.toLowerCase())));
892
892
  return /* @__PURE__ */ W("div", {
893
893
  style: {
894
894
  width: "100%",
@@ -902,9 +902,9 @@ function Ce({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: a }
902
902
  boxSizing: "border-box"
903
903
  },
904
904
  children: [
905
- /* @__PURE__ */ U(p, {
906
- value: s,
907
- onChange: c,
905
+ /* @__PURE__ */ U(y, {
906
+ value: c,
907
+ onChange: l,
908
908
  placeholder: o("filter.fields.search", "Search fields…"),
909
909
  prefix: /* @__PURE__ */ U(e.search, { size: 12 }),
910
910
  autoFocus: !0
@@ -961,7 +961,7 @@ function Ce({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: a }
961
961
  children: o("filter.fields.none", "No fields available")
962
962
  })]
963
963
  }),
964
- /* @__PURE__ */ U(l, {
964
+ /* @__PURE__ */ U(s, {
965
965
  kind: "ghost",
966
966
  size: "xs",
967
967
  onClick: a,
@@ -974,7 +974,7 @@ function Ce({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: a }
974
974
  //#endregion
975
975
  //#region src/components/filters/FilterChips.tsx
976
976
  function we({ filters: t, onRemove: n, onClearAll: r, onChipClick: i, fieldLabel: a = (e) => e, resolveValue: o }) {
977
- let s = S();
977
+ let c = S();
978
978
  return t.length === 0 ? null : /* @__PURE__ */ W("div", {
979
979
  style: {
980
980
  display: "flex",
@@ -989,12 +989,12 @@ function we({ filters: t, onRemove: n, onClearAll: r, onChipClick: i, fieldLabel
989
989
  resolveValue: o,
990
990
  onRemove: n,
991
991
  onClick: i
992
- })] }, t)), /* @__PURE__ */ U(l, {
992
+ })] }, t)), /* @__PURE__ */ U(s, {
993
993
  kind: "ghost",
994
994
  size: "xs",
995
995
  icon: /* @__PURE__ */ U(e.x, { size: 11 }),
996
996
  onClick: r,
997
- children: s("filter.chips.clear_all", "Clear all")
997
+ children: c("filter.chips.clear_all", "Clear all")
998
998
  })]
999
999
  });
1000
1000
  }
@@ -1058,13 +1058,13 @@ function Ee({ join: e }) {
1058
1058
  children: n
1059
1059
  });
1060
1060
  }
1061
- function De({ node: t, fieldLabel: n, resolveValue: r, onRemove: i, onClick: a }) {
1062
- let o = /* @__PURE__ */ U(e.filter, { size: 11 });
1063
- return /* @__PURE__ */ U(s, {
1061
+ function De({ node: t, fieldLabel: n, resolveValue: r, onRemove: a, onClick: o }) {
1062
+ let s = /* @__PURE__ */ U(e.filter, { size: 11 });
1063
+ return /* @__PURE__ */ U(i, {
1064
1064
  tone: "slate",
1065
- icon: o,
1066
- onClick: a,
1067
- onRemove: i,
1065
+ icon: s,
1066
+ onClick: o,
1067
+ onRemove: a,
1068
1068
  children: /* @__PURE__ */ W("span", { children: [
1069
1069
  /* @__PURE__ */ U("span", {
1070
1070
  style: { color: "var(--text-3)" },
@@ -1092,7 +1092,7 @@ function Oe({ node: e, resolveValue: t }) {
1092
1092
  let i = t(e.field, n);
1093
1093
  return /* @__PURE__ */ W(I, { children: [r > 0 ? ", " : "", /* @__PURE__ */ U("span", { children: i.status === "loading" ? /* @__PURE__ */ U(ke, {}) : i.label ?? i.raw })] }, r);
1094
1094
  })
1095
- ] }) : /* @__PURE__ */ U(H, { children: `${i} ${a.map(h).join(", ")}` });
1095
+ ] }) : /* @__PURE__ */ U(H, { children: `${i} ${a.map(c).join(", ")}` });
1096
1096
  }
1097
1097
  function ke() {
1098
1098
  let e = S();
@@ -1112,8 +1112,8 @@ function ke() {
1112
1112
  }
1113
1113
  //#endregion
1114
1114
  //#region src/components/list/ColumnPicker.tsx
1115
- function Ae({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: i, onReset: a, onShowAll: s, onResetWidths: u, columnLabel: d = (e) => e }) {
1116
- let f = S(), p = B(null), [m, h] = V(!1), g = t.filter((e) => !n.includes(e)), _ = (e) => /* @__PURE__ */ U("div", {
1115
+ function Ae({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: i, onReset: a, onShowAll: o, onResetWidths: c, columnLabel: l = (e) => e }) {
1116
+ let d = S(), f = B(null), [p, g] = V(!1), _ = t.filter((e) => !n.includes(e)), v = (e) => /* @__PURE__ */ U("div", {
1117
1117
  style: {
1118
1118
  padding: "6px 8px 4px",
1119
1119
  fontSize: 10.5,
@@ -1124,20 +1124,20 @@ function Ae({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: i, on
1124
1124
  },
1125
1125
  children: e
1126
1126
  });
1127
- return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(l, {
1128
- ref: p,
1127
+ return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(s, {
1128
+ ref: f,
1129
1129
  icon: /* @__PURE__ */ U(e.columns, { size: 13 }),
1130
- onClick: () => h((e) => !e),
1131
- active: m,
1132
- children: f("list.columns.button", "Columns")
1133
- }), /* @__PURE__ */ W(c, {
1134
- open: m,
1135
- anchor: p.current,
1136
- onClose: () => h(!1),
1130
+ onClick: () => g((e) => !e),
1131
+ active: p,
1132
+ children: d("list.columns.button", "Columns")
1133
+ }), /* @__PURE__ */ W(u, {
1134
+ open: p,
1135
+ anchor: f.current,
1136
+ onClose: () => g(!1),
1137
1137
  align: "end",
1138
1138
  width: 240,
1139
1139
  children: [
1140
- _(f("list.columns.visible", "Visible columns")),
1140
+ v(d("list.columns.visible", "Visible columns")),
1141
1141
  n.map((t, a) => /* @__PURE__ */ W("div", {
1142
1142
  style: {
1143
1143
  display: "flex",
@@ -1148,7 +1148,7 @@ function Ae({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: i, on
1148
1148
  children: [/* @__PURE__ */ W("button", {
1149
1149
  type: "button",
1150
1150
  onClick: () => r(t),
1151
- "aria-label": f("list.columns.hide", "Hide {column}", { column: d(t) }),
1151
+ "aria-label": d("list.columns.hide", "Hide {column}", { column: l(t) }),
1152
1152
  style: {
1153
1153
  flex: 1,
1154
1154
  display: "flex",
@@ -1170,45 +1170,45 @@ function Ae({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: i, on
1170
1170
  textOverflow: "ellipsis",
1171
1171
  whiteSpace: "nowrap"
1172
1172
  },
1173
- children: d(t)
1173
+ children: l(t)
1174
1174
  })]
1175
- }), i && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(o, {
1175
+ }), i && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(h, {
1176
1176
  icon: /* @__PURE__ */ U(e.arrowUp, { size: 12 }),
1177
- title: f("list.columns.move_up", "Move {column} up", { column: d(t) }),
1177
+ title: d("list.columns.move_up", "Move {column} up", { column: l(t) }),
1178
1178
  size: 22,
1179
1179
  disabled: a === 0,
1180
1180
  onClick: () => i(t, "up")
1181
- }), /* @__PURE__ */ U(o, {
1181
+ }), /* @__PURE__ */ U(h, {
1182
1182
  icon: /* @__PURE__ */ U(e.arrowDown, { size: 12 }),
1183
- title: f("list.columns.move_down", "Move {column} down", { column: d(t) }),
1183
+ title: d("list.columns.move_down", "Move {column} down", { column: l(t) }),
1184
1184
  size: 22,
1185
1185
  disabled: a === n.length - 1,
1186
1186
  onClick: () => i(t, "down")
1187
1187
  })] })]
1188
1188
  }, t)),
1189
- g.length > 0 && /* @__PURE__ */ W(H, { children: [_(f("list.columns.hidden", "Hidden columns")), g.map((e) => /* @__PURE__ */ U(v, {
1189
+ _.length > 0 && /* @__PURE__ */ W(H, { children: [v(d("list.columns.hidden", "Hidden columns")), _.map((e) => /* @__PURE__ */ U(m, {
1190
1190
  icon: /* @__PURE__ */ U("span", { style: {
1191
1191
  width: 12,
1192
1192
  display: "inline-block"
1193
1193
  } }),
1194
1194
  onClick: () => r(e),
1195
- children: d(e)
1195
+ children: l(e)
1196
1196
  }, e))] }),
1197
- /* @__PURE__ */ U(v, { divider: !0 }),
1198
- /* @__PURE__ */ U(v, {
1197
+ /* @__PURE__ */ U(m, { divider: !0 }),
1198
+ /* @__PURE__ */ U(m, {
1199
1199
  icon: /* @__PURE__ */ U(e.refresh, { size: 12 }),
1200
1200
  onClick: a,
1201
- children: f("list.columns.reset", "Reset columns")
1201
+ children: d("list.columns.reset", "Reset columns")
1202
1202
  }),
1203
- /* @__PURE__ */ U(v, {
1203
+ /* @__PURE__ */ U(m, {
1204
1204
  icon: /* @__PURE__ */ U(e.eye, { size: 12 }),
1205
- onClick: s,
1206
- children: f("list.columns.show_all", "Show all")
1205
+ onClick: o,
1206
+ children: d("list.columns.show_all", "Show all")
1207
1207
  }),
1208
- u && /* @__PURE__ */ U(v, {
1208
+ c && /* @__PURE__ */ U(m, {
1209
1209
  icon: /* @__PURE__ */ U(e.columns, { size: 12 }),
1210
- onClick: u,
1211
- children: f("list.columns.reset_widths", "Reset column widths (this device)")
1210
+ onClick: c,
1211
+ children: d("list.columns.reset_widths", "Reset column widths (this device)")
1212
1212
  })
1213
1213
  ]
1214
1214
  })] });
@@ -1229,8 +1229,8 @@ var je = e["undo-2"], Me = {
1229
1229
  color: "var(--text-2)",
1230
1230
  fontFamily: "inherit"
1231
1231
  };
1232
- function Ne({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onSaveAs: s, onDiscard: u, onDelete: d, deletePending: f = !1 }) {
1233
- let p = S(), m = B(null), [h, g] = V(!1), _ = t.find((e) => e.id === n), y = t.filter((e) => e.source === "system"), b = t.filter((e) => e.source === "personal"), x = t.filter((e) => e.source === "shared"), C = _ ? p(_.name) : p("list.view.all_records", "All Records"), w = (e) => /* @__PURE__ */ U("div", {
1232
+ function Ne({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onSaveAs: o, onDiscard: c, onDelete: l, deletePending: d = !1 }) {
1233
+ let f = S(), p = B(null), [g, _] = V(!1), v = t.find((e) => e.id === n), y = t.filter((e) => e.source === "system"), b = t.filter((e) => e.source === "personal"), x = t.filter((e) => e.source === "shared"), C = v ? f(v.name) : f("list.view.all_records", "All Records"), w = (e) => /* @__PURE__ */ U("div", {
1234
1234
  style: {
1235
1235
  padding: "6px 8px 4px",
1236
1236
  fontSize: 10,
@@ -1249,9 +1249,9 @@ function Ne({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onS
1249
1249
  },
1250
1250
  children: [
1251
1251
  /* @__PURE__ */ W("button", {
1252
- ref: m,
1252
+ ref: p,
1253
1253
  type: "button",
1254
- onClick: () => g((e) => !e),
1254
+ onClick: () => _((e) => !e),
1255
1255
  style: Me,
1256
1256
  children: [
1257
1257
  /* @__PURE__ */ U(e.star, { size: 12 }),
@@ -1267,34 +1267,34 @@ function Ne({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onS
1267
1267
  /* @__PURE__ */ U(e.down, { size: 11 })
1268
1268
  ]
1269
1269
  }),
1270
- /* @__PURE__ */ W(c, {
1271
- open: h,
1272
- anchor: m.current,
1273
- onClose: () => g(!1),
1270
+ /* @__PURE__ */ W(u, {
1271
+ open: g,
1272
+ anchor: p.current,
1273
+ onClose: () => _(!1),
1274
1274
  width: 280,
1275
1275
  children: [
1276
- /* @__PURE__ */ U(v, {
1276
+ /* @__PURE__ */ U(m, {
1277
1277
  icon: n ? void 0 : /* @__PURE__ */ U(e.check, { size: 12 }),
1278
1278
  active: !n,
1279
1279
  onClick: () => {
1280
1280
  i({
1281
1281
  id: "",
1282
- name: { [p.language]: p("list.view.all_records", "All Records") },
1282
+ name: { [f.language]: f("list.view.all_records", "All Records") },
1283
1283
  source: "system"
1284
- }), g(!1);
1284
+ }), _(!1);
1285
1285
  },
1286
- children: p("list.view.all_records", "All Records")
1286
+ children: f("list.view.all_records", "All Records")
1287
1287
  }),
1288
- y.length > 0 && w(p("list.view.presets", "Presets")),
1289
- y.map((t) => /* @__PURE__ */ U(v, {
1288
+ y.length > 0 && w(f("list.view.presets", "Presets")),
1289
+ y.map((t) => /* @__PURE__ */ U(m, {
1290
1290
  icon: n === t.id ? /* @__PURE__ */ U(e.check, { size: 12 }) : void 0,
1291
1291
  active: n === t.id,
1292
1292
  onClick: () => {
1293
- i(t), g(!1);
1293
+ i(t), _(!1);
1294
1294
  },
1295
- children: p(t.name)
1295
+ children: f(t.name)
1296
1296
  }, t.id)),
1297
- b.length > 0 && w(p("list.view.mine", "My Views")),
1297
+ b.length > 0 && w(f("list.view.mine", "My Views")),
1298
1298
  b.map((t) => /* @__PURE__ */ W("div", {
1299
1299
  style: {
1300
1300
  display: "flex",
@@ -1307,55 +1307,55 @@ function Ne({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onS
1307
1307
  flex: 1,
1308
1308
  minWidth: 0
1309
1309
  },
1310
- children: /* @__PURE__ */ U(v, {
1310
+ children: /* @__PURE__ */ U(m, {
1311
1311
  icon: n === t.id ? /* @__PURE__ */ U(e.check, { size: 12 }) : t.is_default ? /* @__PURE__ */ U(e.star, { size: 12 }) : void 0,
1312
1312
  active: n === t.id,
1313
1313
  onClick: () => {
1314
- i(t), g(!1);
1314
+ i(t), _(!1);
1315
1315
  },
1316
- children: p(t.name)
1316
+ children: f(t.name)
1317
1317
  })
1318
- }), d && /* @__PURE__ */ U(o, {
1318
+ }), l && /* @__PURE__ */ U(h, {
1319
1319
  icon: /* @__PURE__ */ U(e.trash, { size: 12 }),
1320
- title: p("list.view.delete_action", "Delete view {name}", { name: p(t.name) }),
1320
+ title: f("list.view.delete_action", "Delete view {name}", { name: f(t.name) }),
1321
1321
  size: 22,
1322
- disabled: f,
1322
+ disabled: d,
1323
1323
  onClick: () => {
1324
- d(t), g(!1);
1324
+ l(t), _(!1);
1325
1325
  }
1326
1326
  })]
1327
1327
  }, t.id)),
1328
- x.length > 0 && w(p("list.view.shared", "Shared")),
1329
- x.map((t) => /* @__PURE__ */ U(v, {
1328
+ x.length > 0 && w(f("list.view.shared", "Shared")),
1329
+ x.map((t) => /* @__PURE__ */ U(m, {
1330
1330
  icon: n === t.id ? /* @__PURE__ */ U(e.check, { size: 12 }) : /* @__PURE__ */ U(e.globe, { size: 12 }),
1331
1331
  active: n === t.id,
1332
1332
  onClick: () => {
1333
- i(t), g(!1);
1333
+ i(t), _(!1);
1334
1334
  },
1335
- children: p(t.name)
1335
+ children: f(t.name)
1336
1336
  }, t.id)),
1337
- s && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, { divider: !0 }), /* @__PURE__ */ U(v, {
1337
+ o && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(m, { divider: !0 }), /* @__PURE__ */ U(m, {
1338
1338
  icon: /* @__PURE__ */ U(e.plus, { size: 12 }),
1339
1339
  onClick: () => {
1340
- s(), g(!1);
1340
+ o(), _(!1);
1341
1341
  },
1342
- children: p("list.view.save_as_menu", "Save as new view…")
1342
+ children: f("list.view.save_as_menu", "Save as new view…")
1343
1343
  })] })
1344
1344
  ]
1345
1345
  }),
1346
- r && n && /* @__PURE__ */ W(H, { children: [a && _?.source === "personal" ? /* @__PURE__ */ U(l, {
1346
+ r && n && /* @__PURE__ */ W(H, { children: [a && v?.source === "personal" ? /* @__PURE__ */ U(s, {
1347
1347
  icon: /* @__PURE__ */ U(e.save, { size: 12 }),
1348
1348
  onClick: a,
1349
- children: p("list.view.save", "Save")
1350
- }) : s ? /* @__PURE__ */ U(l, {
1349
+ children: f("list.view.save", "Save")
1350
+ }) : o ? /* @__PURE__ */ U(s, {
1351
1351
  icon: /* @__PURE__ */ U(e.plus, { size: 12 }),
1352
- onClick: s,
1353
- children: p("list.view.save_as", "Save as new")
1354
- }) : null, u && /* @__PURE__ */ U(l, {
1352
+ onClick: o,
1353
+ children: f("list.view.save_as", "Save as new")
1354
+ }) : null, c && /* @__PURE__ */ U(s, {
1355
1355
  kind: "ghost",
1356
1356
  icon: /* @__PURE__ */ U(je, { size: 12 }),
1357
- onClick: u,
1358
- children: p("list.view.discard", "Discard")
1357
+ onClick: c,
1358
+ children: f("list.view.discard", "Discard")
1359
1359
  })] })
1360
1360
  ]
1361
1361
  });
@@ -1371,65 +1371,65 @@ function Fe(e) {
1371
1371
  let t = e.display?.widget;
1372
1372
  return t && Pe.has(t) ? !0 : Pe.has(e.type);
1373
1373
  }
1374
- function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: s, readOnly: c, onCommit: l }) {
1375
- let u = S(), [d, f] = V(!1), [p, m] = V(i), h = Fe(t);
1374
+ function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: o, readOnly: s, onCommit: c }) {
1375
+ let l = S(), [u, d] = V(!1), [f, p] = V(i), m = Fe(t);
1376
1376
  R(() => {
1377
- d || m(i);
1378
- }, [i, d]);
1377
+ u || p(i);
1378
+ }, [i, u]);
1379
1379
  let g = L(() => {
1380
- c || (m(i), f(!0));
1381
- }, [c, i]), _ = L((e) => {
1382
- l(e === void 0 ? p : e), f(!1);
1383
- }, [l, p]), v = L(() => {
1384
- m(i), f(!1);
1380
+ s || (p(i), d(!0));
1381
+ }, [s, i]), v = L((e) => {
1382
+ c(e === void 0 ? f : e), d(!1);
1383
+ }, [c, f]), y = L(() => {
1384
+ p(i), d(!1);
1385
1385
  }, [i]), b = L((e) => {
1386
- if (c || d) return;
1386
+ if (s || u) return;
1387
1387
  let t = e.target;
1388
1388
  t.closest("a") || t.closest("[data-peek-pencil=\"true\"]") || g();
1389
1389
  }, [
1390
- c,
1391
- d,
1390
+ s,
1391
+ u,
1392
1392
  g
1393
1393
  ]), x = L((e) => {
1394
- if (!d) {
1395
- !c && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
1394
+ if (!u) {
1395
+ !s && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
1396
1396
  return;
1397
1397
  }
1398
- h || (e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), _()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), v()));
1398
+ m || (e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), v()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), y()));
1399
1399
  }, [
1400
- d,
1401
- h,
1402
- c,
1400
+ u,
1401
+ m,
1402
+ s,
1403
1403
  g,
1404
- _,
1405
- v
1404
+ v,
1405
+ y
1406
1406
  ]), C = L((e) => {
1407
- h ? (m(e), _(e)) : m(e);
1408
- }, [h, _]), w = y({
1407
+ m ? (p(e), v(e)) : p(e);
1408
+ }, [m, v]), w = _({
1409
1409
  field: t,
1410
1410
  fieldName: n,
1411
1411
  value: i,
1412
1412
  mode: "display",
1413
1413
  record: a,
1414
- refs: s,
1415
- t: u
1416
- }), T = d ? y({
1414
+ refs: o,
1415
+ t: l
1416
+ }), T = u ? _({
1417
1417
  field: t,
1418
1418
  fieldName: n,
1419
- value: p,
1419
+ value: f,
1420
1420
  mode: "edit",
1421
1421
  onChange: C,
1422
1422
  record: a,
1423
- refs: s,
1424
- t: u
1423
+ refs: o,
1424
+ t: l
1425
1425
  }) : null;
1426
1426
  return /* @__PURE__ */ U("div", {
1427
1427
  className: "peek-field-cell",
1428
- "data-editing": d ? "true" : "false",
1428
+ "data-editing": u ? "true" : "false",
1429
1429
  onClick: b,
1430
1430
  onKeyDown: x,
1431
1431
  onMouseEnter: (e) => {
1432
- c || d || (e.currentTarget.style.borderColor = "var(--border)");
1432
+ s || u || (e.currentTarget.style.borderColor = "var(--border)");
1433
1433
  },
1434
1434
  onMouseLeave: (e) => {
1435
1435
  e.currentTarget.style.borderColor = "transparent";
@@ -1443,13 +1443,13 @@ function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: s, re
1443
1443
  margin: "-4px -6px",
1444
1444
  borderRadius: 4,
1445
1445
  minHeight: 28,
1446
- cursor: c || d ? "default" : "text",
1446
+ cursor: s || u ? "default" : "text",
1447
1447
  border: "1px dashed transparent"
1448
1448
  },
1449
- tabIndex: c || d ? -1 : 0,
1450
- role: c || d ? void 0 : "button",
1451
- "aria-label": c || d ? void 0 : u("list.peek.edit_field", "Edit {field}", { field: r }),
1452
- children: d ? /* @__PURE__ */ W("div", {
1449
+ tabIndex: s || u ? -1 : 0,
1450
+ role: s || u ? void 0 : "button",
1451
+ "aria-label": s || u ? void 0 : l("list.peek.edit_field", "Edit {field}", { field: r }),
1452
+ children: u ? /* @__PURE__ */ W("div", {
1453
1453
  style: {
1454
1454
  display: "flex",
1455
1455
  alignItems: "center",
@@ -1463,16 +1463,16 @@ function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: s, re
1463
1463
  minWidth: 0
1464
1464
  },
1465
1465
  children: T
1466
- }), !h && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(o, {
1466
+ }), !m && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(h, {
1467
1467
  size: 24,
1468
1468
  icon: /* @__PURE__ */ U(e.check, { size: 13 }),
1469
- onClick: () => _(),
1470
- title: u("dialog.save", "Save")
1471
- }), /* @__PURE__ */ U(o, {
1469
+ onClick: () => v(),
1470
+ title: l("dialog.save", "Save")
1471
+ }), /* @__PURE__ */ U(h, {
1472
1472
  size: 24,
1473
1473
  icon: /* @__PURE__ */ U(e.x, { size: 13 }),
1474
- onClick: v,
1475
- title: u("dialog.cancel", "Cancel")
1474
+ onClick: y,
1475
+ title: l("dialog.cancel", "Cancel")
1476
1476
  })] })]
1477
1477
  }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
1478
1478
  style: {
@@ -1480,7 +1480,7 @@ function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: s, re
1480
1480
  minWidth: 0
1481
1481
  },
1482
1482
  children: w
1483
- }), !c && /* @__PURE__ */ U("span", {
1483
+ }), !s && /* @__PURE__ */ U("span", {
1484
1484
  "data-peek-pencil": "true",
1485
1485
  style: {
1486
1486
  position: "absolute",
@@ -1489,13 +1489,13 @@ function Ie({ field: t, fieldName: n, label: r, value: i, record: a, refs: s, re
1489
1489
  transform: "translateY(-50%)"
1490
1490
  },
1491
1491
  className: "peek-pencil",
1492
- children: /* @__PURE__ */ U(o, {
1492
+ children: /* @__PURE__ */ U(h, {
1493
1493
  size: 20,
1494
1494
  icon: /* @__PURE__ */ U(e.edit, { size: 12 }),
1495
1495
  onClick: (e) => {
1496
1496
  e.stopPropagation(), g();
1497
1497
  },
1498
- title: u("list.record.edit", "Edit")
1498
+ title: l("list.record.edit", "Edit")
1499
1499
  })
1500
1500
  })] })
1501
1501
  });
@@ -1506,16 +1506,16 @@ var Le = {
1506
1506
  tab: "Tab",
1507
1507
  esc: "Esc"
1508
1508
  };
1509
- function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatarName: f, fields: p, refs: h, screen: g, actions: _, screenActionLayout: v, entityActionLayout: y, executeAction: x, onClose: C, onOpen: w, onSave: T }) {
1510
- let E = S(), [O, k] = V({ ...s }), [A, j] = V(!1), M = B(null), { run: N } = m(), P = ne(t, g, O);
1509
+ function Re({ entity: t, entityCode: i, record: a, title: c, recordId: u, avatarName: d, fields: f, refs: m, screen: g, actions: _, screenActionLayout: v, entityActionLayout: y, executeAction: x, onClose: C, onOpen: w, onSave: T }) {
1510
+ let E = S(), [O, k] = V({ ...a }), [A, j] = V(!1), M = B(null), { run: N } = p(), P = ne(t, g, O);
1511
1511
  R(() => {
1512
- k({ ...s }), j(!1);
1513
- }, [s]), R(() => {
1512
+ k({ ...a }), j(!1);
1513
+ }, [a]), R(() => {
1514
1514
  M.current?.focus();
1515
1515
  }, []);
1516
1516
  let F = z(() => {
1517
- let e = P?.action_layout ?? v ?? y ?? i(_, "quick_peek"), n = a(e, _, void 0, "quick_peek");
1518
- return u(E, n, _, void 0, O, [], D(t, O));
1517
+ let e = P?.action_layout ?? v ?? y ?? n(_, "quick_peek"), r = o(e, _, void 0, "quick_peek");
1518
+ return l(E, r, _, void 0, O, [], D(t, O));
1519
1519
  }, [
1520
1520
  E,
1521
1521
  P?.action_layout,
@@ -1578,7 +1578,7 @@ function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatar
1578
1578
  },
1579
1579
  children: [
1580
1580
  /* @__PURE__ */ U(G, {
1581
- name: f || c,
1581
+ name: d || c,
1582
1582
  size: 28
1583
1583
  }),
1584
1584
  /* @__PURE__ */ W("div", {
@@ -1596,21 +1596,21 @@ function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatar
1596
1596
  whiteSpace: "nowrap"
1597
1597
  },
1598
1598
  children: c
1599
- }), d && /* @__PURE__ */ U("div", {
1599
+ }), u && /* @__PURE__ */ U("div", {
1600
1600
  className: "mono",
1601
1601
  style: {
1602
1602
  fontSize: 11,
1603
1603
  color: "var(--text-4)"
1604
1604
  },
1605
- children: d
1605
+ children: u
1606
1606
  })]
1607
1607
  }),
1608
- /* @__PURE__ */ U(o, {
1608
+ /* @__PURE__ */ U(h, {
1609
1609
  icon: /* @__PURE__ */ U(e.external, { size: 13 }),
1610
1610
  title: A ? E("list.peek.open_in_tab_dirty", "Open in tab (keeps unsaved changes)") : E("list.peek.open_in_tab", "Open in tab"),
1611
1611
  onClick: () => w(A ? O : null)
1612
1612
  }),
1613
- /* @__PURE__ */ U(o, {
1613
+ /* @__PURE__ */ U(h, {
1614
1614
  icon: /* @__PURE__ */ U(e.x, { size: 14 }),
1615
1615
  title: E("list.peek.close", "Close"),
1616
1616
  onClick: C
@@ -1646,16 +1646,16 @@ function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatar
1646
1646
  esc: /* @__PURE__ */ U(r, { children: Le.esc })
1647
1647
  })
1648
1648
  ]
1649
- }), p.map((e) => /* @__PURE__ */ U(ze, {
1649
+ }), f.map((e) => /* @__PURE__ */ U(ze, {
1650
1650
  label: e.label,
1651
1651
  children: e.kind === "file" ? te({
1652
1652
  entity: t,
1653
- entityCode: n,
1653
+ entityCode: i,
1654
1654
  fieldName: e.key,
1655
1655
  record: O,
1656
1656
  mode: e.readOnly ? "display" : "edit",
1657
1657
  onChange: (t) => L(e.key, t),
1658
- refs: h,
1658
+ refs: m,
1659
1659
  disabled: e.readOnly,
1660
1660
  t: E
1661
1661
  }) : /* @__PURE__ */ U(Ie, {
@@ -1664,7 +1664,7 @@ function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatar
1664
1664
  label: e.label,
1665
1665
  value: O[e.key],
1666
1666
  record: O,
1667
- refs: h,
1667
+ refs: m,
1668
1668
  readOnly: e.readOnly,
1669
1669
  onCommit: (t) => L(e.key, t)
1670
1670
  })
@@ -1714,7 +1714,7 @@ function Re({ entity: t, entityCode: n, record: s, title: c, recordId: d, avatar
1714
1714
  ariaLabel: E("list.peek.actions", "Quick peek actions")
1715
1715
  })
1716
1716
  }),
1717
- /* @__PURE__ */ U(l, {
1717
+ /* @__PURE__ */ U(s, {
1718
1718
  kind: "primary",
1719
1719
  icon: /* @__PURE__ */ U(e.edit, { size: 13 }),
1720
1720
  onClick: () => w(A ? O : null),