@declarion/react 0.52.0 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-BQZTvZaU.js} +35 -35
  2. package/dist-lib/{Grid-DUjbQg3r.js → Grid-B9Tiytbd.js} +28 -28
  3. package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-D_v9OD_A.js} +920 -922
  4. package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-dRnXsQ7A.js} +14 -14
  5. package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-BCyrsLrd.js} +10 -10
  6. package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
  7. package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-CV8nGACW.js} +120 -122
  8. package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-DWprVNMb.js} +376 -377
  9. package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-BwWURGwa.js} +1098 -1099
  10. package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-BKKBShAg.js} +183 -183
  11. package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-pgi4sxMs.js} +1 -1
  12. package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DlHTYag7.js} +382 -382
  13. package/dist-lib/api/events.d.ts +27 -5
  14. package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-C7Orz841.js} +146 -204
  15. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  16. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
  17. package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
  18. package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
  19. package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
  20. package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-EY8CFF3P.js} +301 -320
  21. package/dist-lib/{format-count-C3N-WxEy.js → format-count-BHkaDr9V.js} +245 -245
  22. package/dist-lib/hooks/useMutations.d.ts +1 -1
  23. package/dist-lib/hooks/useSSE.d.ts +24 -4
  24. package/dist-lib/index.js +1541 -1832
  25. package/dist-lib/lib/document-templates.d.ts +1 -1
  26. package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
  27. package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-1pIajluX.js} +36 -36
  28. package/dist-lib/{registry-p6CejATt.js → registry-C5ug25M8.js} +507 -507
  29. package/dist-lib/stores/realtime.d.ts +20 -0
  30. package/dist-lib/testing.js +35 -35
  31. package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-BdnZq8vZ.js} +2504 -1557
  32. package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-BxgrPZIB.js} +13 -10
  33. package/dist-lib/{useProperties-C5fZp12D.js → useProperties-Bhi9Wn5O.js} +25 -25
  34. package/dist-lib/useTabSearchMirror-Dl5x0xKu.js +177 -0
  35. package/dist-lib/{value-DKekzcjz.js → value-Rp-5W3o8.js} +25 -25
  36. package/package.json +7 -7
  37. package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
@@ -1,6 +1,6 @@
1
1
  import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
2
- import { $n as n, B as r, Dn as i, E as a, I as o, L as s, O as c, P as l, R as u, V as d, W as f, cr as p, d as m, dr as h, er as g, fr as _, g as v, j as y, u as b, wn as x, z as S } from "./useCurrentScreen-74x5yJNb.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-DKekzcjz.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";
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,57 +36,57 @@ 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: i, onChange: a, mode: c, alt: u, disabled: d, visual: f, uploadFieldCode: p, uploadSlotCode: m } = e, h = ee(i), [g, _] = V("idle"), [v, y] = V(null), [b, 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 } = l();
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();
40
40
  R(() => () => {
41
41
  M.current && M.current.abort();
42
42
  }, []);
43
- let H = ne(() => E(h, u, t.display?.placeholder || n), [
44
- u,
43
+ let H = ne(() => E(d, o, t.display?.placeholder || n), [
44
+ o,
45
45
  t.display?.placeholder,
46
46
  n,
47
- h
48
- ]), G = (t.accepts ?? ["image/*"]).join(","), K = L(async (i) => {
49
- let c = r(i, t.accepts, t.max_size_bytes);
50
- if (c) {
51
- x(c), _("error");
47
+ d
48
+ ]), G = (t.accepts ?? ["image/*"]).join(","), K = L(async (r) => {
49
+ let a = h(r, t.accepts, t.max_size_bytes);
50
+ if (a) {
51
+ S(a), g("error");
52
52
  return;
53
53
  }
54
- let l = i;
54
+ let o = r;
55
55
  if (t.display?.crop_on_upload) try {
56
56
  let { blob: e, filename: n } = await Y()({
57
- file: i,
57
+ file: r,
58
58
  aspectRatio: fe(t.display.aspect_ratio)
59
59
  });
60
- l = new File([e], n, { type: e.type || i.type });
60
+ o = new File([e], n, { type: e.type || r.type });
61
61
  } catch (e) {
62
- x({
62
+ S({
63
63
  code: "CROP_FAILED",
64
64
  message: e instanceof Error ? e.message : "Crop failed"
65
- }), _("error");
65
+ }), g("error");
66
66
  return;
67
67
  }
68
- x(null), N.current = !1, _("uploading"), y({
68
+ S(null), N.current = !1, g("uploading"), b({
69
69
  loaded: 0,
70
- total: l.size,
70
+ total: o.size,
71
71
  pct: 0
72
72
  });
73
- let u = new AbortController();
74
- M.current = u;
73
+ let s = new AbortController();
74
+ M.current = s;
75
75
  try {
76
- let r = await S({
77
- file: l,
76
+ let r = await p({
77
+ file: o,
78
78
  entityCode: e.entityCode,
79
- fieldCode: p ?? n,
80
- slotCode: m,
81
- signal: u.signal,
82
- onProgress: y
79
+ fieldCode: l ?? n,
80
+ slotCode: u,
81
+ signal: s.signal,
82
+ onProgress: b
83
83
  });
84
84
  if (N.current) {
85
- s(r.id).catch(() => {}), I(r.id);
85
+ _(r.id).catch(() => {}), I(r.id);
86
86
  return;
87
87
  }
88
- h && z(h.id) && (s(h.id).catch(() => {}), I(h.id)), F(r.id, () => s(r.id)), w(r.id), _("idle"), y(null);
89
- let i = {
88
+ d && z(d.id) && (_(d.id).catch(() => {}), I(d.id)), F(r.id, () => _(r.id)), w(r.id), g("idle"), b(null);
89
+ let a = {
90
90
  id: r.id,
91
91
  filename: r.filename,
92
92
  content_type: r.content_type,
@@ -97,17 +97,17 @@ function ce(e) {
97
97
  url: r.url,
98
98
  metadata: r.metadata
99
99
  };
100
- a?.(t.mode === "array" ? [i] : i);
100
+ i?.(t.mode === "array" ? [a] : a);
101
101
  } catch (e) {
102
- if (e instanceof o && e.code === "ABORTED") return;
103
- let t = e instanceof o ? {
102
+ if (e instanceof f && e.code === "ABORTED") return;
103
+ let t = e instanceof f ? {
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
- x(t), _("error"), y(null);
110
+ S(t), g("error"), b(null);
111
111
  }
112
112
  }, [
113
113
  t.accepts,
@@ -116,87 +116,87 @@ function ce(e) {
116
116
  t.display?.aspect_ratio,
117
117
  t.mode,
118
118
  n,
119
- a,
119
+ i,
120
120
  e.entityCode,
121
121
  F,
122
122
  z,
123
- h,
123
+ d,
124
124
  I,
125
- p,
126
- m
125
+ l,
126
+ u
127
127
  ]), q = L(() => {
128
- g === "uploading" && M.current && (N.current = !0, M.current.abort(), M.current = null, _("idle"), y(null)), C && (s(C).catch(() => {}), I(C), w(null));
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));
129
129
  }, [
130
- g,
130
+ m,
131
131
  C,
132
132
  I
133
133
  ]), re = L(() => {
134
- h && z(h.id) && (s(h.id).catch(() => {}), I(h.id), w(null)), a?.(t.mode === "array" ? [] : null);
134
+ d && z(d.id) && (_(d.id).catch(() => {}), I(d.id), w(null)), i?.(t.mode === "array" ? [] : null);
135
135
  }, [
136
- h,
136
+ d,
137
137
  t.mode,
138
138
  z,
139
- a,
139
+ i,
140
140
  I
141
141
  ]), ie = L(() => {
142
- x(null), _("idle"), P.current?.click();
142
+ S(null), g("idle"), P.current?.click();
143
143
  }, []), J = L(() => {
144
- d || P.current?.click();
145
- }, [d]), ae = L((e) => {
146
- d || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J());
147
- }, [d, J]), se = L((e) => {
148
- d || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
149
- }, [d]), ce = L((e) => {
150
- if (d) return;
144
+ s || P.current?.click();
145
+ }, [s]), ae = L((e) => {
146
+ s || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J());
147
+ }, [s, J]), se = L((e) => {
148
+ s || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
149
+ }, [s]), ce = L((e) => {
150
+ if (s) return;
151
151
  e.preventDefault();
152
152
  let t = e.dataTransfer.files?.[0];
153
153
  t && K(t);
154
- }, [d, K]), he = L((e) => {
154
+ }, [s, K]), he = L((e) => {
155
155
  let t = e.target.files?.[0];
156
156
  e.target.value = "", t && K(t);
157
- }, [K]), ge = f.aspectRatio ?? de(f.shape, t.display?.aspect_ratio), X = T(h), _e = {
157
+ }, [K]), ge = c.aspectRatio ?? de(c.shape, t.display?.aspect_ratio), X = T(d), _e = {
158
158
  aspectRatio: ge,
159
- width: f.width ?? (f.shape === "wide" ? "100%" : "120px")
160
- }, Z = !!h, ve = oe(h, t.display?.listable_thumbnail), ye = O(h, t.display?.listable_thumbnail), be = D(h?.id, ye, ve), xe = c === "display", Se = L((e) => {
159
+ width: c.width ?? (c.shape === "wide" ? "100%" : "120px")
160
+ }, Z = !!d, ve = oe(d, t.display?.listable_thumbnail), ye = O(d, t.display?.listable_thumbnail), be = D(d?.id, ye, ve), xe = a === "display", Se = L((e) => {
161
161
  e.stopPropagation(), te((e) => !e);
162
162
  }, []), Ce = L((e) => {
163
- if (!h || !k) return;
164
- let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, i = n.height > 0 ? (e.clientY - n.top) / n.height : .5, o = A(h, {
163
+ if (!d || !k) return;
164
+ let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, a = n.height > 0 ? (e.clientY - n.top) / n.height : .5, o = A(d, {
165
165
  x: Math.max(0, Math.min(1, r)),
166
- y: Math.max(0, Math.min(1, i))
166
+ y: Math.max(0, Math.min(1, a))
167
167
  });
168
- a?.(t.mode === "array" ? [o] : o), te(!1);
168
+ i?.(t.mode === "array" ? [o] : o), te(!1);
169
169
  }, [
170
170
  t.mode,
171
- h,
171
+ d,
172
172
  k,
173
- a
173
+ i
174
174
  ]);
175
175
  return xe ? /* @__PURE__ */ U("div", {
176
- className: le(f.shape, !1),
176
+ className: le(c.shape, !1),
177
177
  style: _e,
178
178
  "aria-label": H,
179
179
  children: Z && be ? /* @__PURE__ */ U("img", {
180
180
  src: be,
181
181
  alt: H,
182
- className: ue(f.shape),
182
+ className: ue(c.shape),
183
183
  style: { objectPosition: j(X) },
184
184
  loading: "lazy"
185
185
  }) : /* @__PURE__ */ U(pe, {
186
- shape: f.shape,
186
+ shape: c.shape,
187
187
  label: H,
188
188
  placeholder: t.display?.placeholder
189
189
  })
190
190
  }) : /* @__PURE__ */ W("div", {
191
- className: le(f.shape, !d),
191
+ className: le(c.shape, !s),
192
192
  style: _e,
193
- tabIndex: d ? -1 : 0,
193
+ tabIndex: s ? -1 : 0,
194
194
  role: "button",
195
195
  "aria-label": H,
196
- "aria-disabled": d || void 0,
197
- "aria-busy": g === "uploading" || void 0,
198
- "aria-invalid": g === "error" || void 0,
199
- onClick: g === "idle" && !Z ? J : void 0,
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,
200
200
  onMouseDown: k ? Ce : void 0,
201
201
  onKeyDown: ae,
202
202
  onDragOver: se,
@@ -214,21 +214,21 @@ function ce(e) {
214
214
  Z && be ? /* @__PURE__ */ U("img", {
215
215
  src: be,
216
216
  alt: H,
217
- className: ue(f.shape),
217
+ className: ue(c.shape),
218
218
  style: { objectPosition: j(X) },
219
219
  loading: "lazy"
220
- }) : g === "uploading" ? null : /* @__PURE__ */ U(pe, {
221
- shape: f.shape,
220
+ }) : m === "uploading" ? null : /* @__PURE__ */ U(pe, {
221
+ shape: c.shape,
222
222
  label: H,
223
223
  placeholder: t.display?.placeholder
224
224
  }),
225
- g === "uploading" && /* @__PURE__ */ U(me, { pct: v?.pct ?? 0 }),
225
+ m === "uploading" && /* @__PURE__ */ U(me, { pct: y?.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 && g === "idle" && !d && /* @__PURE__ */ W("div", {
231
+ Z && m === "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
- g === "uploading" && /* @__PURE__ */ U("button", {
267
+ m === "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
- g === "error" && b && /* @__PURE__ */ W("div", {
276
+ m === "error" && x && /* @__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: b.message,
282
- children: b.message
281
+ title: x.message,
282
+ children: x.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-DUjbQg3r.js").then((e) => ({ default: e.Grid })));
399
+ var _e = I(() => import("./Grid-B9Tiytbd.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,116 +416,116 @@ function ye({ contentType: e }) {
416
416
  });
417
417
  }
418
418
  function be(e) {
419
- let { field: t, fieldName: n, value: i, onChange: a, mode: c, disabled: d, uploadFieldCode: f, uploadSlotCode: p } = e, m = ee(i), [h, g] = V("idle"), [_, v] = V(null), [y, b] = V(null), [x, w] = V(!1), [T, E] = V(m?.filename ?? ""), D = B(null), O = B(!1), A = B(null), { register: j, unregister: M, isDraft: P } = l(), { 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"), [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();
420
420
  R(() => () => {
421
421
  D.current && D.current.abort();
422
422
  }, []), R(() => {
423
- E(m?.filename ?? "");
424
- }, [m?.filename]);
425
- let I = (t.accepts ?? []).join(","), z = L(async (i) => {
426
- let c = r(i, t.accepts, t.max_size_bytes);
427
- if (c) {
428
- b(c), g("error");
423
+ E(l?.filename ?? "");
424
+ }, [l?.filename]);
425
+ let I = (t.accepts ?? []).join(","), z = L(async (r) => {
426
+ let a = h(r, t.accepts, t.max_size_bytes);
427
+ if (a) {
428
+ b(a), d("error");
429
429
  return;
430
430
  }
431
- b(null), O.current = !1, g("uploading"), v({
431
+ b(null), O.current = !1, d("uploading"), g({
432
432
  loaded: 0,
433
- total: i.size,
433
+ total: r.size,
434
434
  pct: 0
435
435
  });
436
- let l = new AbortController();
437
- D.current = l;
436
+ let o = new AbortController();
437
+ D.current = o;
438
438
  try {
439
- let r = await S({
440
- file: i,
439
+ let a = await p({
440
+ file: r,
441
441
  entityCode: e.entityCode,
442
- fieldCode: f ?? n,
443
- slotCode: p,
444
- signal: l.signal,
445
- onProgress: v
442
+ fieldCode: s ?? n,
443
+ slotCode: c,
444
+ signal: o.signal,
445
+ onProgress: g
446
446
  });
447
447
  if (O.current) {
448
- s(r.id).catch(() => {}), M(r.id);
448
+ _(a.id).catch(() => {}), M(a.id);
449
449
  return;
450
450
  }
451
- m && P(m.id) && (s(m.id).catch(() => {}), M(m.id)), j(r.id, () => s(r.id)), g("idle"), v(null);
452
- let o = {
453
- id: r.id,
454
- filename: r.filename,
455
- content_type: r.content_type,
456
- size_bytes: r.size_bytes,
457
- sha256: r.sha256,
458
- width: r.width,
459
- height: r.height,
460
- url: r.url,
461
- metadata: r.metadata
451
+ l && P(l.id) && (_(l.id).catch(() => {}), M(l.id)), j(a.id, () => _(a.id)), d("idle"), g(null);
452
+ let u = {
453
+ id: a.id,
454
+ filename: a.filename,
455
+ content_type: a.content_type,
456
+ size_bytes: a.size_bytes,
457
+ sha256: a.sha256,
458
+ width: a.width,
459
+ height: a.height,
460
+ url: a.url,
461
+ metadata: a.metadata
462
462
  };
463
- a?.(t.mode === "array" ? [o] : o);
463
+ i?.(t.mode === "array" ? [u] : u);
464
464
  } catch (e) {
465
- if (e instanceof o && e.code === "ABORTED") return;
466
- let t = e instanceof o ? {
465
+ if (e instanceof f && e.code === "ABORTED") return;
466
+ let t = e instanceof f ? {
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), g("error"), v(null);
473
+ b(t), d("error"), g(null);
474
474
  }
475
475
  }, [
476
476
  t.accepts,
477
477
  t.max_size_bytes,
478
478
  t.mode,
479
479
  n,
480
- m,
480
+ l,
481
481
  P,
482
- a,
482
+ i,
483
483
  e.entityCode,
484
484
  j,
485
485
  M,
486
- f,
487
- p
486
+ s,
487
+ c
488
488
  ]), ne = L(() => {
489
- d || A.current?.click();
490
- }, [d]), G = L((e) => {
489
+ o || A.current?.click();
490
+ }, [o]), G = L((e) => {
491
491
  let t = e.target.files?.[0];
492
492
  e.target.value = "", t && z(t);
493
493
  }, [z]), K = L(() => {
494
- m && P(m.id) && (s(m.id).catch(() => {}), M(m.id)), a?.(t.mode === "array" ? [] : null);
494
+ l && P(l.id) && (_(l.id).catch(() => {}), M(l.id)), i?.(t.mode === "array" ? [] : null);
495
495
  }, [
496
- m,
496
+ l,
497
497
  t.mode,
498
498
  P,
499
- a,
499
+ i,
500
500
  M
501
501
  ]), q = L(() => {
502
- h === "uploading" && D.current && (O.current = !0, D.current.abort(), D.current = null, g("idle"), v(null));
503
- }, [h]), re = L(() => {
504
- m && F(m.id, "download", k(m));
505
- }, [m, F]), ie = m ? C(m) : !1, J = L(() => {
506
- !m || !C(m) || F(m.id, "preview", N(m));
507
- }, [m, F]), ae = L(() => {
508
- if (!m) {
502
+ u === "uploading" && D.current && (O.current = !0, D.current.abort(), D.current = null, d("idle"), g(null));
503
+ }, [u]), re = L(() => {
504
+ l && F(l.id, "download", k(l));
505
+ }, [l, F]), ie = l ? C(l) : !1, J = L(() => {
506
+ !l || !C(l) || F(l.id, "preview", N(l));
507
+ }, [l, F]), ae = L(() => {
508
+ if (!l) {
509
509
  w(!1);
510
510
  return;
511
511
  }
512
512
  let e = T.trim();
513
- if (w(!1), !e || e === m.filename) {
514
- E(m.filename);
513
+ if (w(!1), !e || e === l.filename) {
514
+ E(l.filename);
515
515
  return;
516
516
  }
517
517
  let n = {
518
- ...m,
518
+ ...l,
519
519
  filename: e
520
520
  };
521
- a?.(t.mode === "array" ? [n] : n);
521
+ i?.(t.mode === "array" ? [n] : n);
522
522
  }, [
523
523
  T,
524
- m,
525
- a,
524
+ l,
525
+ i,
526
526
  t.mode
527
- ]), Y = c === "display";
528
- return !m && h !== "uploading" ? /* @__PURE__ */ W("div", {
527
+ ]), Y = a === "display";
528
+ return !l && u !== "uploading" ? /* @__PURE__ */ W("div", {
529
529
  "data-testid": `file-widget-${n}`,
530
530
  className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
531
531
  children: [
@@ -539,7 +539,7 @@ function be(e) {
539
539
  type: "button",
540
540
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
541
541
  onClick: ne,
542
- disabled: d,
542
+ disabled: o,
543
543
  "data-testid": "upload",
544
544
  children: "Upload"
545
545
  })]
@@ -552,7 +552,7 @@ function be(e) {
552
552
  style: { display: "none" },
553
553
  "data-testid": `file-input-${n}`
554
554
  }),
555
- h === "error" && y && /* @__PURE__ */ U("div", {
555
+ u === "error" && y && /* @__PURE__ */ U("div", {
556
556
  className: "ml-auto text-xs text-destructive",
557
557
  role: "alert",
558
558
  children: y.message
@@ -561,14 +561,14 @@ function be(e) {
561
561
  }) : /* @__PURE__ */ W("div", {
562
562
  "data-testid": `file-widget-${n}`,
563
563
  className: "flex items-center gap-3 rounded-md border border-border bg-surface p-3",
564
- "aria-busy": h === "uploading" || void 0,
565
- "aria-invalid": h === "error" || void 0,
564
+ "aria-busy": u === "uploading" || void 0,
565
+ "aria-invalid": u === "error" || void 0,
566
566
  children: [
567
- /* @__PURE__ */ U(ye, { contentType: m?.content_type }),
567
+ /* @__PURE__ */ U(ye, { contentType: l?.content_type }),
568
568
  /* @__PURE__ */ W("div", {
569
569
  className: "flex min-w-0 flex-1 flex-col gap-1",
570
570
  children: [
571
- x && m ? /* @__PURE__ */ U("input", {
571
+ S && 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,
@@ -576,45 +576,45 @@ function be(e) {
576
576
  onChange: (e) => E(e.target.value),
577
577
  onBlur: ae,
578
578
  onKeyDown: (e) => {
579
- e.key === "Enter" ? ae() : e.key === "Escape" && (w(!1), E(m.filename));
579
+ e.key === "Enter" ? ae() : e.key === "Escape" && (w(!1), E(l.filename));
580
580
  },
581
581
  "data-testid": "filename-input"
582
582
  }) : /* @__PURE__ */ U("button", {
583
583
  type: "button",
584
584
  className: "truncate text-left text-sm font-medium text-foreground hover:underline",
585
- onClick: () => !Y && m && w(!0),
586
- disabled: Y || d || !m,
587
- title: m?.filename,
585
+ onClick: () => !Y && l && w(!0),
586
+ disabled: Y || o || !l,
587
+ title: l?.filename,
588
588
  "data-testid": "filename",
589
- children: m?.filename ?? "Uploading…"
589
+ children: l?.filename ?? "Uploading…"
590
590
  }),
591
591
  /* @__PURE__ */ W("div", {
592
592
  className: "flex flex-wrap gap-2 text-xs text-muted-foreground",
593
593
  children: [
594
- m && /* @__PURE__ */ U("span", { children: u(m.size_bytes) }),
595
- m?.page_count != null && /* @__PURE__ */ W("span", { children: [m.page_count, " pages"] }),
596
- m?.uploaded_at && /* @__PURE__ */ U("span", { children: xe(m.uploaded_at) }),
597
- m?.uploaded_by && /* @__PURE__ */ W("span", { children: ["by ", m.uploaded_by] }),
598
- m?.version?.number != null && /* @__PURE__ */ W("span", {
594
+ l && /* @__PURE__ */ U("span", { children: x(l.size_bytes) }),
595
+ l?.page_count != null && /* @__PURE__ */ W("span", { children: [l.page_count, " pages"] }),
596
+ l?.uploaded_at && /* @__PURE__ */ U("span", { children: xe(l.uploaded_at) }),
597
+ l?.uploaded_by && /* @__PURE__ */ W("span", { children: ["by ", l.uploaded_by] }),
598
+ l?.version?.number != null && /* @__PURE__ */ W("span", {
599
599
  "data-testid": "version-badge",
600
- children: ["v", m.version.number]
600
+ children: ["v", l.version.number]
601
601
  })
602
602
  ]
603
603
  }),
604
- h === "uploading" && /* @__PURE__ */ W("div", {
604
+ u === "uploading" && /* @__PURE__ */ W("div", {
605
605
  className: "text-xs text-muted-foreground",
606
606
  role: "progressbar",
607
- "aria-valuenow": _?.pct ?? 0,
607
+ "aria-valuenow": m?.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
- _?.pct ?? 0,
613
+ m?.pct ?? 0,
614
614
  "%"
615
615
  ]
616
616
  }),
617
- h === "error" && y && /* @__PURE__ */ U("div", {
617
+ u === "error" && y && /* @__PURE__ */ U("div", {
618
618
  className: "text-xs text-destructive",
619
619
  role: "alert",
620
620
  children: y.message
@@ -623,7 +623,7 @@ function be(e) {
623
623
  }),
624
624
  /* @__PURE__ */ W("div", {
625
625
  className: "flex flex-none items-center gap-1",
626
- children: [m && h !== "uploading" && /* @__PURE__ */ W(H, { children: [
626
+ children: [l && u !== "uploading" && /* @__PURE__ */ W(H, { children: [
627
627
  /* @__PURE__ */ U("button", {
628
628
  type: "button",
629
629
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
@@ -644,18 +644,18 @@ function be(e) {
644
644
  type: "button",
645
645
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
646
646
  onClick: ne,
647
- disabled: d,
647
+ disabled: o,
648
648
  "data-testid": "replace",
649
649
  children: "Replace"
650
650
  }), /* @__PURE__ */ U("button", {
651
651
  type: "button",
652
652
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-destructive hover:bg-surface-2",
653
653
  onClick: K,
654
- disabled: d,
654
+ disabled: o,
655
655
  "data-testid": "remove",
656
656
  children: "Remove"
657
657
  })] })
658
- ] }), h === "uploading" && /* @__PURE__ */ U("button", {
658
+ ] }), u === "uploading" && /* @__PURE__ */ U("button", {
659
659
  type: "button",
660
660
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs",
661
661
  onClick: q,
@@ -684,54 +684,54 @@ 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: i, onChange: a, mode: c, disabled: d } = e, f = M(i), [p, m] = V([]), { register: h, unregister: g, isDraft: _ } = l(), v = B(f);
688
- v.current = f;
689
- let y = B(null), b = B(/* @__PURE__ */ new Set()), x = B([]);
690
- x.current = p;
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;
691
691
  let { open: C } = te();
692
692
  R(() => () => {
693
- x.current.forEach((e) => e.abort());
693
+ S.current.forEach((e) => e.abort());
694
694
  }, []);
695
- let w = (t.accepts ?? []).join(","), T = c === "display", E = L(async (i) => {
696
- let c = r(i, t.accepts, t.max_size_bytes), l = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, u = new AbortController();
697
- if (c) {
698
- m((e) => [...e, {
699
- localId: l,
700
- filename: i.name,
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();
697
+ if (a) {
698
+ l((e) => [...e, {
699
+ localId: o,
700
+ filename: r.name,
701
701
  progress: null,
702
- error: c,
702
+ error: a,
703
703
  abort: () => {}
704
704
  }]);
705
705
  return;
706
706
  }
707
- m((e) => [...e, {
708
- localId: l,
709
- filename: i.name,
707
+ l((e) => [...e, {
708
+ localId: o,
709
+ filename: r.name,
710
710
  progress: {
711
711
  loaded: 0,
712
- total: i.size,
712
+ total: r.size,
713
713
  pct: 0
714
714
  },
715
715
  error: null,
716
- abort: () => u.abort()
716
+ abort: () => s.abort()
717
717
  }]);
718
718
  try {
719
- let t = await S({
720
- file: i,
719
+ let t = await p({
720
+ file: r,
721
721
  entityCode: e.entityCode,
722
722
  fieldCode: n,
723
- signal: u.signal,
724
- onProgress: (e) => m((t) => t.map((t) => t.localId === l ? {
723
+ signal: s.signal,
724
+ onProgress: (e) => l((t) => t.map((t) => t.localId === o ? {
725
725
  ...t,
726
726
  progress: e
727
727
  } : t))
728
728
  });
729
- if (b.current.delete(l)) {
730
- s(t.id).catch(() => {}), g(t.id);
729
+ if (b.current.delete(o)) {
730
+ _(t.id).catch(() => {}), d(t.id);
731
731
  return;
732
732
  }
733
- h(t.id, () => s(t.id));
734
- let r = {
733
+ u(t.id, () => _(t.id));
734
+ let a = {
735
735
  id: t.id,
736
736
  filename: t.filename,
737
737
  content_type: t.content_type,
@@ -741,21 +741,21 @@ function Ce(e) {
741
741
  height: t.height,
742
742
  url: t.url,
743
743
  metadata: t.metadata
744
- }, o = [...v.current, r];
745
- v.current = o, a?.(o), m((e) => e.filter((e) => e.localId !== l));
744
+ }, c = [...g.current, a];
745
+ g.current = c, i?.(c), l((e) => e.filter((e) => e.localId !== o));
746
746
  } catch (e) {
747
- if (e instanceof o && e.code === "ABORTED") {
748
- m((e) => e.filter((e) => e.localId !== l));
747
+ if (e instanceof f && e.code === "ABORTED") {
748
+ l((e) => e.filter((e) => e.localId !== o));
749
749
  return;
750
750
  }
751
- let t = e instanceof o ? {
751
+ let t = e instanceof f ? {
752
752
  code: e.code,
753
753
  message: e.message
754
754
  } : {
755
755
  code: "UNKNOWN",
756
756
  message: e instanceof Error ? e.message : "Upload failed"
757
757
  };
758
- m((e) => e.map((e) => e.localId === l ? {
758
+ l((e) => e.map((e) => e.localId === o ? {
759
759
  ...e,
760
760
  error: t,
761
761
  progress: null,
@@ -766,24 +766,24 @@ function Ce(e) {
766
766
  t.accepts,
767
767
  t.max_size_bytes,
768
768
  n,
769
- a,
769
+ i,
770
770
  e.entityCode,
771
- h,
772
- g
771
+ u,
772
+ d
773
773
  ]), D = L((e) => {
774
774
  Array.from(e).forEach((e) => void E(e));
775
775
  }, [E]), O = L(() => {
776
- d || y.current?.click();
777
- }, [d]), ee = L((e) => {
776
+ o || y.current?.click();
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
- _(e) && (s(e).catch(() => {}), g(e)), a?.(f.filter((t) => t.id !== e));
781
+ m(e) && (_(e).catch(() => {}), d(e)), i?.(s.filter((t) => t.id !== e));
782
782
  }, [
783
- _,
784
- f,
785
- a,
786
- g
783
+ m,
784
+ s,
785
+ i,
786
+ d
787
787
  ]), j = L((e) => {
788
788
  C(e.id, "download", k(e));
789
789
  }, [C]);
@@ -793,11 +793,11 @@ function Ce(e) {
793
793
  children: [/* @__PURE__ */ W("ul", {
794
794
  className: "flex flex-col divide-y divide-divider rounded-md border border-border bg-surface",
795
795
  children: [
796
- f.length === 0 && p.length === 0 && /* @__PURE__ */ U("li", {
796
+ s.length === 0 && c.length === 0 && /* @__PURE__ */ U("li", {
797
797
  className: "px-3 py-4 text-center text-sm text-muted-foreground",
798
798
  children: t.display?.placeholder || "No files"
799
799
  }),
800
- f.map((e) => /* @__PURE__ */ W("li", {
800
+ s.map((e) => /* @__PURE__ */ W("li", {
801
801
  className: "flex items-center gap-3 px-3 py-2",
802
802
  "data-testid": `row-${e.id}`,
803
803
  children: [
@@ -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: u(e.size_bytes)
817
+ children: x(e.size_bytes)
818
818
  }),
819
819
  /* @__PURE__ */ U("button", {
820
820
  type: "button",
@@ -827,13 +827,13 @@ function Ce(e) {
827
827
  type: "button",
828
828
  className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs text-destructive hover:bg-surface-2",
829
829
  onClick: () => A(e.id),
830
- disabled: d,
830
+ disabled: o,
831
831
  "data-testid": `remove-${e.id}`,
832
832
  children: "Remove"
833
833
  })
834
834
  ]
835
835
  }, e.id)),
836
- p.map((e) => /* @__PURE__ */ W("li", {
836
+ c.map((e) => /* @__PURE__ */ W("li", {
837
837
  className: "flex items-center gap-3 px-3 py-2",
838
838
  "data-testid": `pending-row-${e.localId}`,
839
839
  "aria-busy": !e.error,
@@ -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), m((t) => t.filter((t) => t.localId !== e.localId));
864
+ e.abort(), b.current.add(e.localId), l((t) => t.filter((t) => t.localId !== e.localId));
865
865
  },
866
866
  children: e.error ? "Dismiss" : "Cancel"
867
867
  })
@@ -872,7 +872,7 @@ function Ce(e) {
872
872
  type: "button",
873
873
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
874
874
  onClick: O,
875
- disabled: d,
875
+ disabled: o,
876
876
  "data-testid": "add-files",
877
877
  children: "Add files"
878
878
  }), /* @__PURE__ */ U("input", {
@@ -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" ? d(t[n], Me(t, n)) : t[n];
994
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? y(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" ? f(n) : n;
998
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? g(n) : n;
999
999
  }
1000
1000
  function Fe(e, t, n) {
1001
1001
  let r = je(e, t);
1002
1002
  if (r) return r.name || t;
1003
1003
  let i = e.fields.get(t);
1004
- return i ? x(i, t, n) : t;
1004
+ return i ? s(i, t, n) : 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);
@@ -1021,12 +1021,12 @@ function Ie(e) {
1021
1021
  children: e ? `Unknown file widget: ${e}` : "Missing file widget"
1022
1022
  });
1023
1023
  }
1024
- let v = t.fields.get(r), b = h && a === "display" && v ? {
1024
+ let v = t.fields.get(r), y = h && a === "display" && v ? {
1025
1025
  ...v,
1026
1026
  structure: h
1027
1027
  } : v;
1028
- return b ? y({
1029
- field: b,
1028
+ return y ? b({
1029
+ field: y,
1030
1030
  entityCode: n,
1031
1031
  fieldName: r,
1032
1032
  value: Ne(t, i, 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 = c(n, r?.entity), s = r?.entityCode ?? "";
1056
+ let a = Re(t), o = m(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 i(r?.display?.name) || e;
1125
+ return d(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,28 +1130,28 @@ 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: i, onRun: a, loading: o, onLoadingChange: s, measureRef: c, style: l, row: u, widgetContext: d, onActionClick: f, iconOnly: p = !1 }) {
1134
- let m = Q(e.code, r, i), h = Ue(e.code, r, i), g = We(e.code, r, i), y = m?.destructive ?? !1, b = !y && m?.display?.primary === !0, x = !e.enabled, S = x ? Ge(e.code) : void 0, C = L(async () => {
1135
- if (!(!m || x || o)) {
1136
- s(!0);
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);
1137
1137
  try {
1138
- ze(e.code, m, u, d, f) || await Promise.resolve(a(e.code, m));
1138
+ ze(e.code, g, f, p, m) || await Promise.resolve(s(e.code, g));
1139
1139
  } finally {
1140
- s(!1);
1140
+ l(!1);
1141
1141
  }
1142
1142
  }
1143
1143
  }, [
1144
- m,
1144
+ g,
1145
1145
  x,
1146
- o,
1147
- a,
1148
- e.code,
1146
+ c,
1149
1147
  s,
1150
- u,
1151
- d,
1152
- f
1153
- ]), w = o ? /* @__PURE__ */ U(n, { size: 12 }) : g ? /* @__PURE__ */ U(t, {
1154
- name: g,
1148
+ e.code,
1149
+ l,
1150
+ f,
1151
+ p,
1152
+ m
1153
+ ]), w = c ? /* @__PURE__ */ U(n, { size: 12 }) : v ? /* @__PURE__ */ U(t, {
1154
+ name: v,
1155
1155
  size: 12
1156
1156
  }) : null;
1157
1157
  return /* @__PURE__ */ W(H, { children: [S && e.reason && /* @__PURE__ */ U("span", {
@@ -1165,26 +1165,26 @@ function Ke({ leaf: e, entityActions: r, globalActions: i, onRun: a, loading: o,
1165
1165
  clip: "rect(0,0,0,0)"
1166
1166
  },
1167
1167
  children: e.reason
1168
- }), /* @__PURE__ */ U(_, {
1169
- ref: c,
1168
+ }), /* @__PURE__ */ U(o, {
1169
+ ref: u,
1170
1170
  kind: b ? "primary" : "default",
1171
1171
  danger: y,
1172
1172
  icon: w,
1173
- disabled: x || o,
1173
+ disabled: x || c,
1174
1174
  "aria-disabled": x ? "true" : void 0,
1175
1175
  "aria-describedby": S,
1176
- "aria-label": p ? h : void 0,
1177
- title: v(m, h, x, e.reason, p),
1176
+ "aria-label": h ? _ : void 0,
1177
+ title: i(g, _, x, e.reason, h),
1178
1178
  onClick: C,
1179
- style: l,
1180
- children: p ? null : h
1179
+ style: d,
1180
+ children: h ? null : _
1181
1181
  })] });
1182
1182
  }
1183
- function qe({ group: r, entityActions: a, globalActions: o, onRun: s, loading: c, onLoadingChange: l, measureRef: u, style: d, row: f, widgetContext: m, onActionClick: h }) {
1184
- let g = B(null), [v, y] = V(!1), b = r.name ? i(r.name) : "Actions", x = L((e) => {
1185
- g.current = e, u?.(e);
1186
- }, [u]), S = L((e, t) => (y(!1), s(e, t)), [s]);
1187
- return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(_, {
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, {
1188
1188
  ref: x,
1189
1189
  kind: "default",
1190
1190
  icon: c == null ? r.icon ? /* @__PURE__ */ U(t, {
@@ -1196,11 +1196,11 @@ function qe({ group: r, entityActions: a, globalActions: o, onRun: s, loading: c
1196
1196
  "aria-expanded": v ? "true" : "false",
1197
1197
  title: b,
1198
1198
  onClick: () => y((e) => !e),
1199
- style: d,
1199
+ style: p,
1200
1200
  children: b
1201
- }), /* @__PURE__ */ U(p, {
1201
+ }), /* @__PURE__ */ U(l, {
1202
1202
  open: v,
1203
- anchor: g.current,
1203
+ anchor: _.current,
1204
1204
  onClose: () => y(!1),
1205
1205
  align: "start",
1206
1206
  width: 200,
@@ -1209,35 +1209,35 @@ function qe({ group: r, entityActions: a, globalActions: o, onRun: s, loading: c
1209
1209
  "aria-label": b,
1210
1210
  children: r.items.map((e) => e.kind === "action" ? /* @__PURE__ */ U(Je, {
1211
1211
  leaf: e,
1212
- entityActions: a,
1213
- globalActions: o,
1212
+ entityActions: i,
1213
+ globalActions: a,
1214
1214
  onRun: S,
1215
1215
  loading: c === e.code,
1216
- onLoadingChange: (t) => l(t ? e.code : null),
1217
- row: f,
1218
- widgetContext: m,
1219
- onActionClick: h
1216
+ onLoadingChange: (t) => u(t ? e.code : null),
1217
+ row: m,
1218
+ widgetContext: h,
1219
+ onActionClick: g
1220
1220
  }, e.code) : /* @__PURE__ */ U(Ye, {
1221
1221
  group: e,
1222
- entityActions: a,
1223
- globalActions: o,
1222
+ entityActions: i,
1223
+ globalActions: a,
1224
1224
  onRun: S,
1225
1225
  loading: c,
1226
- onLoadingChange: l,
1227
- row: f,
1228
- widgetContext: m,
1229
- onActionClick: h
1226
+ onLoadingChange: u,
1227
+ row: m,
1228
+ widgetContext: h,
1229
+ onActionClick: g
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: i, onRun: a, loading: o, onLoadingChange: s, row: c, widgetContext: l, onActionClick: u }) {
1235
- let d = Q(e.code, r, i), f = Ue(e.code, r, i), p = We(e.code, r, i), m = d?.destructive ?? !1, h = !e.enabled, g = h ? Ge(e.code) : void 0, _ = o ? /* @__PURE__ */ U(n, { size: 12 }) : p ? /* @__PURE__ */ U(t, {
1236
- name: p,
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, {
1236
+ name: m,
1237
1237
  size: 12
1238
1238
  }) : null;
1239
- return /* @__PURE__ */ W(H, { children: [g && e.reason && /* @__PURE__ */ U("span", {
1240
- id: g,
1239
+ return /* @__PURE__ */ W(H, { children: [_ && e.reason && /* @__PURE__ */ U("span", {
1240
+ id: _,
1241
1241
  role: "tooltip",
1242
1242
  style: {
1243
1243
  position: "absolute",
@@ -1249,16 +1249,16 @@ function Je({ leaf: e, entityActions: r, globalActions: i, onRun: a, loading: o,
1249
1249
  children: e.reason
1250
1250
  }), /* @__PURE__ */ W("div", {
1251
1251
  role: "menuitem",
1252
- "aria-disabled": h ? "true" : void 0,
1253
- "aria-describedby": g,
1254
- title: v(d, f, h, e.reason),
1252
+ "aria-disabled": g ? "true" : void 0,
1253
+ "aria-describedby": _,
1254
+ title: i(f, p, g, e.reason),
1255
1255
  onClick: async () => {
1256
- if (!(!d || h || o)) {
1257
- s(!0);
1256
+ if (!(!f || g || s)) {
1257
+ c(!0);
1258
1258
  try {
1259
- ze(e.code, d, c, l, u) || await Promise.resolve(a(e.code, d));
1259
+ ze(e.code, f, l, u, d) || await Promise.resolve(o(e.code, f));
1260
1260
  } finally {
1261
- s(!1);
1261
+ c(!1);
1262
1262
  }
1263
1263
  }
1264
1264
  },
@@ -1269,31 +1269,31 @@ function Je({ leaf: e, entityActions: r, globalActions: i, onRun: a, loading: o,
1269
1269
  padding: "6px 10px",
1270
1270
  borderRadius: 5,
1271
1271
  fontSize: 12.5,
1272
- color: m ? "var(--danger)" : h ? "var(--text-3)" : "var(--text-2)",
1273
- cursor: h ? "not-allowed" : "pointer",
1274
- opacity: h ? .6 : 1
1272
+ color: h ? "var(--danger)" : g ? "var(--text-3)" : "var(--text-2)",
1273
+ cursor: g ? "not-allowed" : "pointer",
1274
+ opacity: g ? .6 : 1
1275
1275
  },
1276
1276
  onMouseEnter: (e) => {
1277
- h || (e.currentTarget.style.background = "var(--surface-3)");
1277
+ g || (e.currentTarget.style.background = "var(--surface-3)");
1278
1278
  },
1279
1279
  onMouseLeave: (e) => {
1280
1280
  e.currentTarget.style.background = "transparent";
1281
1281
  },
1282
- children: [_ && /* @__PURE__ */ U("span", {
1282
+ children: [v && /* @__PURE__ */ U("span", {
1283
1283
  style: {
1284
- color: m ? "var(--danger)" : "var(--text-3)",
1284
+ color: h ? "var(--danger)" : "var(--text-3)",
1285
1285
  display: "flex"
1286
1286
  },
1287
- children: _
1287
+ children: v
1288
1288
  }), /* @__PURE__ */ U("span", {
1289
1289
  style: { flex: 1 },
1290
- children: f
1290
+ children: p
1291
1291
  })]
1292
1292
  })] });
1293
1293
  }
1294
- function Ye({ group: e, entityActions: t, globalActions: n, onRun: r, loading: a, onLoadingChange: o, row: s, widgetContext: c, onActionClick: l }) {
1295
- let u = e.name ? i(e.name) : void 0;
1296
- return /* @__PURE__ */ W(H, { children: [u && /* @__PURE__ */ U("div", {
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;
1296
+ return /* @__PURE__ */ W(H, { children: [l && /* @__PURE__ */ U("div", {
1297
1297
  style: {
1298
1298
  padding: "4px 10px 2px",
1299
1299
  fontSize: 10.5,
@@ -1302,71 +1302,71 @@ function Ye({ group: e, entityActions: t, globalActions: n, onRun: r, loading: a
1302
1302
  textTransform: "uppercase",
1303
1303
  letterSpacing: "0.05em"
1304
1304
  },
1305
- children: u
1305
+ children: l
1306
1306
  }), e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ U(Je, {
1307
1307
  leaf: e,
1308
1308
  entityActions: t,
1309
1309
  globalActions: n,
1310
1310
  onRun: r,
1311
- loading: a === e.code,
1312
- onLoadingChange: (t) => o(t ? e.code : null),
1313
- row: s,
1314
- widgetContext: c,
1315
- onActionClick: l
1311
+ loading: i === e.code,
1312
+ onLoadingChange: (t) => a(t ? e.code : null),
1313
+ row: o,
1314
+ widgetContext: s,
1315
+ onActionClick: c
1316
1316
  }, e.code) : /* @__PURE__ */ U(Ye, {
1317
1317
  group: e,
1318
1318
  entityActions: t,
1319
1319
  globalActions: n,
1320
1320
  onRun: r,
1321
- loading: a,
1322
- onLoadingChange: o,
1323
- row: s,
1324
- widgetContext: c,
1325
- onActionClick: l
1321
+ loading: i,
1322
+ onLoadingChange: a,
1323
+ row: o,
1324
+ widgetContext: s,
1325
+ onActionClick: c
1326
1326
  }, e.icon ?? "nested"))] });
1327
1327
  }
1328
- function Xe({ layout: t, entityActions: r, globalActions: i, onRun: a, row: o, widgetContext: s, onActionClick: c }) {
1329
- let l = B(null), [u, d] = V(!1), [f, m] = V(null), g = L((e, t) => (d(!1), a(e, t)), [a]);
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]);
1330
1330
  return Be(t) === 0 ? null : /* @__PURE__ */ W("div", {
1331
- "data-open": u ? "true" : void 0,
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(h, {
1337
- ref: l,
1338
- icon: U(f == null ? e.more : n, { size: 14 }),
1336
+ children: [/* @__PURE__ */ U(r, {
1337
+ ref: d,
1338
+ icon: U(m == null ? e.more : n, { size: 14 }),
1339
1339
  title: "Actions",
1340
1340
  size: 28,
1341
- onClick: () => d((e) => !e)
1342
- }), /* @__PURE__ */ U(p, {
1343
- open: u,
1344
- anchor: l.current,
1345
- onClose: () => d(!1),
1341
+ onClick: () => p((e) => !e)
1342
+ }), /* @__PURE__ */ U(l, {
1343
+ open: f,
1344
+ anchor: d.current,
1345
+ onClose: () => p(!1),
1346
1346
  align: "end",
1347
1347
  width: 220,
1348
1348
  children: /* @__PURE__ */ U(Qe, {
1349
1349
  layout: t,
1350
- entityActions: r,
1351
- globalActions: i,
1350
+ entityActions: i,
1351
+ globalActions: a,
1352
1352
  onRun: g,
1353
- loading: f,
1354
- onLoadingChange: m,
1355
- row: o,
1356
- widgetContext: s,
1357
- onActionClick: c
1353
+ loading: m,
1354
+ onLoadingChange: h,
1355
+ row: s,
1356
+ widgetContext: c,
1357
+ onActionClick: u
1358
1358
  })
1359
1359
  })]
1360
1360
  });
1361
1361
  }
1362
1362
  function Ze(e) {
1363
1363
  let t = 0;
1364
- for (let n of e) if (n.kind === "action" && a(n.code)) t++;
1364
+ for (let n of e) if (n.kind === "action" && u(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, _ = m.length > 0, v = (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), h = d.length > 0, g = m.length > 0, _ = (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" ? v(e) : null),
1385
- p.length > 0 && _ && /* @__PURE__ */ U(g, { divider: !0 }),
1386
- m.map((e) => e.kind === "action" ? v(e) : /* @__PURE__ */ U(Ye, {
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, {
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(g, { divider: !0 }),
1398
- d.map((e) => v(e))
1397
+ h && /* @__PURE__ */ U(S, { divider: !0 }),
1398
+ d.map((e) => _(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 ? i(e.name) : ""}`;
1463
+ return e.kind === "action" ? `action:${e.code}` : `group:${e.name ? d(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: o, ariaLabel: s = "Actions", align: c = "trailing", constrain: l = !0, row: u, widgetContext: d, onActionClick: f }) {
1473
- let m = B(null), h = 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");
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");
1474
1474
  R(() => {
1475
1475
  if (typeof MutationObserver > "u") return;
1476
1476
  let e = new MutationObserver((e) => {
@@ -1481,17 +1481,17 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1481
1481
  attributeFilter: ["dir", "lang"]
1482
1482
  }), () => e.disconnect();
1483
1483
  }, []);
1484
- let O = B(null), [ee, k] = V(!1), A = L((e, t) => (k(!1), i(e, t)), [i]), te = Be(t), j = !!o, M = L(() => {
1485
- if (j || !h.current) return;
1486
- let e = Array.from(h.current.children), t = /* @__PURE__ */ new Map();
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();
1487
1487
  e.forEach((e) => {
1488
1488
  let n = e.dataset.nodeKey;
1489
1489
  n && t.set(n, e.getBoundingClientRect().width || e.offsetWidth);
1490
- }), x((e) => lt(e, t) ? e : t), C(!0);
1490
+ }), b((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 = h.current;
1494
+ let e = g.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 || S) return;
1519
+ if (j || x) return;
1520
1520
  let e = setTimeout(() => {
1521
1521
  M(), C(!0);
1522
1522
  }, 16);
1523
1523
  return () => clearTimeout(e);
1524
1524
  }, [
1525
- S,
1525
+ x,
1526
1526
  M,
1527
1527
  j
1528
1528
  ]), R(() => {
1529
- if (j || !l || !S || v === 0) return;
1530
- let e = m.current;
1529
+ if (j || !d || !x || _ === 0) return;
1530
+ let e = h.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(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.`);
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.`);
1534
1534
  }, [
1535
1535
  j,
1536
- l,
1537
- S,
1538
- v,
1539
- b
1536
+ d,
1537
+ x,
1538
+ _,
1539
+ y
1540
1540
  ]), R(() => {
1541
1541
  if (j) return;
1542
- let e = m.current;
1542
+ let e = h.current;
1543
1543
  if (!e) return;
1544
1544
  if (typeof ResizeObserver > "u") {
1545
- y(e.getBoundingClientRect().width);
1545
+ v(e.getBoundingClientRect().width);
1546
1546
  return;
1547
1547
  }
1548
1548
  let t = new ResizeObserver((e) => {
1549
1549
  let t = e[0];
1550
- t && y(t.contentRect.width);
1550
+ t && v(t.contentRect.width);
1551
1551
  });
1552
- return t.observe(e), y(e.getBoundingClientRect().width), () => t.disconnect();
1552
+ return t.observe(e), v(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 || !l ? ft(t, 2 ** 53 - 1, a, b, n, r, o) : S ? v === 0 ? ft(t, 2 ** 53 - 1, a, b, n, r, o) : ft(t, v, a, b, n, r, o, F.current, I.current) : {
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) : {
1559
1559
  primaryInline: [],
1560
1560
  inline: [],
1561
1561
  overflow: [],
@@ -1563,48 +1563,48 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1563
1563
  iconOnly: /* @__PURE__ */ new Set()
1564
1564
  }, [
1565
1565
  j,
1566
- l,
1567
- S,
1568
- v,
1566
+ d,
1567
+ x,
1568
+ _,
1569
1569
  t,
1570
1570
  a,
1571
- b,
1571
+ y,
1572
1572
  n,
1573
1573
  r,
1574
- o
1574
+ s
1575
1575
  ]);
1576
1576
  if (R(() => {
1577
- !S && !j || (F.current = new Set([
1577
+ !x && !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
- S,
1584
+ x,
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: m,
1589
+ ref: h,
1590
1590
  role: "toolbar",
1591
- "aria-label": s,
1591
+ "aria-label": c,
1592
1592
  style: {
1593
1593
  display: "flex",
1594
1594
  flexDirection: E ? "row-reverse" : "row",
1595
1595
  alignItems: "center",
1596
1596
  gap: tt,
1597
1597
  flexWrap: "wrap",
1598
- visibility: S || j ? "visible" : "hidden",
1598
+ visibility: x || j ? "visible" : "hidden",
1599
1599
  position: "relative",
1600
- flex: l ? "1 1 auto" : "0 1 auto",
1601
- justifyContent: c === "trailing" ? "flex-end" : "flex-start",
1600
+ flex: d ? "1 1 auto" : "0 1 auto",
1601
+ justifyContent: u === "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: h,
1607
+ ref: g,
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(_, {
1621
+ children: [/* @__PURE__ */ U(o, {
1622
1622
  "data-node-key": $e,
1623
1623
  iconRight: /* @__PURE__ */ U(e.down, { size: 10 }),
1624
1624
  tabIndex: -1,
@@ -1632,8 +1632,8 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1632
1632
  onRun: st,
1633
1633
  loading: !1,
1634
1634
  onLoadingChange: ot,
1635
- row: u,
1636
- widgetContext: d,
1635
+ row: f,
1636
+ widgetContext: p,
1637
1637
  measureRef: ct(t)
1638
1638
  }), We(e.code, n, r) && /* @__PURE__ */ U(Ke, {
1639
1639
  leaf: e,
@@ -1642,8 +1642,8 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1642
1642
  onRun: st,
1643
1643
  loading: !1,
1644
1644
  onLoadingChange: ot,
1645
- row: u,
1646
- widgetContext: d,
1645
+ row: f,
1646
+ widgetContext: p,
1647
1647
  iconOnly: !0,
1648
1648
  measureRef: ct(rt(e))
1649
1649
  })] }, t) : /* @__PURE__ */ U(qe, {
@@ -1653,9 +1653,9 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1653
1653
  onRun: st,
1654
1654
  loading: null,
1655
1655
  onLoadingChange: ot,
1656
- row: u,
1657
- widgetContext: d,
1658
- onActionClick: f,
1656
+ row: f,
1657
+ widgetContext: p,
1658
+ onActionClick: m,
1659
1659
  measureRef: ct(t)
1660
1660
  }, t);
1661
1661
  })]
@@ -1667,9 +1667,9 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1667
1667
  onRun: i,
1668
1668
  loading: w === e.code,
1669
1669
  onLoadingChange: (t) => T(t ? e.code : null),
1670
- row: u,
1671
- widgetContext: d,
1672
- onActionClick: f,
1670
+ row: f,
1671
+ widgetContext: p,
1672
+ onActionClick: m,
1673
1673
  iconOnly: G.iconOnly.has($(e))
1674
1674
  }, $(e))),
1675
1675
  G.inline.map((e) => {
@@ -1681,9 +1681,9 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1681
1681
  onRun: i,
1682
1682
  loading: w === e.code,
1683
1683
  onLoadingChange: (t) => T(t ? e.code : null),
1684
- row: u,
1685
- widgetContext: d,
1686
- onActionClick: f,
1684
+ row: f,
1685
+ widgetContext: p,
1686
+ onActionClick: m,
1687
1687
  iconOnly: G.iconOnly.has(t)
1688
1688
  }, t) : /* @__PURE__ */ U(qe, {
1689
1689
  group: e,
@@ -1692,12 +1692,12 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1692
1692
  onRun: i,
1693
1693
  loading: w,
1694
1694
  onLoadingChange: T,
1695
- row: u,
1696
- widgetContext: d,
1697
- onActionClick: f
1695
+ row: f,
1696
+ widgetContext: p,
1697
+ onActionClick: m
1698
1698
  }, t);
1699
1699
  }),
1700
- K && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(_, {
1700
+ K && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(o, {
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(p, {
1708
+ }), /* @__PURE__ */ U(l, {
1709
1709
  open: ee,
1710
1710
  anchor: O.current,
1711
1711
  onClose: () => k(!1),
@@ -1718,16 +1718,16 @@ 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(g, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ U(Je, {
1721
+ ].map((e, t) => e === null ? /* @__PURE__ */ U(S, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ U(Je, {
1722
1722
  leaf: e,
1723
1723
  entityActions: n,
1724
1724
  globalActions: r,
1725
1725
  onRun: A,
1726
1726
  loading: w === e.code,
1727
1727
  onLoadingChange: (t) => T(t ? e.code : null),
1728
- row: u,
1729
- widgetContext: d,
1730
- onActionClick: f
1728
+ row: f,
1729
+ widgetContext: p,
1730
+ onActionClick: m
1731
1731
  }, e.code) : /* @__PURE__ */ U(Ye, {
1732
1732
  group: e,
1733
1733
  entityActions: n,
@@ -1735,9 +1735,9 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1735
1735
  onRun: A,
1736
1736
  loading: w,
1737
1737
  onLoadingChange: T,
1738
- row: u,
1739
- widgetContext: d,
1740
- onActionClick: f
1738
+ row: f,
1739
+ widgetContext: p,
1740
+ onActionClick: m
1741
1741
  }, `${$(e)}-${t}`))
1742
1742
  })
1743
1743
  })] }),
@@ -1748,9 +1748,9 @@ function mt({ layout: t, entityActions: n, globalActions: r, onRun: i, reservedR
1748
1748
  onRun: i,
1749
1749
  loading: w === e.code,
1750
1750
  onLoadingChange: (t) => T(t ? e.code : null),
1751
- row: u,
1752
- widgetContext: d,
1753
- onActionClick: f,
1751
+ row: f,
1752
+ widgetContext: p,
1753
+ onActionClick: m,
1754
1754
  iconOnly: G.iconOnly.has($(e))
1755
1755
  }, $(e)))
1756
1756
  ]
@@ -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 m(t) ? (b(t.ui_steps, n), null) : t.entity ? `${t.entity}.${e}` : r ? `${r}.${e}` : e;
1982
+ return c(t) ? (a(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 };