@declarion/react 0.53.0 → 0.54.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 (63) hide show
  1. package/dist-lib/{DraggableChildrenTable-BQZTvZaU.js → DraggableChildrenTable-Djc7QDzR.js} +32 -32
  2. package/dist-lib/{Grid-B9Tiytbd.js → Grid-Bd2r0_4J.js} +45 -45
  3. package/dist-lib/{LayoutRenderer-D_v9OD_A.js → LayoutRenderer-V6nf9aa_.js} +716 -714
  4. package/dist-lib/{ListCardsBody-dRnXsQ7A.js → ListCardsBody-Cdsvu0Vs.js} +29 -29
  5. package/dist-lib/{MarkdownRenderer-BCyrsLrd.js → MarkdownRenderer-CZo5ZgM7.js} +1 -1
  6. package/dist-lib/{RefreshControl-CV8nGACW.js → RefreshControl-CJm3vz9p.js} +40 -40
  7. package/dist-lib/{SmartDetailPage.impl-DWprVNMb.js → SmartDetailPage.impl-DoIjCzjQ.js} +492 -492
  8. package/dist-lib/{SmartListPage.impl-BwWURGwa.js → SmartListPage.impl-DnM8e14t.js} +743 -742
  9. package/dist-lib/{SmartRecordListPage.impl-BKKBShAg.js → SmartRecordListPage.impl-BmHGYbD9.js} +128 -128
  10. package/dist-lib/{SortHeaderMenu-pgi4sxMs.js → SortHeaderMenu-CA53NerB.js} +1 -1
  11. package/dist-lib/{action-dispatch-DlHTYag7.js → action-dispatch-JcUrLFaW.js} +177 -177
  12. package/dist-lib/api/agents.d.ts +0 -1
  13. package/dist-lib/api/events.d.ts +13 -4
  14. package/dist-lib/{cardProjection-C7Orz841.js → cardProjection-Q2kwqv8V.js} +19 -19
  15. package/dist-lib/components/actions/ObjectActionBar.d.ts +1 -1
  16. package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
  17. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -1
  18. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -1
  19. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +1 -1
  20. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +1 -1
  21. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +1 -1
  22. package/dist-lib/components/file-widgets/host.d.ts +1 -1
  23. package/dist-lib/components/layout/Layout.d.ts +1 -1
  24. package/dist-lib/components/layout/TopBar.d.ts +1 -1
  25. package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
  26. package/dist-lib/components/list/PeekFieldCell.d.ts +1 -1
  27. package/dist-lib/components/list/QuickPeek.d.ts +1 -1
  28. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  29. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -1
  30. package/dist-lib/components/pages/list/ListCardsBody.d.ts +1 -1
  31. package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
  32. package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
  33. package/dist-lib/components/pages/list/ListToolbar.d.ts +5 -3
  34. package/dist-lib/components/pages/list/columns.d.ts +1 -1
  35. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  36. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +1 -1
  37. package/dist-lib/components/pages/list/useListQuery.d.ts +1 -5
  38. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +1 -1
  39. package/dist-lib/components/pages/list/useListViews.d.ts +1 -1
  40. package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
  41. package/dist-lib/{field-classification-EY8CFF3P.js → field-classification-ssZvtr8J.js} +268 -397
  42. package/dist-lib/{format-count-BHkaDr9V.js → format-count-DHuivNT7.js} +236 -236
  43. package/dist-lib/hooks/useEntityData.d.ts +7 -0
  44. package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
  45. package/dist-lib/hooks/useSSE.d.ts +0 -1
  46. package/dist-lib/index.js +1039 -1020
  47. package/dist-lib/lib/action-dispatch.d.ts +1 -1
  48. package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
  49. package/dist-lib/lib/realtime-reconcile.d.ts +0 -9
  50. package/dist-lib/lib/realtime-resync.d.ts +23 -0
  51. package/dist-lib/{peekDraftStore-1pIajluX.js → peekDraftStore-lm9ViVLA.js} +17 -17
  52. package/dist-lib/{registry-C5ug25M8.js → registry-DsQFhEAD.js} +511 -511
  53. package/dist-lib/stores/realtime.d.ts +86 -19
  54. package/dist-lib/testing.js +40 -40
  55. package/dist-lib/types/api.d.ts +8 -4
  56. package/dist-lib/types/schema.d.ts +6 -0
  57. package/dist-lib/{useCurrentScreen-BdnZq8vZ.js → useCurrentScreen-aHx9HH1m.js} +2473 -1960
  58. package/dist-lib/useListQuery-DZn2BAxY.js +96 -0
  59. package/dist-lib/{useProperties-Bhi9Wn5O.js → useProperties-CAqKmUKg.js} +25 -25
  60. package/dist-lib/{useTabSearchMirror-Dl5x0xKu.js → useTabSearchMirror-DYW9WoK7.js} +10 -10
  61. package/dist-lib/{value-Rp-5W3o8.js → value-CzKQPJOp.js} +4 -4
  62. package/package.json +10 -10
  63. package/dist-lib/useListQuery-BxgrPZIB.js +0 -90
@@ -1,6 +1,6 @@
1
1
  import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
2
- import { Cr as n, Fr as r, H as i, I as a, Ir as o, Jn as s, L as c, Mr as l, Q as u, Zn as d, ct as f, dt as p, et as m, ft as h, gt as g, lt as _, ot as v, pt as y, rt as b, ut as x, wr as S } from "./useCurrentScreen-BdnZq8vZ.js";
3
- import { a as C, c as w, d as T, f as E, i as D, l as O, n as ee, o as k, p as A, r as te, s as j, t as M, u as N } from "./value-Rp-5W3o8.js";
2
+ import { $n as n, B as r, Br as i, F as a, Lr as o, Or as s, P as c, Q as l, Vr as u, X as d, ct as f, dt as p, it as m, kr as h, lt as g, mt as _, nr as v, ot as y, st as b, tt as x, ut as S } from "./useCurrentScreen-aHx9HH1m.js";
3
+ import { a as C, c as w, d as T, f as E, i as D, l as O, n as ee, o as k, p as A, r as te, s as j, t as M, u as N } from "./value-CzKQPJOp.js";
4
4
  import { Fragment as P, Suspense as F, lazy as I, useCallback as L, useEffect as R, useLayoutEffect as z, useMemo as ne, useRef as B, useState as V } from "react";
5
5
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
6
6
  //#region src/components/file-widgets/registry.ts
@@ -36,7 +36,7 @@ function se(e) {
36
36
  return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
37
37
  }
38
38
  function ce(e) {
39
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, alt: o, disabled: s, visual: c, uploadFieldCode: l, uploadSlotCode: u } = e, d = ee(r), [m, g] = V("idle"), [y, b] = V(null), [x, S] = V(null), [C, w] = V(null), [k, te] = V(!1), M = B(null), N = B(!1), P = B(null), { register: F, unregister: I, isDraft: z } = v();
39
+ let { field: t, fieldName: n, value: r, onChange: i, mode: a, alt: o, disabled: s, visual: c, uploadFieldCode: l, uploadSlotCode: u } = e, d = ee(r), [f, p] = V("idle"), [h, _] = V(null), [v, x] = V(null), [C, w] = V(null), [k, te] = V(!1), M = B(null), N = B(!1), P = B(null), { register: F, unregister: I, isDraft: z } = m();
40
40
  R(() => () => {
41
41
  M.current && M.current.abort();
42
42
  }, []);
@@ -46,9 +46,9 @@ function ce(e) {
46
46
  n,
47
47
  d
48
48
  ]), G = (t.accepts ?? ["image/*"]).join(","), K = L(async (r) => {
49
- let a = h(r, t.accepts, t.max_size_bytes);
49
+ let a = S(r, t.accepts, t.max_size_bytes);
50
50
  if (a) {
51
- S(a), g("error");
51
+ x(a), p("error");
52
52
  return;
53
53
  }
54
54
  let o = r;
@@ -59,13 +59,13 @@ function ce(e) {
59
59
  });
60
60
  o = new File([e], n, { type: e.type || r.type });
61
61
  } catch (e) {
62
- S({
62
+ x({
63
63
  code: "CROP_FAILED",
64
64
  message: e instanceof Error ? e.message : "Crop failed"
65
- }), g("error");
65
+ }), p("error");
66
66
  return;
67
67
  }
68
- S(null), N.current = !1, g("uploading"), b({
68
+ x(null), N.current = !1, p("uploading"), _({
69
69
  loaded: 0,
70
70
  total: o.size,
71
71
  pct: 0
@@ -73,19 +73,19 @@ function ce(e) {
73
73
  let s = new AbortController();
74
74
  M.current = s;
75
75
  try {
76
- let r = await p({
76
+ let r = await g({
77
77
  file: o,
78
78
  entityCode: e.entityCode,
79
79
  fieldCode: l ?? n,
80
80
  slotCode: u,
81
81
  signal: s.signal,
82
- onProgress: b
82
+ onProgress: _
83
83
  });
84
84
  if (N.current) {
85
- _(r.id).catch(() => {}), I(r.id);
85
+ b(r.id).catch(() => {}), I(r.id);
86
86
  return;
87
87
  }
88
- d && z(d.id) && (_(d.id).catch(() => {}), I(d.id)), F(r.id, () => _(r.id)), w(r.id), g("idle"), b(null);
88
+ d && z(d.id) && (b(d.id).catch(() => {}), I(d.id)), F(r.id, () => b(r.id)), w(r.id), p("idle"), _(null);
89
89
  let a = {
90
90
  id: r.id,
91
91
  filename: r.filename,
@@ -99,15 +99,15 @@ function ce(e) {
99
99
  };
100
100
  i?.(t.mode === "array" ? [a] : a);
101
101
  } catch (e) {
102
- if (e instanceof f && e.code === "ABORTED") return;
103
- let t = e instanceof f ? {
102
+ if (e instanceof y && e.code === "ABORTED") return;
103
+ let t = e instanceof y ? {
104
104
  code: e.code,
105
105
  message: e.message
106
106
  } : {
107
107
  code: "UNKNOWN",
108
108
  message: e instanceof Error ? e.message : "Upload failed"
109
109
  };
110
- S(t), g("error"), b(null);
110
+ x(t), p("error"), _(null);
111
111
  }
112
112
  }, [
113
113
  t.accepts,
@@ -125,13 +125,13 @@ function ce(e) {
125
125
  l,
126
126
  u
127
127
  ]), q = L(() => {
128
- m === "uploading" && M.current && (N.current = !0, M.current.abort(), M.current = null, g("idle"), b(null)), C && (_(C).catch(() => {}), I(C), w(null));
128
+ f === "uploading" && M.current && (N.current = !0, M.current.abort(), M.current = null, p("idle"), _(null)), C && (b(C).catch(() => {}), I(C), w(null));
129
129
  }, [
130
- m,
130
+ f,
131
131
  C,
132
132
  I
133
133
  ]), re = L(() => {
134
- d && z(d.id) && (_(d.id).catch(() => {}), I(d.id), w(null)), i?.(t.mode === "array" ? [] : null);
134
+ d && z(d.id) && (b(d.id).catch(() => {}), I(d.id), w(null)), i?.(t.mode === "array" ? [] : null);
135
135
  }, [
136
136
  d,
137
137
  t.mode,
@@ -139,7 +139,7 @@ function ce(e) {
139
139
  i,
140
140
  I
141
141
  ]), ie = L(() => {
142
- S(null), g("idle"), P.current?.click();
142
+ x(null), p("idle"), P.current?.click();
143
143
  }, []), J = L(() => {
144
144
  s || P.current?.click();
145
145
  }, [s]), ae = L((e) => {
@@ -194,9 +194,9 @@ function ce(e) {
194
194
  role: "button",
195
195
  "aria-label": H,
196
196
  "aria-disabled": s || void 0,
197
- "aria-busy": m === "uploading" || void 0,
198
- "aria-invalid": m === "error" || void 0,
199
- onClick: m === "idle" && !Z ? J : void 0,
197
+ "aria-busy": f === "uploading" || void 0,
198
+ "aria-invalid": f === "error" || void 0,
199
+ onClick: f === "idle" && !Z ? J : void 0,
200
200
  onMouseDown: k ? Ce : void 0,
201
201
  onKeyDown: ae,
202
202
  onDragOver: se,
@@ -217,18 +217,18 @@ function ce(e) {
217
217
  className: ue(c.shape),
218
218
  style: { objectPosition: j(X) },
219
219
  loading: "lazy"
220
- }) : m === "uploading" ? null : /* @__PURE__ */ U(pe, {
220
+ }) : f === "uploading" ? null : /* @__PURE__ */ U(pe, {
221
221
  shape: c.shape,
222
222
  label: H,
223
223
  placeholder: t.display?.placeholder
224
224
  }),
225
- m === "uploading" && /* @__PURE__ */ U(me, { pct: y?.pct ?? 0 }),
225
+ f === "uploading" && /* @__PURE__ */ U(me, { pct: h?.pct ?? 0 }),
226
226
  C && /* @__PURE__ */ U("span", {
227
227
  className: "absolute right-1 top-1 h-2 w-2 rounded-full bg-warning",
228
228
  "aria-hidden": "true",
229
229
  "data-testid": "draft-indicator"
230
230
  }),
231
- Z && m === "idle" && !s && /* @__PURE__ */ W("div", {
231
+ Z && f === "idle" && !s && /* @__PURE__ */ W("div", {
232
232
  className: "absolute inset-0 flex items-center justify-center gap-2 bg-black/40 opacity-0 transition-opacity hover:opacity-100 focus-within:opacity-100",
233
233
  children: [
234
234
  t.display?.focal_point && /* @__PURE__ */ U("button", {
@@ -264,7 +264,7 @@ function ce(e) {
264
264
  },
265
265
  "data-testid": "focal-point-marker"
266
266
  }),
267
- m === "uploading" && /* @__PURE__ */ U("button", {
267
+ f === "uploading" && /* @__PURE__ */ U("button", {
268
268
  type: "button",
269
269
  className: "absolute bottom-1 right-1 rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
270
270
  onClick: (e) => {
@@ -273,13 +273,13 @@ function ce(e) {
273
273
  "data-testid": "cancel-upload",
274
274
  children: "Cancel"
275
275
  }),
276
- m === "error" && x && /* @__PURE__ */ W("div", {
276
+ f === "error" && v && /* @__PURE__ */ W("div", {
277
277
  className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-destructive-soft px-2 py-1 text-xs text-destructive",
278
278
  role: "alert",
279
279
  children: [/* @__PURE__ */ U("span", {
280
280
  className: "truncate",
281
- title: x.message,
282
- children: x.message
281
+ title: v.message,
282
+ children: v.message
283
283
  }), /* @__PURE__ */ U("button", {
284
284
  type: "button",
285
285
  className: "underline",
@@ -396,7 +396,7 @@ function X(e) {
396
396
  }
397
397
  //#endregion
398
398
  //#region src/components/file-widgets/GridLazy.tsx
399
- var _e = I(() => import("./Grid-B9Tiytbd.js").then((e) => ({ default: e.Grid })));
399
+ var _e = I(() => import("./Grid-Bd2r0_4J.js").then((e) => ({ default: e.Grid })));
400
400
  function Z() {
401
401
  return /* @__PURE__ */ U("div", { className: "h-24 w-full rounded-md bg-muted animate-pulse" });
402
402
  }
@@ -416,19 +416,19 @@ function ye({ contentType: e }) {
416
416
  });
417
417
  }
418
418
  function be(e) {
419
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o, uploadFieldCode: s, uploadSlotCode: c } = e, l = ee(r), [u, d] = V("idle"), [m, g] = V(null), [y, b] = V(null), [S, w] = V(!1), [T, E] = V(l?.filename ?? ""), D = B(null), O = B(!1), A = B(null), { register: j, unregister: M, isDraft: P } = v(), { open: F } = te();
419
+ let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o, uploadFieldCode: s, uploadSlotCode: c } = e, l = ee(r), [u, d] = V("idle"), [p, h] = V(null), [_, v] = V(null), [x, w] = V(!1), [T, E] = V(l?.filename ?? ""), D = B(null), O = B(!1), A = B(null), { register: j, unregister: M, isDraft: P } = m(), { open: F } = te();
420
420
  R(() => () => {
421
421
  D.current && D.current.abort();
422
422
  }, []), R(() => {
423
423
  E(l?.filename ?? "");
424
424
  }, [l?.filename]);
425
425
  let I = (t.accepts ?? []).join(","), z = L(async (r) => {
426
- let a = h(r, t.accepts, t.max_size_bytes);
426
+ let a = S(r, t.accepts, t.max_size_bytes);
427
427
  if (a) {
428
- b(a), d("error");
428
+ v(a), d("error");
429
429
  return;
430
430
  }
431
- b(null), O.current = !1, d("uploading"), g({
431
+ v(null), O.current = !1, d("uploading"), h({
432
432
  loaded: 0,
433
433
  total: r.size,
434
434
  pct: 0
@@ -436,19 +436,19 @@ function be(e) {
436
436
  let o = new AbortController();
437
437
  D.current = o;
438
438
  try {
439
- let a = await p({
439
+ let a = await g({
440
440
  file: r,
441
441
  entityCode: e.entityCode,
442
442
  fieldCode: s ?? n,
443
443
  slotCode: c,
444
444
  signal: o.signal,
445
- onProgress: g
445
+ onProgress: h
446
446
  });
447
447
  if (O.current) {
448
- _(a.id).catch(() => {}), M(a.id);
448
+ b(a.id).catch(() => {}), M(a.id);
449
449
  return;
450
450
  }
451
- l && P(l.id) && (_(l.id).catch(() => {}), M(l.id)), j(a.id, () => _(a.id)), d("idle"), g(null);
451
+ l && P(l.id) && (b(l.id).catch(() => {}), M(l.id)), j(a.id, () => b(a.id)), d("idle"), h(null);
452
452
  let u = {
453
453
  id: a.id,
454
454
  filename: a.filename,
@@ -462,15 +462,15 @@ function be(e) {
462
462
  };
463
463
  i?.(t.mode === "array" ? [u] : u);
464
464
  } catch (e) {
465
- if (e instanceof f && e.code === "ABORTED") return;
466
- let t = e instanceof f ? {
465
+ if (e instanceof y && e.code === "ABORTED") return;
466
+ let t = e instanceof y ? {
467
467
  code: e.code,
468
468
  message: e.message
469
469
  } : {
470
470
  code: "UNKNOWN",
471
471
  message: e instanceof Error ? e.message : "Upload failed"
472
472
  };
473
- b(t), d("error"), g(null);
473
+ v(t), d("error"), h(null);
474
474
  }
475
475
  }, [
476
476
  t.accepts,
@@ -491,7 +491,7 @@ function be(e) {
491
491
  let t = e.target.files?.[0];
492
492
  e.target.value = "", t && z(t);
493
493
  }, [z]), K = L(() => {
494
- l && P(l.id) && (_(l.id).catch(() => {}), M(l.id)), i?.(t.mode === "array" ? [] : null);
494
+ l && P(l.id) && (b(l.id).catch(() => {}), M(l.id)), i?.(t.mode === "array" ? [] : null);
495
495
  }, [
496
496
  l,
497
497
  t.mode,
@@ -499,7 +499,7 @@ function be(e) {
499
499
  i,
500
500
  M
501
501
  ]), q = L(() => {
502
- u === "uploading" && D.current && (O.current = !0, D.current.abort(), D.current = null, d("idle"), g(null));
502
+ u === "uploading" && D.current && (O.current = !0, D.current.abort(), D.current = null, d("idle"), h(null));
503
503
  }, [u]), re = L(() => {
504
504
  l && F(l.id, "download", k(l));
505
505
  }, [l, F]), ie = l ? C(l) : !1, J = L(() => {
@@ -552,10 +552,10 @@ function be(e) {
552
552
  style: { display: "none" },
553
553
  "data-testid": `file-input-${n}`
554
554
  }),
555
- u === "error" && y && /* @__PURE__ */ U("div", {
555
+ u === "error" && _ && /* @__PURE__ */ U("div", {
556
556
  className: "ml-auto text-xs text-destructive",
557
557
  role: "alert",
558
- children: y.message
558
+ children: _.message
559
559
  })
560
560
  ]
561
561
  }) : /* @__PURE__ */ W("div", {
@@ -568,7 +568,7 @@ function be(e) {
568
568
  /* @__PURE__ */ W("div", {
569
569
  className: "flex min-w-0 flex-1 flex-col gap-1",
570
570
  children: [
571
- S && l ? /* @__PURE__ */ U("input", {
571
+ x && l ? /* @__PURE__ */ U("input", {
572
572
  type: "text",
573
573
  className: "rounded-sm border border-border bg-card px-1 py-0.5 text-sm text-foreground",
574
574
  value: T,
@@ -591,7 +591,7 @@ function be(e) {
591
591
  /* @__PURE__ */ W("div", {
592
592
  className: "flex flex-wrap gap-2 text-xs text-muted-foreground",
593
593
  children: [
594
- l && /* @__PURE__ */ U("span", { children: x(l.size_bytes) }),
594
+ l && /* @__PURE__ */ U("span", { children: f(l.size_bytes) }),
595
595
  l?.page_count != null && /* @__PURE__ */ W("span", { children: [l.page_count, " pages"] }),
596
596
  l?.uploaded_at && /* @__PURE__ */ U("span", { children: xe(l.uploaded_at) }),
597
597
  l?.uploaded_by && /* @__PURE__ */ W("span", { children: ["by ", l.uploaded_by] }),
@@ -604,20 +604,20 @@ function be(e) {
604
604
  u === "uploading" && /* @__PURE__ */ W("div", {
605
605
  className: "text-xs text-muted-foreground",
606
606
  role: "progressbar",
607
- "aria-valuenow": m?.pct ?? 0,
607
+ "aria-valuenow": p?.pct ?? 0,
608
608
  "aria-valuemin": 0,
609
609
  "aria-valuemax": 100,
610
610
  "data-testid": "upload-progress",
611
611
  children: [
612
612
  "Uploading ",
613
- m?.pct ?? 0,
613
+ p?.pct ?? 0,
614
614
  "%"
615
615
  ]
616
616
  }),
617
- u === "error" && y && /* @__PURE__ */ U("div", {
617
+ u === "error" && _ && /* @__PURE__ */ U("div", {
618
618
  className: "text-xs text-destructive",
619
619
  role: "alert",
620
- children: y.message
620
+ children: _.message
621
621
  })
622
622
  ]
623
623
  }),
@@ -684,16 +684,16 @@ function Se(e) {
684
684
  return e ? (e.split("/")[1] ?? e).toUpperCase().slice(0, 6) : "";
685
685
  }
686
686
  function Ce(e) {
687
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o } = e, s = M(r), [c, l] = V([]), { register: u, unregister: d, isDraft: m } = v(), g = B(s);
688
- g.current = s;
689
- let y = B(null), b = B(/* @__PURE__ */ new Set()), S = B([]);
690
- S.current = c;
687
+ let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o } = e, s = M(r), [c, l] = V([]), { register: u, unregister: d, isDraft: p } = m(), h = B(s);
688
+ h.current = s;
689
+ let _ = B(null), v = B(/* @__PURE__ */ new Set()), x = B([]);
690
+ x.current = c;
691
691
  let { open: C } = te();
692
692
  R(() => () => {
693
- S.current.forEach((e) => e.abort());
693
+ x.current.forEach((e) => e.abort());
694
694
  }, []);
695
695
  let w = (t.accepts ?? []).join(","), T = a === "display", E = L(async (r) => {
696
- let a = h(r, t.accepts, t.max_size_bytes), o = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, s = new AbortController();
696
+ let a = S(r, t.accepts, t.max_size_bytes), o = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, s = new AbortController();
697
697
  if (a) {
698
698
  l((e) => [...e, {
699
699
  localId: o,
@@ -716,7 +716,7 @@ function Ce(e) {
716
716
  abort: () => s.abort()
717
717
  }]);
718
718
  try {
719
- let t = await p({
719
+ let t = await g({
720
720
  file: r,
721
721
  entityCode: e.entityCode,
722
722
  fieldCode: n,
@@ -726,11 +726,11 @@ function Ce(e) {
726
726
  progress: e
727
727
  } : t))
728
728
  });
729
- if (b.current.delete(o)) {
730
- _(t.id).catch(() => {}), d(t.id);
729
+ if (v.current.delete(o)) {
730
+ b(t.id).catch(() => {}), d(t.id);
731
731
  return;
732
732
  }
733
- u(t.id, () => _(t.id));
733
+ u(t.id, () => b(t.id));
734
734
  let a = {
735
735
  id: t.id,
736
736
  filename: t.filename,
@@ -741,14 +741,14 @@ function Ce(e) {
741
741
  height: t.height,
742
742
  url: t.url,
743
743
  metadata: t.metadata
744
- }, c = [...g.current, a];
745
- g.current = c, i?.(c), l((e) => e.filter((e) => e.localId !== o));
744
+ }, c = [...h.current, a];
745
+ h.current = c, i?.(c), l((e) => e.filter((e) => e.localId !== o));
746
746
  } catch (e) {
747
- if (e instanceof f && e.code === "ABORTED") {
747
+ if (e instanceof y && e.code === "ABORTED") {
748
748
  l((e) => e.filter((e) => e.localId !== o));
749
749
  return;
750
750
  }
751
- let t = e instanceof f ? {
751
+ let t = e instanceof y ? {
752
752
  code: e.code,
753
753
  message: e.message
754
754
  } : {
@@ -773,14 +773,14 @@ function Ce(e) {
773
773
  ]), D = L((e) => {
774
774
  Array.from(e).forEach((e) => void E(e));
775
775
  }, [E]), O = L(() => {
776
- o || y.current?.click();
776
+ o || _.current?.click();
777
777
  }, [o]), ee = L((e) => {
778
778
  let t = e.target.files;
779
779
  e.target.value = "", t && t.length > 0 && D(t);
780
780
  }, [D]), A = L((e) => {
781
- m(e) && (_(e).catch(() => {}), d(e)), i?.(s.filter((t) => t.id !== e));
781
+ p(e) && (b(e).catch(() => {}), d(e)), i?.(s.filter((t) => t.id !== e));
782
782
  }, [
783
- m,
783
+ p,
784
784
  s,
785
785
  i,
786
786
  d
@@ -814,7 +814,7 @@ function Ce(e) {
814
814
  }),
815
815
  /* @__PURE__ */ U("span", {
816
816
  className: "flex-none text-xs text-muted-foreground",
817
- children: x(e.size_bytes)
817
+ children: f(e.size_bytes)
818
818
  }),
819
819
  /* @__PURE__ */ U("button", {
820
820
  type: "button",
@@ -861,7 +861,7 @@ function Ce(e) {
861
861
  type: "button",
862
862
  className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
863
863
  onClick: () => {
864
- e.abort(), b.current.add(e.localId), l((t) => t.filter((t) => t.localId !== e.localId));
864
+ e.abort(), v.current.add(e.localId), l((t) => t.filter((t) => t.localId !== e.localId));
865
865
  },
866
866
  children: e.error ? "Dismiss" : "Cancel"
867
867
  })
@@ -876,7 +876,7 @@ function Ce(e) {
876
876
  "data-testid": "add-files",
877
877
  children: "Add files"
878
878
  }), /* @__PURE__ */ U("input", {
879
- ref: y,
879
+ ref: _,
880
880
  type: "file",
881
881
  accept: w || void 0,
882
882
  multiple: !0,
@@ -991,17 +991,17 @@ function Me(e, t) {
991
991
  function Ne(e, t, n) {
992
992
  if (je(e, n)) return Me(t, n);
993
993
  let r = e.fields.get(n);
994
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? y(t[n], Me(t, n)) : t[n];
994
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? p(t[n], Me(t, n)) : t[n];
995
995
  }
996
996
  function Pe(e, t, n) {
997
997
  let r = e.fields.get(t);
998
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? g(n) : n;
998
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? _(n) : n;
999
999
  }
1000
- function Fe(e, t, n) {
1001
- let r = je(e, t);
1002
- if (r) return r.name || t;
1003
- let i = e.fields.get(t);
1004
- return i ? s(i, t, n) : t;
1000
+ function Fe(e, t, r) {
1001
+ let i = je(e, t);
1002
+ if (i) return i.name || t;
1003
+ let a = e.fields.get(t);
1004
+ return a ? n(a, t, r) : t;
1005
1005
  }
1006
1006
  function Ie(e) {
1007
1007
  let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: o, refs: s, disabled: c, surface: l, entities: u, screens: d, locale: f, fieldId: p, labelId: m, structure: h, detailScreen: g } = e, _ = je(t, r);
@@ -1025,7 +1025,7 @@ function Ie(e) {
1025
1025
  ...v,
1026
1026
  structure: h
1027
1027
  } : v;
1028
- return y ? b({
1028
+ return y ? x({
1029
1029
  field: y,
1030
1030
  entityCode: n,
1031
1031
  fieldName: r,
@@ -1053,7 +1053,7 @@ function Re(e) {
1053
1053
  return e.widget ? "widget" : e.href ? "href" : e.handler ? "handler" : e.association ? "association" : e.ui_steps && e.ui_steps.length > 0 ? "ui_steps" : "unknown";
1054
1054
  }
1055
1055
  function ze(e, t, n, r, i) {
1056
- let a = Re(t), o = m(n, r?.entity), s = r?.entityCode ?? "";
1056
+ let a = Re(t), o = l(n, r?.entity), s = r?.entityCode ?? "";
1057
1057
  if (e === "__peek") return i?.({
1058
1058
  code: e,
1059
1059
  entity: s,
@@ -1122,7 +1122,7 @@ function Q(e, t, n) {
1122
1122
  }
1123
1123
  function Ue(e, t, n) {
1124
1124
  let r = Q(e, t, n);
1125
- return d(r?.display?.name) || e;
1125
+ return v(r?.display?.name) || e;
1126
1126
  }
1127
1127
  function We(e, t, n) {
1128
1128
  return Q(e, t, n)?.display?.icon || void 0;
@@ -1130,27 +1130,27 @@ function We(e, t, n) {
1130
1130
  function Ge(e) {
1131
1131
  return `action-tooltip-${e}`;
1132
1132
  }
1133
- function Ke({ leaf: e, entityActions: r, globalActions: a, onRun: s, loading: c, onLoadingChange: l, measureRef: u, style: d, row: f, widgetContext: p, onActionClick: m, iconOnly: h = !1 }) {
1134
- let g = Q(e.code, r, a), _ = Ue(e.code, r, a), v = We(e.code, r, a), y = g?.destructive ?? !1, b = !y && g?.display?.primary === !0, x = !e.enabled, S = x ? Ge(e.code) : void 0, C = L(async () => {
1135
- if (!(!g || x || c)) {
1136
- l(!0);
1133
+ function Ke({ leaf: e, entityActions: n, globalActions: i, onRun: a, loading: o, onLoadingChange: c, measureRef: l, style: d, row: f, widgetContext: p, onActionClick: m, iconOnly: h = !1 }) {
1134
+ let g = Q(e.code, n, i), _ = Ue(e.code, n, i), v = We(e.code, n, i), y = g?.destructive ?? !1, b = !y && g?.display?.primary === !0, x = !e.enabled, S = x ? Ge(e.code) : void 0, C = L(async () => {
1135
+ if (!(!g || x || o)) {
1136
+ c(!0);
1137
1137
  try {
1138
- ze(e.code, g, f, p, m) || await Promise.resolve(s(e.code, g));
1138
+ ze(e.code, g, f, p, m) || await Promise.resolve(a(e.code, g));
1139
1139
  } finally {
1140
- l(!1);
1140
+ c(!1);
1141
1141
  }
1142
1142
  }
1143
1143
  }, [
1144
1144
  g,
1145
1145
  x,
1146
- c,
1147
- s,
1146
+ o,
1147
+ a,
1148
1148
  e.code,
1149
- l,
1149
+ c,
1150
1150
  f,
1151
1151
  p,
1152
1152
  m
1153
- ]), w = c ? /* @__PURE__ */ U(n, { size: 12 }) : v ? /* @__PURE__ */ U(t, {
1153
+ ]), w = o ? /* @__PURE__ */ U(s, { size: 12 }) : v ? /* @__PURE__ */ U(t, {
1154
1154
  name: v,
1155
1155
  size: 12
1156
1156
  }) : null;
@@ -1165,74 +1165,74 @@ function Ke({ leaf: e, entityActions: r, globalActions: a, onRun: s, loading: c,
1165
1165
  clip: "rect(0,0,0,0)"
1166
1166
  },
1167
1167
  children: e.reason
1168
- }), /* @__PURE__ */ U(o, {
1169
- ref: u,
1168
+ }), /* @__PURE__ */ U(u, {
1169
+ ref: l,
1170
1170
  kind: b ? "primary" : "default",
1171
1171
  danger: y,
1172
1172
  icon: w,
1173
- disabled: x || c,
1173
+ disabled: x || o,
1174
1174
  "aria-disabled": x ? "true" : void 0,
1175
1175
  "aria-describedby": S,
1176
1176
  "aria-label": h ? _ : void 0,
1177
- title: i(g, _, x, e.reason, h),
1177
+ title: r(g, _, x, e.reason, h),
1178
1178
  onClick: C,
1179
1179
  style: d,
1180
1180
  children: h ? null : _
1181
1181
  })] });
1182
1182
  }
1183
- function qe({ group: r, entityActions: i, globalActions: a, onRun: s, loading: c, onLoadingChange: u, measureRef: f, style: p, row: m, widgetContext: h, onActionClick: g }) {
1184
- let _ = B(null), [v, y] = V(!1), b = r.name ? d(r.name) : "Actions", x = L((e) => {
1185
- _.current = e, f?.(e);
1186
- }, [f]), S = L((e, t) => (y(!1), s(e, t)), [s]);
1187
- return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(o, {
1183
+ function qe({ group: n, entityActions: r, globalActions: i, onRun: a, loading: c, onLoadingChange: l, measureRef: d, style: f, row: p, widgetContext: m, onActionClick: h }) {
1184
+ let g = B(null), [_, y] = V(!1), b = n.name ? v(n.name) : "Actions", x = L((e) => {
1185
+ g.current = e, d?.(e);
1186
+ }, [d]), S = L((e, t) => (y(!1), a(e, t)), [a]);
1187
+ return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(u, {
1188
1188
  ref: x,
1189
1189
  kind: "default",
1190
- icon: c == null ? r.icon ? /* @__PURE__ */ U(t, {
1191
- name: r.icon,
1190
+ icon: c == null ? n.icon ? /* @__PURE__ */ U(t, {
1191
+ name: n.icon,
1192
1192
  size: 12
1193
- }) : void 0 : /* @__PURE__ */ U(n, { size: 12 }),
1193
+ }) : void 0 : /* @__PURE__ */ U(s, { size: 12 }),
1194
1194
  iconRight: /* @__PURE__ */ U(e.down, { size: 10 }),
1195
1195
  "aria-haspopup": "menu",
1196
- "aria-expanded": v ? "true" : "false",
1196
+ "aria-expanded": _ ? "true" : "false",
1197
1197
  title: b,
1198
1198
  onClick: () => y((e) => !e),
1199
- style: p,
1199
+ style: f,
1200
1200
  children: b
1201
- }), /* @__PURE__ */ U(l, {
1202
- open: v,
1203
- anchor: _.current,
1201
+ }), /* @__PURE__ */ U(o, {
1202
+ open: _,
1203
+ anchor: g.current,
1204
1204
  onClose: () => y(!1),
1205
1205
  align: "start",
1206
1206
  width: 200,
1207
1207
  children: /* @__PURE__ */ U("div", {
1208
1208
  role: "menu",
1209
1209
  "aria-label": b,
1210
- children: r.items.map((e) => e.kind === "action" ? /* @__PURE__ */ U(Je, {
1210
+ children: n.items.map((e) => e.kind === "action" ? /* @__PURE__ */ U(Je, {
1211
1211
  leaf: e,
1212
- entityActions: i,
1213
- globalActions: a,
1212
+ entityActions: r,
1213
+ globalActions: i,
1214
1214
  onRun: S,
1215
1215
  loading: c === e.code,
1216
- onLoadingChange: (t) => u(t ? e.code : null),
1217
- row: m,
1218
- widgetContext: h,
1219
- onActionClick: g
1216
+ onLoadingChange: (t) => l(t ? e.code : null),
1217
+ row: p,
1218
+ widgetContext: m,
1219
+ onActionClick: h
1220
1220
  }, e.code) : /* @__PURE__ */ U(Ye, {
1221
1221
  group: e,
1222
- entityActions: i,
1223
- globalActions: a,
1222
+ entityActions: r,
1223
+ globalActions: i,
1224
1224
  onRun: S,
1225
1225
  loading: c,
1226
- onLoadingChange: u,
1227
- row: m,
1228
- widgetContext: h,
1229
- onActionClick: g
1226
+ onLoadingChange: l,
1227
+ row: p,
1228
+ widgetContext: m,
1229
+ onActionClick: h
1230
1230
  }, e.items[0]?.kind === "action" ? e.items[0].code : e.icon ?? "group"))
1231
1231
  })
1232
1232
  })] });
1233
1233
  }
1234
- function Je({ leaf: e, entityActions: r, globalActions: a, onRun: o, loading: s, onLoadingChange: c, row: l, widgetContext: u, onActionClick: d }) {
1235
- let f = Q(e.code, r, a), p = Ue(e.code, r, a), m = We(e.code, r, a), h = f?.destructive ?? !1, g = !e.enabled, _ = g ? Ge(e.code) : void 0, v = s ? /* @__PURE__ */ U(n, { size: 12 }) : m ? /* @__PURE__ */ U(t, {
1234
+ function Je({ leaf: e, entityActions: n, globalActions: i, onRun: a, loading: o, onLoadingChange: c, row: l, widgetContext: u, onActionClick: d }) {
1235
+ let f = Q(e.code, n, i), p = Ue(e.code, n, i), m = We(e.code, n, i), h = f?.destructive ?? !1, g = !e.enabled, _ = g ? Ge(e.code) : void 0, v = o ? /* @__PURE__ */ U(s, { size: 12 }) : m ? /* @__PURE__ */ U(t, {
1236
1236
  name: m,
1237
1237
  size: 12
1238
1238
  }) : null;
@@ -1251,12 +1251,12 @@ function Je({ leaf: e, entityActions: r, globalActions: a, onRun: o, loading: s,
1251
1251
  role: "menuitem",
1252
1252
  "aria-disabled": g ? "true" : void 0,
1253
1253
  "aria-describedby": _,
1254
- title: i(f, p, g, e.reason),
1254
+ title: r(f, p, g, e.reason),
1255
1255
  onClick: async () => {
1256
- if (!(!f || g || s)) {
1256
+ if (!(!f || g || o)) {
1257
1257
  c(!0);
1258
1258
  try {
1259
- ze(e.code, f, l, u, d) || await Promise.resolve(o(e.code, f));
1259
+ ze(e.code, f, l, u, d) || await Promise.resolve(a(e.code, f));
1260
1260
  } finally {
1261
1261
  c(!1);
1262
1262
  }
@@ -1292,7 +1292,7 @@ function Je({ leaf: e, entityActions: r, globalActions: a, onRun: o, loading: s,
1292
1292
  })] });
1293
1293
  }
1294
1294
  function Ye({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c }) {
1295
- let l = e.name ? d(e.name) : void 0;
1295
+ let l = e.name ? v(e.name) : void 0;
1296
1296
  return /* @__PURE__ */ W(H, { children: [l && /* @__PURE__ */ U("div", {
1297
1297
  style: {
1298
1298
  padding: "4px 10px 2px",
@@ -1325,21 +1325,21 @@ function Ye({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
1325
1325
  onActionClick: c
1326
1326
  }, e.icon ?? "nested"))] });
1327
1327
  }
1328
- function Xe({ layout: t, entityActions: i, globalActions: a, onRun: o, row: s, widgetContext: c, onActionClick: u }) {
1329
- let d = B(null), [f, p] = V(!1), [m, h] = V(null), g = L((e, t) => (p(!1), o(e, t)), [o]);
1328
+ function Xe({ layout: t, entityActions: n, globalActions: r, onRun: a, row: c, widgetContext: l, onActionClick: u }) {
1329
+ let d = B(null), [f, p] = V(!1), [m, h] = V(null), g = L((e, t) => (p(!1), a(e, t)), [a]);
1330
1330
  return Be(t) === 0 ? null : /* @__PURE__ */ W("div", {
1331
1331
  "data-open": f ? "true" : void 0,
1332
1332
  style: {
1333
1333
  display: "inline-flex",
1334
1334
  alignItems: "center"
1335
1335
  },
1336
- children: [/* @__PURE__ */ U(r, {
1336
+ children: [/* @__PURE__ */ U(i, {
1337
1337
  ref: d,
1338
- icon: U(m == null ? e.more : n, { size: 14 }),
1338
+ icon: U(m == null ? e.more : s, { size: 14 }),
1339
1339
  title: "Actions",
1340
1340
  size: 28,
1341
1341
  onClick: () => p((e) => !e)
1342
- }), /* @__PURE__ */ U(l, {
1342
+ }), /* @__PURE__ */ U(o, {
1343
1343
  open: f,
1344
1344
  anchor: d.current,
1345
1345
  onClose: () => p(!1),
@@ -1347,13 +1347,13 @@ function Xe({ layout: t, entityActions: i, globalActions: a, onRun: o, row: s, w
1347
1347
  width: 220,
1348
1348
  children: /* @__PURE__ */ U(Qe, {
1349
1349
  layout: t,
1350
- entityActions: i,
1351
- globalActions: a,
1350
+ entityActions: n,
1351
+ globalActions: r,
1352
1352
  onRun: g,
1353
1353
  loading: m,
1354
1354
  onLoadingChange: h,
1355
- row: s,
1356
- widgetContext: c,
1355
+ row: c,
1356
+ widgetContext: l,
1357
1357
  onActionClick: u
1358
1358
  })
1359
1359
  })]
@@ -1361,12 +1361,12 @@ function Xe({ layout: t, entityActions: i, globalActions: a, onRun: o, row: s, w
1361
1361
  }
1362
1362
  function Ze(e) {
1363
1363
  let t = 0;
1364
- for (let n of e) if (n.kind === "action" && u(n.code)) t++;
1364
+ for (let n of e) if (n.kind === "action" && d(n.code)) t++;
1365
1365
  else break;
1366
1366
  return t;
1367
1367
  }
1368
1368
  function Qe({ layout: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c, ariaLabel: l = "Row actions" }) {
1369
- let { normal: u, destructive: d } = Ve(e, t, n), f = Ze(u), p = u.slice(0, f), m = u.slice(f), h = d.length > 0, g = m.length > 0, _ = (e) => /* @__PURE__ */ U(Je, {
1369
+ let { normal: u, destructive: d } = Ve(e, t, n), f = Ze(u), p = u.slice(0, f), m = u.slice(f), g = d.length > 0, _ = m.length > 0, v = (e) => /* @__PURE__ */ U(Je, {
1370
1370
  leaf: e,
1371
1371
  entityActions: t,
1372
1372
  globalActions: n,
@@ -1381,9 +1381,9 @@ function Qe({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
1381
1381
  role: "menu",
1382
1382
  "aria-label": l,
1383
1383
  children: [
1384
- p.map((e) => e.kind === "action" ? _(e) : null),
1385
- p.length > 0 && g && /* @__PURE__ */ U(S, { divider: !0 }),
1386
- m.map((e) => e.kind === "action" ? _(e) : /* @__PURE__ */ U(Ye, {
1384
+ p.map((e) => e.kind === "action" ? v(e) : null),
1385
+ p.length > 0 && _ && /* @__PURE__ */ U(h, { divider: !0 }),
1386
+ m.map((e) => e.kind === "action" ? v(e) : /* @__PURE__ */ U(Ye, {
1387
1387
  group: e,
1388
1388
  entityActions: t,
1389
1389
  globalActions: n,
@@ -1394,8 +1394,8 @@ function Qe({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
1394
1394
  widgetContext: s,
1395
1395
  onActionClick: c
1396
1396
  }, e.icon ?? "group")),
1397
- h && /* @__PURE__ */ U(S, { divider: !0 }),
1398
- d.map((e) => _(e))
1397
+ g && /* @__PURE__ */ U(h, { divider: !0 }),
1398
+ d.map((e) => v(e))
1399
1399
  ]
1400
1400
  });
1401
1401
  }
@@ -1460,7 +1460,7 @@ function ft(e, t, n, r, i, a, o, s, c) {
1460
1460
  };
1461
1461
  }
1462
1462
  function $(e) {
1463
- return e.kind === "action" ? `action:${e.code}` : `group:${e.name ? d(e.name) : ""}`;
1463
+ return e.kind === "action" ? `action:${e.code}` : `group:${e.name ? v(e.name) : ""}`;
1464
1464
  }
1465
1465
  function pt(e) {
1466
1466
  let t = e.parentElement;
@@ -1469,8 +1469,8 @@ function pt(e) {
1469
1469
  let n = getComputedStyle(t);
1470
1470
  return !(parseFloat(n.flexGrow) > 0 || n.display === "block" || n.display === "flow-root" || n.width !== "auto" || n.maxWidth !== "none");
1471
1471
  }
1472
- function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedRightWidth: a = 0, measurementOverride: s, ariaLabel: c = "Actions", align: u = "trailing", constrain: d = !0, row: f, widgetContext: p, onActionClick: m }) {
1473
- let h = B(null), g = B(null), [_, v] = V(0), [y, b] = V(/* @__PURE__ */ new Map()), [x, C] = V(!1), [w, T] = V(null), [E, D] = V(() => typeof document < "u" && document.documentElement.dir === "rtl");
1472
+ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedRightWidth: a = 0, measurementOverride: s, ariaLabel: c = "Actions", align: l = "trailing", constrain: d = !0, row: f, widgetContext: p, onActionClick: m }) {
1473
+ let g = B(null), _ = B(null), [v, y] = V(0), [b, x] = V(/* @__PURE__ */ new Map()), [S, C] = V(!1), [w, T] = V(null), [E, D] = V(() => typeof document < "u" && document.documentElement.dir === "rtl");
1474
1474
  R(() => {
1475
1475
  if (typeof MutationObserver > "u") return;
1476
1476
  let e = new MutationObserver((e) => {
@@ -1482,16 +1482,16 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1482
1482
  }), () => e.disconnect();
1483
1483
  }, []);
1484
1484
  let O = B(null), [ee, k] = V(!1), A = L((e, t) => (k(!1), i(e, t)), [i]), te = Be(t), j = !!s, M = L(() => {
1485
- if (j || !g.current) return;
1486
- let e = Array.from(g.current.children), t = /* @__PURE__ */ new Map();
1485
+ if (j || !_.current) return;
1486
+ let e = Array.from(_.current.children), t = /* @__PURE__ */ new Map();
1487
1487
  e.forEach((e) => {
1488
1488
  let n = e.dataset.nodeKey;
1489
1489
  n && t.set(n, e.getBoundingClientRect().width || e.offsetWidth);
1490
- }), b((e) => lt(e, t) ? e : t), C(!0);
1490
+ }), x((e) => lt(e, t) ? e : t), C(!0);
1491
1491
  }, [j]), N = ne(() => JSON.stringify(t.map((e) => $(e))), [t]);
1492
1492
  R(() => {
1493
1493
  if (j) return;
1494
- let e = g.current;
1494
+ let e = _.current;
1495
1495
  if (!e || typeof ResizeObserver > "u") return;
1496
1496
  let t = new ResizeObserver(() => M());
1497
1497
  t.observe(e);
@@ -1516,46 +1516,46 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1516
1516
  M,
1517
1517
  j
1518
1518
  ]), R(() => {
1519
- if (j || x) return;
1519
+ if (j || S) return;
1520
1520
  let e = setTimeout(() => {
1521
1521
  M(), C(!0);
1522
1522
  }, 16);
1523
1523
  return () => clearTimeout(e);
1524
1524
  }, [
1525
- x,
1525
+ S,
1526
1526
  M,
1527
1527
  j
1528
1528
  ]), R(() => {
1529
- if (j || !d || !x || _ === 0) return;
1530
- let e = h.current;
1529
+ if (j || !d || !S || v === 0) return;
1530
+ let e = g.current;
1531
1531
  if (!e || !pt(e)) return;
1532
1532
  let t = [...e.children].filter((e) => e.getAttribute("aria-hidden") !== "true"), n = t.length > 1 ? (t.length - 1) * 4 : 0, r = t.reduce((e, t) => e + t.getBoundingClientRect().width, 0) + n;
1533
- r > 0 && Math.abs(_ - r) < 1 && console.error(`[declarion] ResponsiveActionBar is measuring itself: its container is ${Math.round(_)}px, exactly the width of what it just rendered. The slot holding this bar is sized by its own content, so it cannot tell the bar how much room there is. Give that slot \`flex: 1 1 auto; min-width: 0\` (and justify its content to the edge the buttons sit on), or pass \`constrain={false}\` if it genuinely has no row to take space from.`);
1533
+ r > 0 && Math.abs(v - r) < 1 && console.error(`[declarion] ResponsiveActionBar is measuring itself: its container is ${Math.round(v)}px, exactly the width of what it just rendered. The slot holding this bar is sized by its own content, so it cannot tell the bar how much room there is. Give that slot \`flex: 1 1 auto; min-width: 0\` (and justify its content to the edge the buttons sit on), or pass \`constrain={false}\` if it genuinely has no row to take space from.`);
1534
1534
  }, [
1535
1535
  j,
1536
1536
  d,
1537
- x,
1538
- _,
1539
- y
1537
+ S,
1538
+ v,
1539
+ b
1540
1540
  ]), R(() => {
1541
1541
  if (j) return;
1542
- let e = h.current;
1542
+ let e = g.current;
1543
1543
  if (!e) return;
1544
1544
  if (typeof ResizeObserver > "u") {
1545
- v(e.getBoundingClientRect().width);
1545
+ y(e.getBoundingClientRect().width);
1546
1546
  return;
1547
1547
  }
1548
1548
  let t = new ResizeObserver((e) => {
1549
1549
  let t = e[0];
1550
- t && v(t.contentRect.width);
1550
+ t && y(t.contentRect.width);
1551
1551
  });
1552
- return t.observe(e), v(e.getBoundingClientRect().width), () => t.disconnect();
1552
+ return t.observe(e), y(e.getBoundingClientRect().width), () => t.disconnect();
1553
1553
  }, [j]);
1554
1554
  let F = B(void 0), I = B(void 0);
1555
1555
  R(() => {
1556
1556
  F.current = void 0, I.current = void 0;
1557
1557
  }, [N]);
1558
- let G = ne(() => j || !d ? ft(t, 2 ** 53 - 1, a, y, n, r, s) : x ? _ === 0 ? ft(t, 2 ** 53 - 1, a, y, n, r, s) : ft(t, _, a, y, n, r, s, F.current, I.current) : {
1558
+ let G = ne(() => j || !d ? ft(t, 2 ** 53 - 1, a, b, n, r, s) : S ? v === 0 ? ft(t, 2 ** 53 - 1, a, b, n, r, s) : ft(t, v, a, b, n, r, s, F.current, I.current) : {
1559
1559
  primaryInline: [],
1560
1560
  inline: [],
1561
1561
  overflow: [],
@@ -1564,29 +1564,29 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1564
1564
  }, [
1565
1565
  j,
1566
1566
  d,
1567
- x,
1568
- _,
1567
+ S,
1568
+ v,
1569
1569
  t,
1570
1570
  a,
1571
- y,
1571
+ b,
1572
1572
  n,
1573
1573
  r,
1574
1574
  s
1575
1575
  ]);
1576
1576
  if (R(() => {
1577
- !x && !j || (F.current = new Set([
1577
+ !S && !j || (F.current = new Set([
1578
1578
  ...G.primaryInline,
1579
1579
  ...G.inline,
1580
1580
  ...G.destructiveInline
1581
1581
  ].map($)), I.current = new Set(G.iconOnly));
1582
1582
  }, [
1583
1583
  G,
1584
- x,
1584
+ S,
1585
1585
  j
1586
1586
  ]), te === 0) return null;
1587
1587
  let K = G.overflow.length > 0, { normal: q, destructive: re } = Ve(G.overflow, n, r);
1588
1588
  return /* @__PURE__ */ W("div", {
1589
- ref: h,
1589
+ ref: g,
1590
1590
  role: "toolbar",
1591
1591
  "aria-label": c,
1592
1592
  style: {
@@ -1595,16 +1595,16 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1595
1595
  alignItems: "center",
1596
1596
  gap: tt,
1597
1597
  flexWrap: "wrap",
1598
- visibility: x || j ? "visible" : "hidden",
1598
+ visibility: S || j ? "visible" : "hidden",
1599
1599
  position: "relative",
1600
1600
  flex: d ? "1 1 auto" : "0 1 auto",
1601
- justifyContent: u === "trailing" ? "flex-end" : "flex-start",
1601
+ justifyContent: l === "trailing" ? "flex-end" : "flex-start",
1602
1602
  minWidth: 0,
1603
1603
  boxSizing: "border-box"
1604
1604
  },
1605
1605
  children: [
1606
1606
  /* @__PURE__ */ W("div", {
1607
- ref: g,
1607
+ ref: _,
1608
1608
  "aria-hidden": "true",
1609
1609
  inert: !0,
1610
1610
  style: {
@@ -1618,7 +1618,7 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1618
1618
  width: "max-content",
1619
1619
  flexWrap: "nowrap"
1620
1620
  },
1621
- children: [/* @__PURE__ */ U(o, {
1621
+ children: [/* @__PURE__ */ U(u, {
1622
1622
  "data-node-key": $e,
1623
1623
  iconRight: /* @__PURE__ */ U(e.down, { size: 10 }),
1624
1624
  tabIndex: -1,
@@ -1697,7 +1697,7 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1697
1697
  onActionClick: m
1698
1698
  }, t);
1699
1699
  }),
1700
- K && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(o, {
1700
+ K && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(u, {
1701
1701
  ref: O,
1702
1702
  kind: "default",
1703
1703
  iconRight: /* @__PURE__ */ U(e.down, { size: 10 }),
@@ -1705,7 +1705,7 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1705
1705
  "aria-expanded": ee ? "true" : "false",
1706
1706
  onClick: () => k((e) => !e),
1707
1707
  children: "Actions"
1708
- }), /* @__PURE__ */ U(l, {
1708
+ }), /* @__PURE__ */ U(o, {
1709
1709
  open: ee,
1710
1710
  anchor: O.current,
1711
1711
  onClose: () => k(!1),
@@ -1718,7 +1718,7 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1718
1718
  ...q,
1719
1719
  ...re.length > 0 ? [null] : [],
1720
1720
  ...re
1721
- ].map((e, t) => e === null ? /* @__PURE__ */ U(S, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ U(Je, {
1721
+ ].map((e, t) => e === null ? /* @__PURE__ */ U(h, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ U(Je, {
1722
1722
  leaf: e,
1723
1723
  entityActions: n,
1724
1724
  globalActions: r,
@@ -1979,7 +1979,7 @@ function Rt(e, t, n) {
1979
1979
  //#endregion
1980
1980
  //#region src/lib/action-dispatch.ts
1981
1981
  function zt(e, t, n, r) {
1982
- return c(t) ? (a(t.ui_steps, n), null) : t.entity ? `${t.entity}.${e}` : r ? `${r}.${e}` : e;
1982
+ return a(t) ? (c(t.ui_steps, n), null) : t.entity ? `${t.entity}.${e}` : r ? `${r}.${e}` : e;
1983
1983
  }
1984
1984
  //#endregion
1985
1985
  export { K as C, re as S, ge as _, It as a, ae as b, gt as c, Me as d, Ne as f, X as g, Pe as h, Nt as i, Qe as l, Fe as m, Ft as n, Pt as o, Ie as p, Rt as r, wt as s, zt as t, je as u, he as v, q as x, Y as y };