@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
@@ -7,9 +7,9 @@ import { parseAllowedCollections as Ie } from "../../lib/allowed-collections.js"
7
7
  import { get as C } from "../../lib/commands.js";
8
8
  import { useRecordReader as Ae } from "../../lib/record-loader.js";
9
9
  import { useOnlineUsers as he } from "../../lib/use-online-users.js";
10
- import { cn as Q, userOptionFilter as ye } from "../../lib/utils.js";
11
- import { UserAvatar as be } from "../UserAvatar.js";
12
- import { Command as xe, CommandInput as ge, CommandList as ve, CommandEmpty as ke, CommandGroup as we, CommandItem as Ne } from "../ui/command.js";
10
+ import { cn as Q, userOptionFilter as be } from "../../lib/utils.js";
11
+ import { UserAvatar as ye } from "../UserAvatar.js";
12
+ import { Command as xe, CommandInput as ve, CommandList as ge, CommandEmpty as ke, CommandGroup as we, CommandItem as Ne } from "../ui/command.js";
13
13
  import { Popover as Se, PopoverTrigger as _e, PopoverContent as Ce } from "../ui/popover.js";
14
14
  import { applyDisplayTemplate as qe } from "./helpers.js";
15
15
  import { useM2MStaging as Le } from "./M2MStagingContext.js";
@@ -38,31 +38,31 @@ function tt({
38
38
  parentId: o,
39
39
  allRelations: N,
40
40
  extraFilter: h,
41
- optionSort: y,
41
+ optionSort: b,
42
42
  requiredParent: K,
43
43
  onCountChange: J,
44
44
  drilldown: D
45
45
  }) {
46
- const b = fe(), W = $e(), t = Le(), [P, q] = ne(!1), [L, T] = ne(""), le = N.find(
46
+ const y = fe(), W = $e(), t = Le(), [P, q] = ne(!1), [L, T] = ne(""), le = N.find(
47
47
  (e) => e.many_collection === s.many_collection && e.many_field === s.junction_field && e.id !== s.id
48
- ), r = Te(le), x = s.junction_field ?? "", z = s.many_field ?? "", d = s.one_field ?? `${s.many_collection}.${x}`, { data: a } = w({
48
+ ), r = Te(le), x = s.junction_field ?? "", R = s.many_field ?? "", d = s.one_field ?? `${s.many_collection}.${x}`, { data: a } = w({
49
49
  queryKey: ["col-meta", r],
50
- queryFn: () => b.request(C(`/collections/${r}`)).then((e) => e.data),
50
+ queryFn: () => y.request(C(`/collections/${r}`)).then((e) => e.data),
51
51
  enabled: !!r,
52
52
  staleTime: 3e5,
53
53
  retry: !1
54
54
  }), { data: X = [] } = w({
55
- queryKey: ["m2m-items", s.many_collection, z, o],
56
- queryFn: () => b.request(
55
+ queryKey: ["m2m-items", s.many_collection, R, o],
56
+ queryFn: () => y.request(
57
57
  C(`/items/${s.many_collection}`, {
58
- filter: JSON.stringify({ [z]: { _eq: o } }),
58
+ filter: JSON.stringify({ [R]: { _eq: o } }),
59
59
  limit: 200,
60
60
  fields: `id,${x}`
61
61
  })
62
62
  ).then((e) => e.data ?? []),
63
63
  staleTime: 3e4,
64
64
  enabled: !!o && o !== "new"
65
- }), re = pe().isAdmin, E = r === "nivaro_users" ? ye(re) : null, R = he(r === "nivaro_users"), H = h ? E ? { _and: [h, E] } : h : E, j = H ? JSON.stringify(H) : void 0, g = y && !/^-?label$/.test(y) ? y : void 0, S = (() => {
65
+ }), re = pe().isAdmin, z = r === "nivaro_users" ? be(re) : null, E = he(r === "nivaro_users"), H = h ? z ? { _and: [h, z] } : h : z, j = H ? JSON.stringify(H) : void 0, v = b && !/^-?label$/.test(b) ? b : void 0, S = (() => {
66
66
  const e = a == null ? void 0 : a.display_template;
67
67
  if (!e || !e.includes(".")) return null;
68
68
  const i = [...e.matchAll(/\{\{([^}]+)\}\}/g)].map((u) => u[1].trim());
@@ -73,10 +73,10 @@ function tt({
73
73
  r,
74
74
  L,
75
75
  j,
76
- g ?? "",
76
+ v ?? "",
77
77
  S ?? ""
78
78
  ],
79
- queryFn: () => b.request(
79
+ queryFn: () => y.request(
80
80
  C(`/items/${r}`, {
81
81
  limit: 200,
82
82
  search: L || void 0,
@@ -85,14 +85,14 @@ function tt({
85
85
  // A dotted display template ({{core_category.name}}) needs the
86
86
  // nested expansion — a bare row only carries the FK id.
87
87
  ...S ? { fields: S } : {},
88
- ...g ? { sort: g } : {}
88
+ ...v ? { sort: v } : {}
89
89
  })
90
90
  ).then((e) => e.data ?? []),
91
91
  enabled: P && !!r,
92
92
  staleTime: j ? 0 : 3e4
93
- }), B = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], v = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), U = X.filter((e) => !v.has(e.id)), p = new Set(U.map((e) => String(e[x]))), _ = [...p], Y = JSON.stringify(h ? { _and: [{ id: { _in: _ } }, h] } : { id: { _in: _ } }), { data: m } = w({
93
+ }), B = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], g = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), U = X.filter((e) => !g.has(e.id)), p = new Set(U.map((e) => String(e[x]))), _ = [...p], Y = JSON.stringify(h ? { _and: [{ id: { _in: _ } }, h] } : { id: { _in: _ } }), { data: m } = w({
94
94
  queryKey: ["m2m-avail", r, _.join(","), j],
95
- queryFn: () => b.request(
95
+ queryFn: () => y.request(
96
96
  C(`/items/${r}`, {
97
97
  filter: Y,
98
98
  picker: "1",
@@ -115,7 +115,7 @@ function tt({
115
115
  }
116
116
  const u = X.find((M) => String(M[x]) === i);
117
117
  if (u) {
118
- v.has(u.id) ? t == null || t.unstageUnlink(d, u.id) : t == null || t.stageUnlink(d, u.id);
118
+ g.has(u.id) ? t == null || t.unstageUnlink(d, u.id) : t == null || t.stageUnlink(d, u.id);
119
119
  return;
120
120
  }
121
121
  t == null || t.stageLink(d, e);
@@ -210,6 +210,7 @@ function tt({
210
210
  "button",
211
211
  {
212
212
  type: "button",
213
+ "aria-label": "Remove",
213
214
  onClick: () => t == null ? void 0 : t.stageUnlink(d, e.id),
214
215
  className: "rounded-full p-0.5 text-slate-400 hover:text-red-500",
215
216
  children: /* @__PURE__ */ n(oe, { className: "h-3 w-3" })
@@ -237,6 +238,7 @@ function tt({
237
238
  "button",
238
239
  {
239
240
  type: "button",
241
+ "aria-label": "Remove",
240
242
  onClick: () => t == null ? void 0 : t.unstageLink(d, e),
241
243
  className: "rounded-full p-0.5 text-slate-400 hover:text-red-500",
242
244
  children: /* @__PURE__ */ n(oe, { className: "h-3 w-3" })
@@ -255,7 +257,7 @@ function tt({
255
257
  ) }),
256
258
  /* @__PURE__ */ n(Ce, { className: "w-[320px] p-0", align: "start", children: /* @__PURE__ */ c(xe, { shouldFilter: !1, children: [
257
259
  /* @__PURE__ */ n(
258
- ge,
260
+ ve,
259
261
  {
260
262
  placeholder: "Search…",
261
263
  value: L,
@@ -263,10 +265,10 @@ function tt({
263
265
  className: "h-9 text-[13px]"
264
266
  }
265
267
  ),
266
- /* @__PURE__ */ c(ve, { children: [
268
+ /* @__PURE__ */ c(ge, { children: [
267
269
  V ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ n(ae, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ n(ke, { className: "py-3 text-left text-[12px] text-muted-foreground px-3", children: "No results" }),
268
- /* @__PURE__ */ n(we, { children: !V && (g ? [...O] : [...O].sort(
269
- (e, i) => y === "-label" ? k(i).localeCompare(k(e)) : k(e).localeCompare(k(i))
270
+ /* @__PURE__ */ n(we, { children: !V && (v ? [...O] : [...O].sort(
271
+ (e, i) => b === "-label" ? k(i).localeCompare(k(e)) : k(e).localeCompare(k(i))
270
272
  )).map((e) => {
271
273
  const i = String(e.id), u = A.has(i);
272
274
  return /* @__PURE__ */ c(
@@ -287,14 +289,14 @@ function tt({
287
289
  }
288
290
  ),
289
291
  r === "nivaro_users" && /* @__PURE__ */ n(
290
- be,
292
+ ye,
291
293
  {
292
294
  userId: i,
293
295
  className: "h-4 w-4",
294
296
  fallback: /* @__PURE__ */ n("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[8px] font-bold text-nvr-navy dark:text-nvr-cyan", children: je(k(e)) })
295
297
  }
296
298
  ),
297
- r === "nivaro_users" && R.has(i.toUpperCase()) && /* @__PURE__ */ n(
299
+ r === "nivaro_users" && E.has(i.toUpperCase()) && /* @__PURE__ */ n(
298
300
  "span",
299
301
  {
300
302
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",
@@ -318,31 +320,31 @@ function nt({
318
320
  parentId: o,
319
321
  allRelations: N,
320
322
  extraFilter: h,
321
- optionSort: y,
323
+ optionSort: b,
322
324
  requiredParent: K,
323
325
  onCountChange: J,
324
326
  readOnly: D
325
327
  }) {
326
- const b = fe(), W = Ae(), t = Le(), [P, q] = ne(!1), [L, T] = ne(""), le = N.find(
328
+ const y = fe(), W = Ae(), t = Le(), [P, q] = ne(!1), [L, T] = ne(""), le = N.find(
327
329
  (l) => l.many_collection === s.many_collection && l.many_field === s.junction_field && l.id !== s.id
328
- ), r = Te(le), x = s.junction_field ?? "", z = s.many_field ?? "", d = s.one_field ?? `${s.many_collection}.${x}`, { data: a } = w({
330
+ ), r = Te(le), x = s.junction_field ?? "", R = s.many_field ?? "", d = s.one_field ?? `${s.many_collection}.${x}`, { data: a } = w({
329
331
  queryKey: ["col-meta", r],
330
- queryFn: () => b.request(C(`/collections/${r}`)).then((l) => l.data),
332
+ queryFn: () => y.request(C(`/collections/${r}`)).then((l) => l.data),
331
333
  enabled: !!r,
332
334
  staleTime: 3e5,
333
335
  retry: !1
334
336
  }), { data: X = [], isFetching: re } = w({
335
- queryKey: ["m2m-items", s.many_collection, z, o],
336
- queryFn: () => b.request(
337
+ queryKey: ["m2m-items", s.many_collection, R, o],
338
+ queryFn: () => y.request(
337
339
  C(`/items/${s.many_collection}`, {
338
- filter: JSON.stringify({ [z]: { _eq: o } }),
340
+ filter: JSON.stringify({ [R]: { _eq: o } }),
339
341
  limit: 1,
340
342
  fields: `id,${x}`
341
343
  })
342
344
  ).then((l) => l.data ?? []),
343
345
  staleTime: 3e4,
344
346
  enabled: !!o && o !== "new"
345
- }), E = pe().isAdmin, R = r === "nivaro_users" ? ye(E) : null, H = he(r === "nivaro_users"), j = h ? R ? { _and: [h, R] } : h : R, g = j ? JSON.stringify(j) : void 0, S = y && !/^-?label$/.test(y) ? y : void 0, O = (() => {
347
+ }), z = pe().isAdmin, E = r === "nivaro_users" ? be(z) : null, H = he(r === "nivaro_users"), j = h ? E ? { _and: [h, E] } : h : E, v = j ? JSON.stringify(j) : void 0, S = b && !/^-?label$/.test(b) ? b : void 0, O = (() => {
346
348
  const l = a == null ? void 0 : a.display_template;
347
349
  if (!l || !l.includes(".")) return null;
348
350
  const f = [...l.matchAll(/\{\{([^}]+)\}\}/g)].map((ee) => ee[1].trim());
@@ -352,15 +354,15 @@ function nt({
352
354
  "m2m-options",
353
355
  r,
354
356
  L,
355
- g,
357
+ v,
356
358
  S ?? "",
357
359
  O ?? ""
358
360
  ],
359
- queryFn: () => b.request(
361
+ queryFn: () => y.request(
360
362
  C(`/items/${r}`, {
361
363
  limit: 200,
362
364
  search: L || void 0,
363
- filter: g,
365
+ filter: v,
364
366
  picker: "1",
365
367
  // A dotted display template ({{core_category.name}}) needs the
366
368
  // nested expansion — a bare row only carries the FK id.
@@ -369,8 +371,8 @@ function nt({
369
371
  })
370
372
  ).then((l) => l.data ?? []),
371
373
  enabled: P && !!r,
372
- staleTime: g ? 0 : 3e4
373
- }), v = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], U = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), p = X.find((l) => !U.has(l.id)) ?? null, _ = p ? p[x] : null, Y = v.length > 0 ? v[v.length - 1] : null, m = Y ?? _, Z = v.length > 0 || U.size > 0, $ = me(J);
374
+ staleTime: v ? 0 : 3e4
375
+ }), g = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], U = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), p = X.find((l) => !U.has(l.id)) ?? null, _ = p ? p[x] : null, Y = g.length > 0 ? g[g.length - 1] : null, m = Y ?? _, Z = g.length > 0 || U.size > 0, $ = me(J);
374
376
  $.current = J, ue(() => {
375
377
  var l;
376
378
  (l = $.current) == null || l.call($, m != null ? 1 : 0);
@@ -381,8 +383,8 @@ function nt({
381
383
  enabled: !!r && m != null,
382
384
  staleTime: 6e4
383
385
  }), A = JSON.stringify(h ? { _and: [{ id: { _eq: m } }, h] } : { id: { _eq: m } }), { data: F } = w({
384
- queryKey: ["relation-avail", r, String(m), g],
385
- queryFn: () => b.request(
386
+ queryKey: ["relation-avail", r, String(m), v],
387
+ queryFn: () => y.request(
386
388
  C(`/items/${r}`, {
387
389
  filter: A,
388
390
  picker: "1",
@@ -400,11 +402,11 @@ function nt({
400
402
  if (D)
401
403
  return /* @__PURE__ */ n("span", { className: "block truncate text-[12px] text-slate-700 dark:text-slate-200", children: M ? "…" : se ?? "—" });
402
404
  function Oe(l) {
403
- for (const f of v) t == null || t.unstageLink(d, f);
405
+ for (const f of g) t == null || t.unstageLink(d, f);
404
406
  p && !U.has(p.id) && (t == null || t.stageUnlink(d, p.id)), String(l) === String(_) && p ? t == null || t.unstageUnlink(d, p.id) : String(l) !== String(m) && (t == null || t.stageLink(d, l)), q(!1), T("");
405
407
  }
406
408
  function Ue() {
407
- for (const l of v) t == null || t.unstageLink(d, l);
409
+ for (const l of g) t == null || t.unstageLink(d, l);
408
410
  p && (t == null || t.stageUnlink(d, p.id)), q(!1);
409
411
  }
410
412
  return K ? /* @__PURE__ */ c(
@@ -459,7 +461,7 @@ function nt({
459
461
  ) }),
460
462
  /* @__PURE__ */ n(Ce, { className: "w-[320px] p-0", align: "start", children: /* @__PURE__ */ c(xe, { shouldFilter: !1, children: [
461
463
  /* @__PURE__ */ n(
462
- ge,
464
+ ve,
463
465
  {
464
466
  placeholder: "Search…",
465
467
  value: L,
@@ -481,10 +483,10 @@ function nt({
481
483
  ]
482
484
  }
483
485
  ),
484
- /* @__PURE__ */ c(ve, { children: [
486
+ /* @__PURE__ */ c(ge, { children: [
485
487
  B ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ n(ae, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ n(ke, { className: "py-3 text-left text-[12px] text-muted-foreground px-3", children: "No results" }),
486
488
  !B && /* @__PURE__ */ n(we, { children: [...V].sort(
487
- (l, f) => S ? 0 : y === "-label" ? i(f).localeCompare(i(l)) : i(l).localeCompare(i(f))
489
+ (l, f) => S ? 0 : b === "-label" ? i(f).localeCompare(i(l)) : i(l).localeCompare(i(f))
488
490
  ).map((l) => {
489
491
  const f = String(l.id), ee = String(m) === f;
490
492
  return /* @__PURE__ */ c(
@@ -505,7 +507,7 @@ function nt({
505
507
  }
506
508
  ),
507
509
  r === "nivaro_users" && /* @__PURE__ */ n(
508
- be,
510
+ ye,
509
511
  {
510
512
  userId: f,
511
513
  className: "h-4 w-4",
@@ -4,10 +4,10 @@ import { Loader2 as Pe, Pencil as De, X as Ke } from "lucide-react";
4
4
  import { useMemo as L, useRef as $e, useEffect as ke, useState as T, Fragment as je } from "react";
5
5
  import { useNivaroClient as Le } from "../../context.js";
6
6
  import { get as K, post as Te, patch as Fe, del as Ae } from "../../lib/commands.js";
7
- import { titleCase as R, formatNumber as Je, cn as ue } from "../../lib/utils.js";
7
+ import { titleCase as R, formatNumber as Je, cn as ue, toLocalDateString as Ye } from "../../lib/utils.js";
8
8
  import { FieldRenderer as fe } from "./FieldRenderer.js";
9
- import { SENTINEL_FIELDS as Ye, EMPTY_NESTED_OPS as O, applyDisplayTemplate as Me } from "./helpers.js";
10
- const Se = /* @__PURE__ */ new Set([
9
+ import { SENTINEL_FIELDS as Me, EMPTY_NESTED_OPS as O, applyDisplayTemplate as Se } from "./helpers.js";
10
+ const We = /* @__PURE__ */ new Set([
11
11
  "alias",
12
12
  "o2m",
13
13
  "m2m",
@@ -15,8 +15,8 @@ const Se = /* @__PURE__ */ new Set([
15
15
  "presentation",
16
16
  "group",
17
17
  "divider"
18
- ]), We = /* @__PURE__ */ new Set(["__apply_values__", "__create_with_defaults__"]);
19
- function ze(d, a) {
18
+ ]), ze = /* @__PURE__ */ new Set(["__apply_values__", "__create_with_defaults__"]);
19
+ function Ie(d, a) {
20
20
  return d === a || d == null && a == null ? !0 : d == null || a == null ? !1 : typeof d == "string" && typeof a == "number" || typeof d == "number" && typeof a == "string" ? String(d) === String(a) : JSON.stringify(d) === JSON.stringify(a);
21
21
  }
22
22
  function me(d) {
@@ -28,7 +28,7 @@ function me(d) {
28
28
  }
29
29
  return a != null && a.message ? a.message : a != null && a.error ? a.error : d instanceof Error && d.message ? d.message : "Save failed";
30
30
  }
31
- function Re({
31
+ function Oe({
32
32
  parentCollection: d,
33
33
  relationField: a,
34
34
  parentRowId: x,
@@ -73,7 +73,7 @@ function Re({
73
73
  staleTime: 6e4
74
74
  }), E = L(
75
75
  () => te.filter(
76
- (e) => !e.hidden && !Se.has(e.type) && e.field !== v && !(Y && e.field in Y) && e.field !== "id" && !Ye.has(e.field) && !We.has(e.group_key ?? "")
76
+ (e) => !e.hidden && !We.has(e.type) && e.field !== v && !(Y && e.field in Y) && e.field !== "id" && !Me.has(e.field) && !ze.has(e.group_key ?? "")
77
77
  ),
78
78
  [te, v]
79
79
  ), re = m ? ["nested-rows", c, JSON.stringify(J ?? null)] : ["nested-rows", c, v, x], { data: W = [], isLoading: Q } = j({
@@ -137,7 +137,7 @@ function Re({
137
137
  $[u] = l, f == null || f({ ...s, created: $ });
138
138
  } else {
139
139
  const u = W.find((k) => String(k.id) === o), $ = Object.fromEntries(
140
- Object.entries(r).filter(([k, Ee]) => !ze(Ee, u == null ? void 0 : u[k]))
140
+ Object.entries(r).filter(([k, Ee]) => !Ie(Ee, u == null ? void 0 : u[k]))
141
141
  ), de = s.updated.filter((k) => k.id !== o);
142
142
  Object.keys($).length > 0 && de.push({ id: o, changes: $ }), f == null || f({ ...s, updated: de });
143
143
  }
@@ -237,7 +237,7 @@ function Re({
237
237
  ]);
238
238
  e[t] = {};
239
239
  for (const u of s.data ?? [])
240
- e[t][String(u.id)] = Me(
240
+ e[t][String(u.id)] = Se(
241
241
  (l = i.data) == null ? void 0 : l.display_template,
242
242
  u
243
243
  );
@@ -260,7 +260,7 @@ function Re({
260
260
  return /* @__PURE__ */ n("span", { className: t ? "text-emerald-600" : "text-slate-400", children: t ? "Yes" : "No" });
261
261
  if (e.type === "datetime" || e.type === "date")
262
262
  try {
263
- return /* @__PURE__ */ n("span", { className: "block truncate", children: new Date(String(t)).toLocaleDateString() });
263
+ return /* @__PURE__ */ n("span", { className: "block truncate", children: Ye(t) });
264
264
  } catch {
265
265
  }
266
266
  return /* @__PURE__ */ n("span", { className: "block truncate", children: String(t) });
@@ -470,5 +470,5 @@ function Re({
470
470
  ] });
471
471
  }
472
472
  export {
473
- Re as NestedRelationEditor
473
+ Oe as NestedRelationEditor
474
474
  };