@nivaro/react 0.3.10 → 0.3.12

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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useNivaroForm.js +1 -1
  3. package/dist/hooks/useSessionRecorder.js +109 -102
  4. package/dist/index.d.ts +34 -3
  5. package/dist/shared/components/CollectionBrowserView.js +1546 -1477
  6. package/dist/shared/components/ItemEditForm.js +4332 -4195
  7. package/dist/shared/components/PageRenderer.js +512 -465
  8. package/dist/shared/components/ProfileView.js +115 -109
  9. package/dist/shared/components/QueryStatStrip.js +74 -70
  10. package/dist/shared/components/ReportView.js +818 -827
  11. package/dist/shared/components/SheetHeaderBody.js +16 -14
  12. package/dist/shared/components/chat/ChatPanel.js +492 -472
  13. package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
  14. package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
  15. package/dist/shared/components/item-edit/FieldRow.js +20 -19
  16. package/dist/shared/components/item-edit/FilePickerField.js +52 -40
  17. package/dist/shared/components/item-edit/GroupSection.js +221 -221
  18. package/dist/shared/components/item-edit/InlineGridField.js +41 -41
  19. package/dist/shared/components/item-edit/InlineTableField.js +2249 -2238
  20. package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
  21. package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
  22. package/dist/shared/components/item-edit/QuickPicker.js +263 -216
  23. package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
  24. package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
  25. package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
  26. package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
  27. package/dist/shared/components/item-edit/UserChip.js +301 -233
  28. package/dist/shared/components/item-edit/helpers.js +133 -134
  29. package/dist/shared/components/item-edit/line-qty.js +57 -0
  30. package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
  31. package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
  32. package/dist/shared/components/panels/CommentPanel.js +350 -315
  33. package/dist/shared/components/panels/ItemLockBanner.js +297 -230
  34. package/dist/shared/components/panels/PipelinePanel.js +719 -701
  35. package/dist/shared/components/profile/PersonAdminTools.js +168 -144
  36. package/dist/shared/components/profile/PersonProfile.js +42 -41
  37. package/dist/shared/components/profile/session-actions.js +52 -0
  38. package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
  39. package/dist/shared/components/queue/QueueWorklist.js +1005 -935
  40. package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
  41. package/dist/shared/lib/obligation-banner.js +14 -13
  42. package/dist/shared/lib/obligation-reason-text.js +13 -0
  43. package/dist/shared/lib/query-filter-seed.js +34 -11
  44. package/dist/shared/lib/replay-checkout.js +20 -0
  45. package/dist/shared/lib/sanitize-html.js +24 -15
  46. package/dist/shared/lib/sheet-def.js +38 -22
  47. package/dist/shared/lib/unique-options.js +10 -0
  48. package/dist/shared/lib/utils.js +57 -43
  49. package/dist/shared/lib/validation-rules.js +58 -34
  50. package/package.json +1 -1
@@ -1,272 +1,293 @@
1
- import { jsxs as y, jsx as n } from "react/jsx-runtime";
2
- import { useQuery as L } from "@tanstack/react-query";
3
- import { Check as ie, Copy as se, ChevronRight as oe, Loader2 as ce } from "lucide-react";
4
- import { useState as G, useRef as de } from "react";
5
- import { useNivaroClient as R } from "../../context.js";
6
- import { get as M } from "../../lib/commands.js";
7
- import { useRecordReader as me } from "../../lib/record-loader.js";
8
- import { cn as q, titleCase as X } from "../../lib/utils.js";
9
- import { useChangePulse as ue } from "./GroupSection.js";
10
- import { SYSTEM_FIELDS as fe, SENTINEL_FIELDS as pe, applyDisplayTemplate as z, parseJson as ye, richTextToPlain as be } from "./helpers.js";
11
- import { RelatedItemLabel as Z } from "./RelationCombobox.js";
12
- function he({
1
+ import { jsx as a, jsxs as y } from "react/jsx-runtime";
2
+ import { useQuery as D } from "@tanstack/react-query";
3
+ import { Check as ce, Copy as de, ChevronRight as me, Loader2 as ue } from "lucide-react";
4
+ import { useState as B, useRef as fe, createContext as pe, useContext as ye } from "react";
5
+ import { useNivaroClient as V } from "../../context.js";
6
+ import { get as E } from "../../lib/commands.js";
7
+ import { useRecordReader as be } from "../../lib/record-loader.js";
8
+ import { cn as L, titleCase as Q, toLocalDateString as he } from "../../lib/utils.js";
9
+ import { useChangePulse as xe } from "./GroupSection.js";
10
+ import { SYSTEM_FIELDS as ge, SENTINEL_FIELDS as _e, applyDisplayTemplate as ee, parseJson as ke, richTextToPlain as Ne } from "./helpers.js";
11
+ import { RelatedItemLabel as te } from "./RelationCombobox.js";
12
+ const ne = pe({});
13
+ function Se(e, t) {
14
+ return t ? Object.entries(t).every(
15
+ ([l, r]) => r !== null && typeof r == "object" || String(e[l] ?? "") === String(r ?? "")
16
+ ) : !0;
17
+ }
18
+ function we({
13
19
  relation: e,
14
20
  parentId: t,
15
- allRelations: a,
16
- staging: s,
21
+ allRelations: l,
22
+ staging: r,
17
23
  maxValues: x
18
24
  }) {
19
- var C;
20
- const b = R(), d = e.many_field ?? "", o = e.junction_field ?? (() => {
21
- const p = a.find(
22
- ($) => $.many_collection === e.many_collection && $.id !== e.id
25
+ var T, O;
26
+ const p = V(), d = e.many_field ?? "", u = e.junction_field ?? (() => {
27
+ const n = l.find(
28
+ (f) => f.many_collection === e.many_collection && f.id !== e.id
23
29
  );
24
- return (p == null ? void 0 : p.many_field) ?? "";
25
- })(), _ = e.one_field ?? `${e.many_collection}.${o}`, f = ((C = a.find(
26
- (p) => p.many_collection === e.many_collection && p.many_field === o && p.id !== e.id
27
- )) == null ? void 0 : C.one_collection) ?? null, { data: l = [] } = L({
30
+ return (n == null ? void 0 : n.many_field) ?? "";
31
+ })(), b = e.one_field ?? `${e.many_collection}.${u}`, g = ((T = l.find(
32
+ (n) => n.many_collection === e.many_collection && n.many_field === u && n.id !== e.id
33
+ )) == null ? void 0 : T.one_collection) ?? null, { data: s } = D({
34
+ queryKey: ["summary-junction-relations", e.many_collection],
35
+ queryFn: () => p.request(
36
+ E(`/data-model/relations/for/${e.many_collection}`)
37
+ ).then((n) => n.data ?? []).catch(() => []),
38
+ enabled: !g && !!e.many_collection && !!u,
39
+ staleTime: 10 * 6e4
40
+ }), o = g ?? ((O = s == null ? void 0 : s.find(
41
+ (n) => n.many_collection === e.many_collection && n.many_field === u && !!n.one_collection
42
+ )) == null ? void 0 : O.one_collection) ?? null, { data: c = [] } = D({
28
43
  queryKey: ["m2m-items", e.many_collection, d, t],
29
- queryFn: () => b.request(
30
- M(`/items/${e.many_collection}`, {
44
+ queryFn: () => p.request(
45
+ E(`/items/${e.many_collection}`, {
31
46
  filter: JSON.stringify({ [d]: { _eq: t } }),
32
47
  limit: 200,
33
- fields: `id,${o}`
48
+ fields: `id,${u}`
34
49
  })
35
- ).then((p) => p.data ?? []),
50
+ ).then((n) => n.data ?? []),
36
51
  staleTime: 3e4,
37
52
  enabled: !!t && t !== "new"
38
- }), c = f === "nivaro_files" || f === "directus_files", { data: i } = L({
39
- queryKey: ["col-meta", f],
40
- queryFn: () => b.request(M(`/collections/${f}`)).then((p) => p.data),
41
- enabled: !!f && !c,
53
+ }), _ = o === "nivaro_files" || o === "directus_files", { data: h } = D({
54
+ queryKey: ["col-meta", o],
55
+ queryFn: () => p.request(E(`/collections/${o}`)).then((n) => n.data),
56
+ enabled: !!o && !_,
42
57
  staleTime: 3e5
43
- }), k = (s == null ? void 0 : s.getStagedLinks(_)) ?? [], u = (s == null ? void 0 : s.getStagedUnlinks(_)) ?? /* @__PURE__ */ new Set(), h = l.filter((p) => !u.has(p.id)), g = [
44
- ...k,
45
- ...h.map((p) => p[o]).filter((p) => p != null)
58
+ }), j = (r == null ? void 0 : r.getStagedLinks(b)) ?? [], k = (r == null ? void 0 : r.getStagedUnlinks(b)) ?? /* @__PURE__ */ new Set(), q = c.filter((n) => !k.has(n.id)), N = [
59
+ ...j,
60
+ ...q.map((n) => n[u]).filter((n) => n != null)
46
61
  ];
47
- if (g.length === 0)
48
- return /* @__PURE__ */ n("span", { className: "text-slate-400 dark:text-slate-500", children: "—" });
49
- if (f) {
50
- const $ = g.slice(0, 5), j = g.length - 5;
62
+ if (N.length === 0)
63
+ return /* @__PURE__ */ a("span", { className: "text-slate-400 dark:text-slate-500", children: "—" });
64
+ if (o) {
65
+ const f = N.slice(0, 5), S = N.length - 5;
51
66
  return /* @__PURE__ */ y("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: [
52
- $.map((F, J) => /* @__PURE__ */ y("span", { children: [
53
- J > 0 && ", ",
54
- /* @__PURE__ */ n(
55
- Z,
67
+ f.map((U, R) => /* @__PURE__ */ y("span", { children: [
68
+ R > 0 && ", ",
69
+ /* @__PURE__ */ a(
70
+ te,
56
71
  {
57
- collection: f,
58
- id: F,
59
- displayTemplate: i == null ? void 0 : i.display_template
72
+ collection: o,
73
+ id: U,
74
+ displayTemplate: h == null ? void 0 : h.display_template
60
75
  }
61
76
  )
62
- ] }, String(F))),
63
- j > 0 && /* @__PURE__ */ y("span", { className: "text-slate-400 dark:text-slate-500", children: [
77
+ ] }, String(U))),
78
+ S > 0 && /* @__PURE__ */ y("span", { className: "text-slate-400 dark:text-slate-500", children: [
64
79
  " +",
65
- j,
80
+ S,
66
81
  " more"
67
82
  ] })
68
83
  ] });
69
84
  }
70
85
  return /* @__PURE__ */ y("span", { className: "text-slate-700 dark:text-slate-200", children: [
71
- g.length,
86
+ N.length,
72
87
  " item",
73
- g.length !== 1 ? "s" : ""
88
+ N.length !== 1 ? "s" : ""
74
89
  ] });
75
90
  }
76
- function ee(e) {
77
- const t = R();
78
- return L({
91
+ function ae(e) {
92
+ const t = V();
93
+ return D({
79
94
  queryKey: ["summary-display-template", e],
80
- queryFn: () => t.request(M(`/collections/${e}`)).then((a) => {
81
- var s;
82
- return ((s = a.data) == null ? void 0 : s.display_template) ?? null;
95
+ queryFn: () => t.request(E(`/collections/${e}`)).then((l) => {
96
+ var r;
97
+ return ((r = l.data) == null ? void 0 : r.display_template) ?? null;
83
98
  }).catch(() => null),
84
99
  enabled: !!e,
85
100
  staleTime: 10 * 6e4
86
101
  }).data;
87
102
  }
88
- function xe({ collection: e, id: t }) {
89
- const a = ee(e);
90
- return /* @__PURE__ */ n(Z, { collection: e, id: t, displayTemplate: a ?? void 0 });
103
+ function ve({ collection: e, id: t }) {
104
+ const l = ae(e);
105
+ return /* @__PURE__ */ a(te, { collection: e, id: t, displayTemplate: l ?? void 0 });
91
106
  }
92
- const ge = ["name", "title", "label", "subject", "description", "line_number"], _e = ["amount", "total", "cost", "price", "quantity"], A = 4, I = 200;
93
- function ke(e, t) {
107
+ const qe = ["name", "title", "label", "subject", "description", "line_number"], Te = ["amount", "total", "cost", "price", "quantity"], P = 4, W = 200;
108
+ function $e(e, t) {
94
109
  if (t) {
95
- const a = z(t, e).replace(/\s*[·|\-–—/]\s*(?=[·|\-–—/]|$)/g, "").replace(/^\s*[·|\-–—/]\s*/, "").trim();
96
- if (a !== "") return a;
110
+ const l = ee(t, e).replace(/\s*[·|\-–—/]\s*(?=[·|\-–—/]|$)/g, "").replace(/^\s*[·|\-–—/]\s*/, "").trim();
111
+ if (l !== "") return l;
97
112
  }
98
- for (const a of ge) {
99
- const s = e[a];
100
- if (s != null && String(s).trim() !== "") return String(s).trim();
113
+ for (const l of qe) {
114
+ const r = e[l];
115
+ if (r != null && String(r).trim() !== "") return String(r).trim();
101
116
  }
102
117
  return `#${String(e.id ?? "")}`;
103
118
  }
104
- function te({
119
+ function le({
105
120
  relatedCollection: e,
106
121
  manyField: t,
107
- parentId: a,
108
- rowFilter: s,
122
+ parentId: l,
123
+ rowFilter: r,
109
124
  expanded: x
110
125
  }) {
111
- const b = R(), d = s && Object.keys(s).length > 0 ? {
126
+ var T, O;
127
+ const p = V(), d = ye(ne), u = r && Object.keys(r).length > 0 ? {
112
128
  _and: [
113
- { [t]: { _eq: a } },
129
+ { [t]: { _eq: l } },
114
130
  Object.fromEntries(
115
- Object.entries(s).map(([u, h]) => [
116
- u,
117
- h !== null && typeof h == "object" ? h : { _eq: h }
131
+ Object.entries(r).map(([n, f]) => [
132
+ n,
133
+ f !== null && typeof f == "object" ? f : { _eq: f }
118
134
  ])
119
135
  )
120
136
  ]
121
- } : { [t]: { _eq: a } }, { data: o, isLoading: _ } = L({
137
+ } : { [t]: { _eq: l } }, { data: b, isLoading: g } = D({
122
138
  queryKey: [
123
139
  "o2m-rows",
124
140
  e,
125
141
  t,
126
- a,
127
- s ? JSON.stringify(s) : ""
142
+ l,
143
+ r ? JSON.stringify(r) : ""
128
144
  ],
129
- queryFn: () => b.request(
130
- M(`/items/${e}`, {
131
- filter: JSON.stringify(d),
132
- limit: I
145
+ queryFn: () => p.request(
146
+ E(`/items/${e}`, {
147
+ filter: JSON.stringify(u),
148
+ limit: W
133
149
  })
134
- ).then((u) => u.data ?? []),
135
- enabled: !!a && a !== "new",
150
+ ).then((n) => n.data ?? []),
151
+ enabled: !!l && l !== "new",
136
152
  staleTime: 3e4
137
- }), f = ee(e);
138
- if (_)
139
- return /* @__PURE__ */ n(ce, { className: "h-3 w-3 animate-spin text-slate-400 dark:text-slate-500" });
140
- if (!o || o.length === 0)
141
- return /* @__PURE__ */ n("span", { className: "italic text-[11px] text-slate-400 dark:text-slate-500", children: "None yet" });
142
- const l = o.length >= I, c = _e.find(
143
- (u) => o.some(
144
- (h) => typeof h[u] == "number" || typeof h[u] == "string" && h[u] !== "" && !Number.isNaN(Number(h[u]))
153
+ }), s = ae(e), o = `${e}.${t}`, c = (T = d.deletes) == null ? void 0 : T.get(o), _ = (((O = d.rows) == null ? void 0 : O.get(o)) ?? []).filter(
154
+ (n) => Se(n, r)
155
+ ), h = [
156
+ ...(b ?? []).filter((n) => !(c != null && c.has(String(n.id)))),
157
+ ..._
158
+ ];
159
+ if (g && _.length === 0)
160
+ return /* @__PURE__ */ a(ue, { className: "h-3 w-3 animate-spin text-slate-400 dark:text-slate-500" });
161
+ if (h.length === 0)
162
+ return /* @__PURE__ */ a("span", { className: "italic text-[11px] text-slate-400 dark:text-slate-500", children: "None yet" });
163
+ const j = ((b == null ? void 0 : b.length) ?? 0) >= W, k = Te.find(
164
+ (n) => h.some(
165
+ (f) => typeof f[n] == "number" || typeof f[n] == "string" && f[n] !== "" && !Number.isNaN(Number(f[n]))
145
166
  )
146
- ), i = c && !l ? o.reduce((u, h) => {
147
- const g = Number(h[c]);
148
- return u + (Number.isFinite(g) ? g : 0);
149
- }, 0) : null, k = c ? c !== "quantity" : !1;
167
+ ), q = k && !j ? h.reduce((n, f) => {
168
+ const S = Number(f[k]);
169
+ return n + (Number.isFinite(S) ? S : 0);
170
+ }, 0) : null, N = k ? k !== "quantity" : !1;
150
171
  return /* @__PURE__ */ y("span", { className: "block", children: [
151
172
  /* @__PURE__ */ y("span", { className: "flex items-baseline gap-2", children: [
152
173
  /* @__PURE__ */ y("span", { className: "text-slate-700 dark:text-slate-200", children: [
153
- l ? `${I}+` : o.length,
174
+ j ? `${W}+` : h.length,
154
175
  " row",
155
- o.length !== 1 ? "s" : ""
176
+ h.length !== 1 ? "s" : ""
156
177
  ] }),
157
- i !== null && /* @__PURE__ */ n("span", { className: "tabular-nums text-[11px] text-slate-500 dark:text-slate-400", children: k ? i.toLocaleString(void 0, {
178
+ q !== null && /* @__PURE__ */ a("span", { className: "tabular-nums text-[11px] text-slate-500 dark:text-slate-400", children: N ? q.toLocaleString(void 0, {
158
179
  style: "currency",
159
180
  currency: "USD",
160
- maximumFractionDigits: i % 1 === 0 ? 0 : 2
161
- }) : i.toLocaleString() })
181
+ maximumFractionDigits: q % 1 === 0 ? 0 : 2
182
+ }) : q.toLocaleString() })
162
183
  ] }),
163
184
  /* @__PURE__ */ y("span", { className: "mt-1 block space-y-0.5", children: [
164
- (x ? o : o.slice(0, A)).map((u, h) => /* @__PURE__ */ y(
185
+ (x ? h : h.slice(0, P)).map((n, f) => /* @__PURE__ */ y(
165
186
  "span",
166
187
  {
167
188
  className: "flex items-baseline justify-between gap-2 text-[11px] text-slate-500 dark:text-slate-400",
168
189
  children: [
169
- /* @__PURE__ */ n("span", { className: "truncate", children: ke(u, f ?? null) }),
170
- c && u[c] !== null && u[c] !== void 0 && /* @__PURE__ */ n("span", { className: "shrink-0 tabular-nums", children: (() => {
171
- const g = Number(u[c]);
172
- return Number.isFinite(g) ? k ? g.toLocaleString(void 0, {
190
+ /* @__PURE__ */ a("span", { className: "truncate", children: $e(n, s ?? null) }),
191
+ k && n[k] !== null && n[k] !== void 0 && /* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums", children: (() => {
192
+ const S = Number(n[k]);
193
+ return Number.isFinite(S) ? N ? S.toLocaleString(void 0, {
173
194
  style: "currency",
174
195
  currency: "USD",
175
- maximumFractionDigits: g % 1 === 0 ? 0 : 2
176
- }) : g.toLocaleString() : String(u[c]);
196
+ maximumFractionDigits: S % 1 === 0 ? 0 : 2
197
+ }) : S.toLocaleString() : String(n[k]);
177
198
  })() })
178
199
  ]
179
200
  },
180
- String(u.id ?? h)
201
+ String(n.id ?? f)
181
202
  )),
182
- !x && o.length > A && /* @__PURE__ */ y("span", { className: "block text-[11px] italic text-slate-400 dark:text-slate-500", children: [
203
+ !x && h.length > P && /* @__PURE__ */ y("span", { className: "block text-[11px] italic text-slate-400 dark:text-slate-500", children: [
183
204
  "+",
184
- l ? `${o.length - A}+` : o.length - A,
205
+ j ? `${h.length - P}+` : h.length - P,
185
206
  " more"
186
207
  ] })
187
208
  ] })
188
209
  ] });
189
210
  }
190
- function Ne(e) {
191
- const t = ue(e.val);
192
- return /* @__PURE__ */ n("span", { className: q("inline-block max-w-full rounded-sm", t && "nvr-value-pulse-bg"), children: /* @__PURE__ */ n(Se, { ...e }) });
211
+ function Ce(e) {
212
+ const t = xe(e.val);
213
+ return /* @__PURE__ */ a("span", { className: L("inline-block max-w-full rounded-sm", t && "nvr-value-pulse-bg"), children: /* @__PURE__ */ a(Le, { ...e }) });
193
214
  }
194
- function Se({
215
+ function Le({
195
216
  field: e,
196
217
  val: t,
197
- relations: a,
198
- collection: s,
218
+ relations: l,
219
+ collection: r,
199
220
  itemId: x,
200
- staging: b
221
+ staging: p
201
222
  }) {
202
- const d = e.interface ?? "", o = /* @__PURE__ */ new Set(["select-multiple-m2m", "files-m2m", "relation-grouped"]);
203
- if (!o.has(d) && x) {
204
- const l = a.find(
205
- (c) => !c.junction_field && (c.one_field === e.field || c.many_collection === e.field) && (c.one_collection === s || c.one_collection == null)
223
+ const d = e.interface ?? "", u = /* @__PURE__ */ new Set(["select-multiple-m2m", "files-m2m", "relation-grouped"]);
224
+ if (!u.has(d) && x) {
225
+ const s = l.find(
226
+ (o) => !o.junction_field && (o.one_field === e.field || o.many_collection === e.field) && (o.one_collection === r || o.one_collection == null)
206
227
  );
207
- if (l != null && l.many_collection && l.many_field) {
208
- const c = (() => {
228
+ if (s != null && s.many_collection && s.many_field) {
229
+ const o = (() => {
209
230
  try {
210
231
  return typeof e.options == "string" ? JSON.parse(e.options) : e.options ?? {};
211
232
  } catch {
212
233
  return {};
213
234
  }
214
235
  })();
215
- return /* @__PURE__ */ n(
216
- te,
236
+ return /* @__PURE__ */ a(
237
+ le,
217
238
  {
218
- relatedCollection: l.many_collection,
219
- manyField: l.many_field,
239
+ relatedCollection: s.many_collection,
240
+ manyField: s.many_field,
220
241
  parentId: x,
221
- rowFilter: c.row_filter && typeof c.row_filter == "object" ? c.row_filter : void 0
242
+ rowFilter: o.row_filter && typeof o.row_filter == "object" ? o.row_filter : void 0
222
243
  }
223
244
  );
224
245
  }
225
246
  }
226
- if (o.has(d) && x) {
227
- const l = a.find(
228
- (i) => i.one_collection === s && i.one_field === e.field
229
- ), c = l ? l.junction_field ? l : (() => {
230
- const i = a.find(
231
- (k) => k.many_collection === l.many_collection && k.id !== l.id
247
+ if (u.has(d) && x) {
248
+ const s = l.find(
249
+ (c) => c.one_collection === r && c.one_field === e.field
250
+ ), o = s ? s.junction_field ? s : (() => {
251
+ const c = l.find(
252
+ (_) => _.many_collection === s.many_collection && _.id !== s.id
232
253
  );
233
- return i ? { ...l, junction_field: i.many_field } : null;
254
+ return c ? { ...s, junction_field: c.many_field } : null;
234
255
  })() : null;
235
- if (c) {
236
- const i = ye(e.options);
237
- return /* @__PURE__ */ n(
238
- he,
256
+ if (o) {
257
+ const c = ke(e.options);
258
+ return /* @__PURE__ */ a(
259
+ we,
239
260
  {
240
- relation: c,
261
+ relation: o,
241
262
  parentId: x,
242
- allRelations: a,
243
- staging: b,
244
- maxValues: i == null ? void 0 : i.max_values
263
+ allRelations: l,
264
+ staging: p,
265
+ maxValues: c == null ? void 0 : c.max_values
245
266
  }
246
267
  );
247
268
  }
248
269
  }
249
- if (t == null || t === "") return /* @__PURE__ */ n("span", { className: "text-slate-400 dark:text-slate-500", children: "—" });
270
+ if (t == null || t === "") return /* @__PURE__ */ a("span", { className: "text-slate-400 dark:text-slate-500", children: "—" });
250
271
  if (d === "extension-editorjs" || d === "input-rich-text-html" || d === "rich_text" || d === "wysiwyg" || typeof t == "string") {
251
- const l = be(t);
252
- if (l !== null)
253
- return /* @__PURE__ */ n("span", { className: "truncate text-slate-700 dark:text-slate-200", title: l, children: l || "—" });
272
+ const s = Ne(t);
273
+ if (s !== null)
274
+ return /* @__PURE__ */ a("span", { className: "truncate text-slate-700 dark:text-slate-200", title: s, children: s || "—" });
254
275
  }
255
276
  if (typeof t == "boolean")
256
- return /* @__PURE__ */ n("span", { className: "text-slate-700 dark:text-slate-200", children: t ? "Yes" : "No" });
257
- const f = a.find(
258
- (l) => l.many_collection === s && l.many_field === e.field && !l.junction_field
277
+ return /* @__PURE__ */ a("span", { className: "text-slate-700 dark:text-slate-200", children: t ? "Yes" : "No" });
278
+ const g = l.find(
279
+ (s) => s.many_collection === r && s.many_field === e.field && !s.junction_field
259
280
  );
260
- if (f != null && f.one_collection)
261
- return /* @__PURE__ */ n(xe, { collection: f.one_collection, id: t });
281
+ if (g != null && g.one_collection)
282
+ return /* @__PURE__ */ a(ve, { collection: g.one_collection, id: t });
262
283
  if (e.type === "datetime" || e.type === "date")
263
284
  try {
264
- return /* @__PURE__ */ n("span", { className: "text-slate-700 dark:text-slate-200", children: new Date(String(t)).toLocaleDateString() });
285
+ return /* @__PURE__ */ a("span", { className: "text-slate-700 dark:text-slate-200", children: he(t) });
265
286
  } catch {
266
287
  }
267
- return /* @__PURE__ */ n("span", { className: "truncate text-slate-700 dark:text-slate-200", children: String(t) });
288
+ return /* @__PURE__ */ a("span", { className: "truncate text-slate-700 dark:text-slate-200", children: String(t) });
268
289
  }
269
- function we(e) {
290
+ function je(e) {
270
291
  if (e == null || e === "") return "—";
271
292
  if (typeof e == "boolean") return e ? "Yes" : "No";
272
293
  const t = String(e);
@@ -277,164 +298,166 @@ function we(e) {
277
298
  }
278
299
  return t;
279
300
  }
280
- const B = (e) => {
301
+ const z = (e) => {
281
302
  if (e == null || e === "") return "empty";
282
303
  if (typeof e == "boolean") return e ? "Yes" : "No";
283
304
  if (typeof e == "object") {
284
- const a = e.id;
285
- return a != null ? `#${String(a)}` : Array.isArray(e) ? `${e.length} items` : "a value";
305
+ const l = e.id;
306
+ return l != null ? `#${String(l)}` : Array.isArray(e) ? `${e.length} items` : "a value";
286
307
  }
287
308
  const t = String(e).replace(/<[^>]+>/g, "").trim();
288
309
  return t.length > 48 ? `${t.slice(0, 48)}…` : t;
289
310
  };
290
- function Q(e, t) {
291
- const a = R(), s = me(), x = !!e && t != null && t !== "", { data: b } = L({
311
+ function Z(e, t) {
312
+ const l = V(), r = be(), x = !!e && t != null && t !== "", { data: p } = D({
292
313
  queryKey: ["cbv-collection-meta", e],
293
- queryFn: () => a.request(M(`/collections/${e}`)).then((_) => _.data),
314
+ queryFn: () => l.request(E(`/collections/${e}`)).then((b) => b.data),
294
315
  enabled: x,
295
316
  staleTime: 10 * 6e4,
296
317
  retry: !1
297
- }), { data: d } = L({
318
+ }), { data: d } = D({
298
319
  queryKey: ["rrv-related", e, String(t)],
299
- queryFn: () => s(e, t).catch(() => null),
300
- enabled: x && !!b,
320
+ queryFn: () => r(e, t).catch(() => null),
321
+ enabled: x && !!p,
301
322
  staleTime: 6e4,
302
323
  retry: !1
303
324
  });
304
325
  if (!x) return null;
305
326
  if (!d) return `#${String(t)}`;
306
- const o = z(b == null ? void 0 : b.display_template, d).trim();
307
- if (o) return o;
308
- for (const _ of ["name", "title", "label", "number", "email"]) if (d[_]) return String(d[_]);
327
+ const u = ee(p == null ? void 0 : p.display_template, d).trim();
328
+ if (u) return u;
329
+ for (const b of ["name", "title", "label", "number", "email"]) if (d[b]) return String(d[b]);
309
330
  return `#${String(t)}`;
310
331
  }
311
- function ve({
332
+ function Oe({
312
333
  field: e,
313
334
  from: t,
314
- to: a,
315
- detail: s,
335
+ to: l,
336
+ detail: r,
316
337
  relations: x,
317
- collection: b,
338
+ collection: p,
318
339
  onRevert: d
319
340
  }) {
320
- var c;
321
- const o = ((c = x.find(
322
- (i) => i.many_collection === b && i.many_field === e.field && !!i.one_collection
323
- )) == null ? void 0 : c.one_collection) ?? null, _ = Q(o, t), f = Q(o, a), l = s ? `Unsaved — ${s}` : `Unsaved — was ${_ ?? B(t)} → now ${f ?? B(a)}`;
341
+ var o;
342
+ const u = ((o = x.find(
343
+ (c) => c.many_collection === p && c.many_field === e.field && !!c.one_collection
344
+ )) == null ? void 0 : o.one_collection) ?? null, b = Z(u, t), g = Z(u, l), s = r ? `Unsaved — ${r}` : `Unsaved — was ${b ?? z(t)} → now ${g ?? z(l)}`;
324
345
  return d ? (
325
346
  // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
326
- /* @__PURE__ */ n(
347
+ /* @__PURE__ */ a(
327
348
  "span",
328
349
  {
329
350
  role: "button",
330
351
  tabIndex: 0,
331
352
  "data-summary-changed": !0,
332
- "data-tip": `${l} · click to revert`,
353
+ "data-tip": `${s} · click to revert`,
333
354
  "aria-label": "Revert this change",
334
- onClick: (i) => {
335
- i.stopPropagation(), d();
355
+ onClick: (c) => {
356
+ c.stopPropagation(), d();
336
357
  },
337
- onKeyDown: (i) => {
338
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.stopPropagation(), d());
358
+ onKeyDown: (c) => {
359
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), c.stopPropagation(), d());
339
360
  },
340
361
  className: "group/dot inline-flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-amber-100 dark:hover:bg-amber-500/20",
341
- children: /* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400 ring-2 ring-amber-100 group-hover/dot:ring-amber-200 dark:ring-amber-500/30" })
362
+ children: /* @__PURE__ */ a("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400 ring-2 ring-amber-100 group-hover/dot:ring-amber-200 dark:ring-amber-500/30" })
342
363
  }
343
364
  )
344
- ) : /* @__PURE__ */ n(
365
+ ) : /* @__PURE__ */ a(
345
366
  "span",
346
367
  {
347
368
  "data-summary-changed": !0,
348
- "data-tip": l,
369
+ "data-tip": s,
349
370
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-amber-400 ring-2 ring-amber-100 dark:ring-amber-500/30"
350
371
  }
351
372
  );
352
373
  }
353
- function Re({
374
+ function Je({
354
375
  allSteps: e,
355
376
  groupedMap: t,
356
- ungroupedFields: a,
357
- sectionGroups: s,
377
+ ungroupedFields: l,
378
+ sectionGroups: r,
358
379
  draft: x,
359
- relations: b,
380
+ relations: p,
360
381
  collection: d,
361
- itemId: o,
362
- staging: _,
363
- errors: f,
364
- staleFields: l,
365
- aliasEmptiness: c,
366
- layoutFields: i,
367
- changedFields: k,
368
- onRevertChange: u,
369
- onFieldClick: h
382
+ itemId: u,
383
+ staging: b,
384
+ errors: g,
385
+ staleFields: s,
386
+ aliasEmptiness: o,
387
+ layoutFields: c,
388
+ changedFields: _,
389
+ onRevertChange: h,
390
+ onFieldClick: j,
391
+ stagedO2MRows: k,
392
+ stagedO2MDeletes: q
370
393
  }) {
371
- const [g, C] = G(null), [p, $] = G(null), j = de(/* @__PURE__ */ new Map()), K = [
372
- ...!e.some((r) => r.key === "__general__") && a.length > 0 ? [{ key: "__general__", label: "General" }] : [],
394
+ const [N, T] = B(null), [O, n] = B(null), f = fe(/* @__PURE__ */ new Map()), R = [
395
+ ...!e.some((i) => i.key === "__general__") && l.length > 0 ? [{ key: "__general__", label: "General" }] : [],
373
396
  ...e
374
- ].map((r) => {
375
- const w = (r.key === "__general__" ? [...a, ...s.flatMap((N) => t[N.key] ?? [])] : t[r.key] ?? []).filter((N) => !N.hidden && !fe.has(N.field) && !pe.has(N.field));
376
- return { step: r, fields: w };
377
- }).filter((r) => r.fields.length > 0), ne = new Set(K.flatMap((r) => r.fields.map((w) => w.field))), D = o && o !== "new" ? b.filter(
378
- (r) => !r.junction_field && r.many_field && r.many_collection && (r.one_collection === d || r.one_collection == null) && r.one_field != null && !ne.has(r.one_field) && // Off-layout aliases stay out — the sidebar summarizes THIS layout.
379
- (!i || i.has(r.one_field))
397
+ ].map((i) => {
398
+ const $ = (i.key === "__general__" ? [...l, ...r.flatMap((w) => t[w.key] ?? [])] : t[i.key] ?? []).filter((w) => !w.hidden && !ge.has(w.field) && !_e.has(w.field));
399
+ return { step: i, fields: $ };
400
+ }).filter((i) => i.fields.length > 0), re = new Set(R.flatMap((i) => i.fields.map(($) => $.field))), K = u && u !== "new" ? p.filter(
401
+ (i) => !i.junction_field && i.many_field && i.many_collection && (i.one_collection === d || i.one_collection == null) && i.one_field != null && !re.has(i.one_field) && // Off-layout aliases stay out — the sidebar summarizes THIS layout.
402
+ (!c || c.has(i.one_field))
380
403
  ) : [];
381
- return K.length === 0 && D.length === 0 ? null : /* @__PURE__ */ y("div", { className: "overflow-hidden bg-white dark:bg-card", children: [
382
- /* @__PURE__ */ n("div", { className: "bg-slate-200 border-b border-slate-300 px-4 py-2.5 dark:bg-white/[0.1] dark:border-border", children: /* @__PURE__ */ n("span", { className: "text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: "Summary" }) }),
383
- K.map(({ step: r, fields: w }, N) => /* @__PURE__ */ y("div", { children: [
384
- /* @__PURE__ */ n(
404
+ return R.length === 0 && K.length === 0 ? null : /* @__PURE__ */ a(ne.Provider, { value: { rows: k, deletes: q }, children: /* @__PURE__ */ y("div", { className: "overflow-hidden bg-white dark:bg-card", children: [
405
+ /* @__PURE__ */ a("div", { className: "bg-slate-200 border-b border-slate-300 px-4 py-2.5 dark:bg-white/[0.1] dark:border-border", children: /* @__PURE__ */ a("span", { className: "text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: "Summary" }) }),
406
+ R.map(({ step: i, fields: $ }, w) => /* @__PURE__ */ y("div", { children: [
407
+ /* @__PURE__ */ a(
385
408
  "div",
386
409
  {
387
- className: q(
410
+ className: L(
388
411
  "bg-slate-100 px-4 py-2 border-b border-slate-200 dark:bg-white/[0.06] dark:border-border/80",
389
- N > 0 && "border-t border-slate-200 dark:border-border/80"
412
+ w > 0 && "border-t border-slate-200 dark:border-border/80"
390
413
  ),
391
- children: /* @__PURE__ */ n("span", { className: "text-[11px] font-semibold text-slate-600 dark:text-slate-300", children: r.label })
414
+ children: /* @__PURE__ */ a("span", { className: "text-[11px] font-semibold text-slate-600 dark:text-slate-300", children: i.label })
392
415
  }
393
416
  ),
394
- w.map((m, E) => {
395
- const S = x[m.field], v = m.label ?? X(m.field), T = !!(f != null && f[m.field]), O = c == null ? void 0 : c[m.field], ae = O !== void 0 ? O === !0 : S == null || typeof S == "string" && S.trim() === "" || Array.isArray(S) && S.length === 0, le = O === null, V = !!m.required && ae && !T && !le, P = (l == null ? void 0 : l.has(m.field)) ?? !1;
417
+ $.map((m, F) => {
418
+ const v = x[m.field], C = m.label ?? Q(m.field), M = !!(g != null && g[m.field]), A = o == null ? void 0 : o[m.field], se = A !== void 0 ? A === !0 : v == null || typeof v == "string" && v.trim() === "" || Array.isArray(v) && v.length === 0, ie = A === null, I = !!m.required && se && !M && !ie, J = (s == null ? void 0 : s.has(m.field)) ?? !1;
396
419
  return /* @__PURE__ */ y(
397
420
  "div",
398
421
  {
399
- className: q(
422
+ className: L(
400
423
  "group/row flex items-stretch",
401
- E < w.length - 1 && "border-b border-slate-100 dark:border-border/60",
402
- T ? "bg-red-50 dark:bg-red-900/10" : V || P ? "bg-amber-50/70 dark:bg-amber-900/10" : ""
424
+ F < $.length - 1 && "border-b border-slate-100 dark:border-border/60",
425
+ M ? "bg-red-50 dark:bg-red-900/10" : I || J ? "bg-amber-50/70 dark:bg-amber-900/10" : ""
403
426
  ),
404
427
  children: [
405
428
  /* @__PURE__ */ y(
406
429
  "button",
407
430
  {
408
431
  type: "button",
409
- onClick: () => h(r.key, m.field),
410
- className: q(
432
+ onClick: () => j(i.key, m.field),
433
+ className: L(
411
434
  "flex flex-1 flex-col px-4 py-2 text-left transition-colors duration-150 min-w-0",
412
- T ? "hover:bg-red-50 dark:hover:bg-red-900/15" : "hover:bg-slate-50 dark:hover:bg-white/[0.03]"
435
+ M ? "hover:bg-red-50 dark:hover:bg-red-900/15" : "hover:bg-slate-50 dark:hover:bg-white/[0.03]"
413
436
  ),
414
437
  children: [
415
438
  /* @__PURE__ */ y(
416
439
  "span",
417
440
  {
418
- className: q(
441
+ className: L(
419
442
  "flex items-center gap-1 text-[10px] font-medium truncate",
420
- T ? "text-red-500 dark:text-red-400" : V || P ? "text-amber-700 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
443
+ M ? "text-red-500 dark:text-red-400" : I || J ? "text-amber-700 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
421
444
  ),
422
445
  children: [
423
- /* @__PURE__ */ n("span", { className: "truncate", children: v }),
424
- (k == null ? void 0 : k[m.field]) && /* @__PURE__ */ n(
425
- ve,
446
+ /* @__PURE__ */ a("span", { className: "truncate", children: C }),
447
+ (_ == null ? void 0 : _[m.field]) && /* @__PURE__ */ a(
448
+ Oe,
426
449
  {
427
450
  field: m,
428
- from: k[m.field].from,
429
- detail: k[m.field].detail,
430
- to: S,
431
- relations: b,
451
+ from: _[m.field].from,
452
+ detail: _[m.field].detail,
453
+ to: v,
454
+ relations: p,
432
455
  collection: d,
433
- onRevert: u ? () => u(m.field) : void 0
456
+ onRevert: h ? () => h(m.field) : void 0
434
457
  }
435
458
  ),
436
- V && /* @__PURE__ */ n("span", { className: "shrink-0 rounded bg-amber-100 px-1 text-[9px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-900/30 dark:text-amber-400", children: "required" }),
437
- P && /* @__PURE__ */ n(
459
+ I && /* @__PURE__ */ a("span", { className: "shrink-0 rounded bg-amber-100 px-1 text-[9px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-900/30 dark:text-amber-400", children: "required" }),
460
+ J && /* @__PURE__ */ a(
438
461
  "span",
439
462
  {
440
463
  title: "This value is no longer one of the available options",
@@ -445,22 +468,22 @@ function Re({
445
468
  ]
446
469
  }
447
470
  ),
448
- /* @__PURE__ */ n(
471
+ /* @__PURE__ */ a(
449
472
  "span",
450
473
  {
451
- ref: (U) => {
452
- j.current.set(m.field, U);
474
+ ref: (H) => {
475
+ f.current.set(m.field, H);
453
476
  },
454
477
  className: "mt-0.5 w-full text-[12px] min-w-0 overflow-hidden",
455
- children: /* @__PURE__ */ n(
456
- Ne,
478
+ children: /* @__PURE__ */ a(
479
+ Ce,
457
480
  {
458
481
  field: m,
459
- val: S,
460
- relations: b,
482
+ val: v,
483
+ relations: p,
461
484
  collection: d,
462
- itemId: o,
463
- staging: _
485
+ itemId: u,
486
+ staging: b
464
487
  }
465
488
  )
466
489
  }
@@ -468,26 +491,26 @@ function Re({
468
491
  ]
469
492
  }
470
493
  ),
471
- /* @__PURE__ */ n(
494
+ /* @__PURE__ */ a(
472
495
  "button",
473
496
  {
474
497
  type: "button",
475
498
  title: "Copy value",
476
- onClick: (U) => {
477
- var H, W;
478
- U.stopPropagation();
479
- const re = ((W = (H = j.current.get(m.field)) == null ? void 0 : H.textContent) == null ? void 0 : W.trim()) ?? we(S);
480
- navigator.clipboard.writeText(re).catch(() => {
481
- }), C(m.field), setTimeout(
482
- () => C((Y) => Y === m.field ? null : Y),
499
+ onClick: (H) => {
500
+ var Y, G;
501
+ H.stopPropagation();
502
+ const oe = ((G = (Y = f.current.get(m.field)) == null ? void 0 : Y.textContent) == null ? void 0 : G.trim()) ?? je(v);
503
+ navigator.clipboard.writeText(oe).catch(() => {
504
+ }), T(m.field), setTimeout(
505
+ () => T((X) => X === m.field ? null : X),
483
506
  1500
484
507
  );
485
508
  },
486
- className: q(
509
+ className: L(
487
510
  "flex items-center px-2 opacity-0 group-hover/row:opacity-100 transition-all duration-150",
488
- g === m.field ? "text-emerald-500" : "text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300"
511
+ N === m.field ? "text-emerald-500" : "text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300"
489
512
  ),
490
- children: g === m.field ? /* @__PURE__ */ n(ie, { className: "h-3 w-3" }) : /* @__PURE__ */ n(se, { className: "h-3 w-3" })
513
+ children: N === m.field ? /* @__PURE__ */ a(ce, { className: "h-3 w-3" }) : /* @__PURE__ */ a(de, { className: "h-3 w-3" })
491
514
  }
492
515
  )
493
516
  ]
@@ -495,31 +518,31 @@ function Re({
495
518
  m.field
496
519
  );
497
520
  })
498
- ] }, r.key)),
499
- D.length > 0 && /* @__PURE__ */ y("div", { children: [
500
- /* @__PURE__ */ n("div", { className: "bg-slate-100 px-4 py-2 border-y border-slate-200 dark:bg-white/[0.06] dark:border-border/80", children: /* @__PURE__ */ n("span", { className: "text-[11px] font-semibold text-slate-600 dark:text-slate-300", children: "Related" }) }),
501
- D.map((r, w) => {
502
- const N = r.one_field ?? r.many_collection ?? "", m = p === N;
503
- return /* @__PURE__ */ n(
521
+ ] }, i.key)),
522
+ K.length > 0 && /* @__PURE__ */ y("div", { children: [
523
+ /* @__PURE__ */ a("div", { className: "bg-slate-100 px-4 py-2 border-y border-slate-200 dark:bg-white/[0.06] dark:border-border/80", children: /* @__PURE__ */ a("span", { className: "text-[11px] font-semibold text-slate-600 dark:text-slate-300", children: "Related" }) }),
524
+ K.map((i, $) => {
525
+ const w = i.one_field ?? i.many_collection ?? "", m = O === w;
526
+ return /* @__PURE__ */ a(
504
527
  "div",
505
528
  {
506
- className: q(
529
+ className: L(
507
530
  "flex items-stretch",
508
- w < D.length - 1 && "border-b border-slate-100 dark:border-border/60"
531
+ $ < K.length - 1 && "border-b border-slate-100 dark:border-border/60"
509
532
  ),
510
533
  children: /* @__PURE__ */ y(
511
534
  "button",
512
535
  {
513
536
  type: "button",
514
537
  onClick: () => {
515
- var T;
516
- const E = r.many_collection ?? "", S = /(^|_)(notes?|comments?)$/i.test(E), v = document.querySelector(`[data-o2m-collection="${E}"]`) ?? (S ? document.querySelector('[data-panel="notes"]') : null);
517
- if (!v) {
518
- $((O) => O === N ? null : N);
538
+ var M;
539
+ const F = i.many_collection ?? "", v = /(^|_)(notes?|comments?)$/i.test(F), C = document.querySelector(`[data-o2m-collection="${F}"]`) ?? (v ? document.querySelector('[data-panel="notes"]') : null);
540
+ if (!C) {
541
+ n((A) => A === w ? null : w);
519
542
  return;
520
543
  }
521
- v.getAttribute("data-panel-expanded") === "false" && ((T = v.querySelector("[data-panel-toggle]")) == null || T.click()), v.scrollIntoView({ behavior: "smooth", block: "center" }), v.classList.add("ring-2", "ring-nvr-cyan", "ring-offset-2", "rounded-md"), setTimeout(
522
- () => v.classList.remove(
544
+ C.getAttribute("data-panel-expanded") === "false" && ((M = C.querySelector("[data-panel-toggle]")) == null || M.click()), C.scrollIntoView({ behavior: "smooth", block: "center" }), C.classList.add("ring-2", "ring-nvr-cyan", "ring-offset-2", "rounded-md"), setTimeout(
545
+ () => C.classList.remove(
523
546
  "ring-2",
524
547
  "ring-nvr-cyan",
525
548
  "ring-offset-2",
@@ -531,20 +554,23 @@ function Re({
531
554
  className: "flex flex-1 flex-col px-4 py-2 min-w-0 text-left transition-colors hover:bg-nvr-cyan/5",
532
555
  children: [
533
556
  /* @__PURE__ */ y("span", { className: "flex items-center gap-1 text-[10px] font-medium truncate text-slate-400 dark:text-slate-500", children: [
534
- /* @__PURE__ */ n(
535
- oe,
557
+ /* @__PURE__ */ a(
558
+ me,
536
559
  {
537
- className: q("h-3 w-3 shrink-0 transition-transform", m && "rotate-90")
560
+ className: L(
561
+ "h-3 w-3 shrink-0 transition-transform",
562
+ m && "rotate-90"
563
+ )
538
564
  }
539
565
  ),
540
- X(r.one_field ?? r.many_collection ?? "")
566
+ Q(i.one_field ?? i.many_collection ?? "")
541
567
  ] }),
542
- /* @__PURE__ */ n("span", { className: "mt-0.5 text-[12px]", children: /* @__PURE__ */ n(
543
- te,
568
+ /* @__PURE__ */ a("span", { className: "mt-0.5 text-[12px]", children: /* @__PURE__ */ a(
569
+ le,
544
570
  {
545
- relatedCollection: r.many_collection ?? "",
546
- manyField: r.many_field,
547
- parentId: o,
571
+ relatedCollection: i.many_collection ?? "",
572
+ manyField: i.many_field,
573
+ parentId: u,
548
574
  expanded: m
549
575
  }
550
576
  ) })
@@ -552,14 +578,14 @@ function Re({
552
578
  }
553
579
  )
554
580
  },
555
- r.id ?? `${r.many_collection}.${r.many_field}`
581
+ i.id ?? `${i.many_collection}.${i.many_field}`
556
582
  );
557
583
  })
558
584
  ] })
559
- ] });
585
+ ] }) });
560
586
  }
561
587
  export {
562
- xe as M2OSummaryValue,
563
- Ne as SummaryFieldValue,
564
- Re as SummaryPanel
588
+ ve as M2OSummaryValue,
589
+ Ce as SummaryFieldValue,
590
+ Je as SummaryPanel
565
591
  };