@nivaro/react 0.3.63 → 0.3.65

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 (64) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +54 -5
  4. package/dist/shared/components/CollectionBrowserView.js +3029 -2947
  5. package/dist/shared/components/ConformanceView.js +235 -221
  6. package/dist/shared/components/DataTable.js +478 -459
  7. package/dist/shared/components/ItemEditForm.js +4469 -4266
  8. package/dist/shared/components/PageRenderer.js +146 -138
  9. package/dist/shared/components/RecordDrilldownSheet.js +73 -65
  10. package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
  11. package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
  12. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
  13. package/dist/shared/components/bulk/bulk-field-options.js +29 -23
  14. package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
  15. package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
  16. package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
  17. package/dist/shared/components/integrations/SendCurrentData.js +126 -0
  18. package/dist/shared/components/item-edit/CatalogPickerField.js +1530 -1437
  19. package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
  20. package/dist/shared/components/item-edit/FieldRow.js +413 -403
  21. package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
  22. package/dist/shared/components/item-edit/M2MCombobox.js +172 -168
  23. package/dist/shared/components/item-edit/MidairCollisionDialog.js +341 -114
  24. package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
  25. package/dist/shared/components/item-edit/PlanGrid.js +783 -724
  26. package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
  27. package/dist/shared/components/item-edit/RecordInsights.js +113 -111
  28. package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
  29. package/dist/shared/components/item-edit/RelationCombobox.js +332 -314
  30. package/dist/shared/components/item-edit/cascade-clear-notice.js +52 -0
  31. package/dist/shared/components/item-edit/collision-format.js +37 -0
  32. package/dist/shared/components/item-edit/field-a11y.js +25 -0
  33. package/dist/shared/components/item-edit/line-merge.js +58 -0
  34. package/dist/shared/components/item-edit/line-midair.js +94 -87
  35. package/dist/shared/components/item-edit/move-guard.js +17 -0
  36. package/dist/shared/components/item-edit/picker-search.js +22 -15
  37. package/dist/shared/components/item-edit/rail-width.js +8 -0
  38. package/dist/shared/components/monitoring/InactiveUserLinksView.js +322 -291
  39. package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
  40. package/dist/shared/components/panels/CommentPanel.js +142 -136
  41. package/dist/shared/components/panels/ItemLockBanner.js +246 -240
  42. package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
  43. package/dist/shared/components/panels/RevisionsPanel.js +106 -102
  44. package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
  45. package/dist/shared/components/panels/SlaClock.js +90 -68
  46. package/dist/shared/components/queue/QueueItemSheet.js +94 -87
  47. package/dist/shared/components/queue/QueueWorklist.js +1502 -1354
  48. package/dist/shared/components/queue/worklist-csv.js +75 -0
  49. package/dist/shared/components/queue/worklist-helpers.js +20 -0
  50. package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
  51. package/dist/shared/lib/bulk-copy.js +17 -0
  52. package/dist/shared/lib/cbv-export.js +122 -0
  53. package/dist/shared/lib/delete-offer.js +13 -0
  54. package/dist/shared/lib/error-hints.js +1 -0
  55. package/dist/shared/lib/leave-guard.js +41 -26
  56. package/dist/shared/lib/list-link.js +72 -56
  57. package/dist/shared/lib/live-queries.js +32 -30
  58. package/dist/shared/lib/moved-notice.js +25 -0
  59. package/dist/shared/lib/notification-target.js +56 -54
  60. package/dist/shared/lib/obligation-banner.js +11 -8
  61. package/dist/shared/lib/obligation-reason-text.js +6 -6
  62. package/dist/shared/lib/sort-cycle.js +6 -0
  63. package/dist/shared/lib/summary-mode.js +59 -41
  64. package/package.json +1 -1
@@ -1,85 +1,87 @@
1
- import { jsxs as d, jsx as r, Fragment as y } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as s, Fragment as y } from "react/jsx-runtime";
2
2
  import { useQuery as p } from "@tanstack/react-query";
3
3
  import { Info as w } from "lucide-react";
4
4
  import { useState as f, useRef as v, useEffect as N } from "react";
5
5
  import { useNivaroClient as h } from "../../context.js";
6
6
  import { get as u } from "../../lib/commands.js";
7
- function C(a, t, s) {
8
- for (const o of [
9
- ["record-audience", t, s],
10
- ["erp-submissions", t, String(s)],
11
- ["integration-obligations", "record", t, String(s)],
12
- ["record-integrations", t, s],
13
- ["record-external-ids", t, s],
14
- ["record-owner-history", t, s],
15
- ["record-mail-log", t, s],
16
- ["record-chat-mentions", t, s]
7
+ function C(a, t, n) {
8
+ for (const r of [
9
+ ["record-audience", t, n],
10
+ ["erp-submissions", t, String(n)],
11
+ ["integration-obligations", "record", t, String(n)],
12
+ ["record-integrations", t, n],
13
+ ["record-external-ids", t, n],
14
+ ["record-owner-history", t, n],
15
+ ["record-mail-log", t, n],
16
+ ["record-chat-mentions", t, n]
17
17
  ])
18
- a.invalidateQueries({ queryKey: o });
18
+ a.invalidateQueries({ queryKey: r });
19
19
  }
20
- function M(a, t, s) {
21
- a.invalidateQueries({ queryKey: ["item", t, s] }), a.invalidateQueries({
22
- predicate: (o) => o.queryKey[0] === "o2m-rows" && String(o.queryKey[3]) === s
23
- }), a.invalidateQueries({ queryKey: ["child-summary", t, s] }), a.invalidateQueries({ queryKey: ["last-touch", t, s] }), a.invalidateQueries({ queryKey: ["sla-breach", t, s] }), _(a, t, s);
20
+ function M(a, t, n) {
21
+ a.invalidateQueries({ queryKey: ["item", t, n] }), a.invalidateQueries({
22
+ predicate: (r) => r.queryKey[0] === "o2m-rows" && String(r.queryKey[3]) === n
23
+ }), a.invalidateQueries({ queryKey: ["child-summary", t, n] }), a.invalidateQueries({ queryKey: ["last-touch", t, n] }), a.invalidateQueries({ queryKey: ["sla-breach", t, n] }), a.invalidateQueries({
24
+ predicate: (r) => (r.queryKey[0] === "item-actions" || r.queryKey[0] === "ext-item-actions") && r.queryKey[1] === t && String(r.queryKey[2]) === n
25
+ }), _(a, t, n);
24
26
  }
25
27
  const k = 4e3;
26
- function _(a, t, s) {
28
+ function _(a, t, n) {
27
29
  var e;
28
- const o = () => {
29
- a.invalidateQueries({ queryKey: ["comments", t, s] }), a.invalidateQueries({ queryKey: ["comments-related", t, s] });
30
+ const r = () => {
31
+ a.invalidateQueries({ queryKey: ["comments", t, n] }), a.invalidateQueries({ queryKey: ["comments-related", t, n] });
30
32
  };
31
- o();
32
- const l = setTimeout(o, k);
33
+ r();
34
+ const l = setTimeout(r, k);
33
35
  (e = l.unref) == null || e.call(l);
34
36
  }
35
37
  function B({
36
38
  collection: a,
37
39
  itemId: t,
38
- compact: s
40
+ compact: n
39
41
  }) {
40
- const [o, l] = f(!1), [e, n] = f("audience"), c = v(null);
42
+ const [r, l] = f(!1), [e, i] = f("audience"), c = v(null);
41
43
  return N(() => {
42
- if (!o) return;
43
- const i = (x) => {
44
+ if (!r) return;
45
+ const o = (x) => {
44
46
  var m;
45
47
  (m = c.current) != null && m.contains(x.target) || l(!1);
46
48
  };
47
- return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
48
- }, [o]), /* @__PURE__ */ d("div", { ref: c, className: "relative", children: [
49
- /* @__PURE__ */ r(
49
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
50
+ }, [r]), /* @__PURE__ */ d("div", { ref: c, className: "relative", children: [
51
+ /* @__PURE__ */ s(
50
52
  "button",
51
53
  {
52
54
  type: "button",
53
- onClick: () => l((i) => !i),
55
+ onClick: () => l((o) => !o),
54
56
  "data-tip": "Record insights — audience, integrations, owner history",
55
57
  title: "Record insights",
56
58
  "aria-label": "Record insights",
57
- className: s ? "inline-flex h-8 w-8 items-center justify-center transition-colors hover:bg-accent hover:text-accent-foreground" : "inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
58
- children: /* @__PURE__ */ r(w, { className: s ? "h-4 w-4" : "h-3.5 w-3.5" })
59
+ className: n ? "inline-flex h-8 w-8 items-center justify-center transition-colors hover:bg-accent hover:text-accent-foreground" : "inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
60
+ children: /* @__PURE__ */ s(w, { className: n ? "h-4 w-4" : "h-3.5 w-3.5" })
59
61
  }
60
62
  ),
61
- o && /* @__PURE__ */ d("div", { className: "absolute right-0 top-full z-[60] mt-1 w-[480px] max-w-[92vw] rounded-lg border border-slate-200 bg-white p-3 shadow-xl dark:border-border dark:bg-card", children: [
62
- /* @__PURE__ */ r("div", { className: "mb-2 flex gap-1", children: [
63
+ r && /* @__PURE__ */ d("div", { className: "absolute right-0 top-full z-[60] mt-1 w-[480px] max-w-[92vw] rounded-lg border border-slate-200 bg-white p-3 shadow-xl dark:border-border dark:bg-card", children: [
64
+ /* @__PURE__ */ s("div", { className: "mb-2 flex gap-1", children: [
63
65
  ["audience", "Audience"],
64
66
  ["integrations", "Integrations"],
65
67
  ["owners", "Owner history"],
66
68
  ["mail", "Mail"],
67
69
  ["chat", "Chat"]
68
- ].map(([i, x]) => /* @__PURE__ */ r(
70
+ ].map(([o, x]) => /* @__PURE__ */ s(
69
71
  "button",
70
72
  {
71
73
  type: "button",
72
- onClick: () => n(i),
73
- className: e === i ? "whitespace-nowrap rounded-md bg-nvr-cyan/10 px-2 py-1 text-[11.5px] font-medium text-nvr-navy dark:text-nvr-cyan" : "whitespace-nowrap rounded-md px-2 py-1 text-[11.5px] text-slate-500 hover:bg-muted",
74
+ onClick: () => i(o),
75
+ className: e === o ? "whitespace-nowrap rounded-md bg-nvr-cyan/10 px-2 py-1 text-[11.5px] font-medium text-nvr-navy dark:text-nvr-cyan" : "whitespace-nowrap rounded-md px-2 py-1 text-[11.5px] text-slate-500 hover:bg-muted",
74
76
  children: x
75
77
  },
76
- i
78
+ o
77
79
  )) }),
78
- e === "audience" && /* @__PURE__ */ r($, { collection: a, itemId: t }),
79
- e === "integrations" && /* @__PURE__ */ r(q, { collection: a, itemId: t }),
80
- e === "owners" && /* @__PURE__ */ r(T, { collection: a, itemId: t }),
81
- e === "mail" && /* @__PURE__ */ r(D, { collection: a, itemId: t }),
82
- e === "chat" && /* @__PURE__ */ r(R, { collection: a, itemId: t })
80
+ e === "audience" && /* @__PURE__ */ s($, { collection: a, itemId: t }),
81
+ e === "integrations" && /* @__PURE__ */ s(q, { collection: a, itemId: t }),
82
+ e === "owners" && /* @__PURE__ */ s(T, { collection: a, itemId: t }),
83
+ e === "mail" && /* @__PURE__ */ s(D, { collection: a, itemId: t }),
84
+ e === "chat" && /* @__PURE__ */ s(R, { collection: a, itemId: t })
83
85
  ] })
84
86
  ] });
85
87
  }
@@ -91,42 +93,42 @@ const L = {
91
93
  workflow_transition: "state changes"
92
94
  };
93
95
  function $({ collection: a, itemId: t }) {
94
- const s = h(), { data: o, isLoading: l } = p({
96
+ const n = h(), { data: r, isLoading: l } = p({
95
97
  queryKey: ["record-audience", a, t],
96
- queryFn: () => s.request(u(`/audience/${a}/${t}`)).then((n) => n.data),
98
+ queryFn: () => n.request(u(`/audience/${a}/${t}`)).then((i) => i.data),
97
99
  staleTime: 3e4
98
100
  });
99
- if (l) return /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "Loading…" });
100
- const e = (o == null ? void 0 : o.people) ?? [];
101
- return e.length === 0 ? /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "Nobody hears about changes here automatically — no owners, watchers, or subscribers." }) : /* @__PURE__ */ d("div", { className: "max-h-72 overflow-y-auto", children: [
101
+ if (l) return /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "Loading…" });
102
+ const e = (r == null ? void 0 : r.people) ?? [];
103
+ return e.length === 0 ? /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "Nobody hears about changes here automatically — no owners, watchers, or subscribers." }) : /* @__PURE__ */ d("div", { className: "max-h-72 overflow-y-auto", children: [
102
104
  /* @__PURE__ */ d("p", { className: "pb-1.5 text-[10.5px] text-slate-400", children: [
103
105
  e.length,
104
106
  " ",
105
107
  e.length === 1 ? "person hears" : "people hear",
106
108
  " about changes to this record"
107
109
  ] }),
108
- e.map((n) => /* @__PURE__ */ d(
110
+ e.map((i) => /* @__PURE__ */ d(
109
111
  "div",
110
112
  {
111
113
  className: "border-t border-slate-100 py-1.5 first:border-t-0 dark:border-border/50",
112
114
  children: [
113
- /* @__PURE__ */ r("p", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: n.name }),
115
+ /* @__PURE__ */ s("p", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: i.name }),
114
116
  /* @__PURE__ */ d("div", { className: "mt-0.5 flex flex-wrap gap-1", children: [
115
- n.owner && /* @__PURE__ */ r("span", { className: "rounded-full bg-nvr-cyan/10 px-1.5 py-px text-[10.5px] font-medium text-nvr-navy dark:text-nvr-cyan", children: "Owner — notified on transitions" }),
116
- n.watch_fields.length > 0 && /* @__PURE__ */ d(
117
+ i.owner && /* @__PURE__ */ s("span", { className: "rounded-full bg-nvr-cyan/10 px-1.5 py-px text-[10.5px] font-medium text-nvr-navy dark:text-nvr-cyan", children: "Owner — notified on transitions" }),
118
+ i.watch_fields.length > 0 && /* @__PURE__ */ d(
117
119
  "span",
118
120
  {
119
121
  className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300",
120
- "data-tip": n.watch_fields.join(", "),
122
+ "data-tip": i.watch_fields.join(", "),
121
123
  children: [
122
124
  "Chose to watch ",
123
- n.watch_fields.length,
125
+ i.watch_fields.length,
124
126
  " ",
125
- n.watch_fields.length === 1 ? "field" : "fields"
127
+ i.watch_fields.length === 1 ? "field" : "fields"
126
128
  ]
127
129
  }
128
130
  ),
129
- n.subscriptions.map((c) => /* @__PURE__ */ d(
131
+ i.subscriptions.map((c) => /* @__PURE__ */ d(
130
132
  "span",
131
133
  {
132
134
  className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] text-slate-600 dark:bg-muted dark:text-slate-300",
@@ -142,85 +144,85 @@ function $({ collection: a, itemId: t }) {
142
144
  ] })
143
145
  ]
144
146
  },
145
- n.id
147
+ i.id
146
148
  ))
147
149
  ] });
148
150
  }
149
151
  function q({ collection: a, itemId: t }) {
150
- const s = h(), { data: o = [], isLoading: l } = p({
152
+ const n = h(), { data: r = [], isLoading: l } = p({
151
153
  queryKey: ["erp-submissions", a, String(t)],
152
- queryFn: () => s.request(
154
+ queryFn: () => n.request(
153
155
  u(`/erp-submissions/${a}/${encodeURIComponent(t)}`)
154
- ).then((i) => i.data ?? []).catch(() => []),
156
+ ).then((o) => o.data ?? []).catch(() => []),
155
157
  staleTime: 3e4
156
- }), { data: e, isLoading: n } = p({
158
+ }), { data: e, isLoading: i } = p({
157
159
  queryKey: ["record-integrations", a, t],
158
- queryFn: () => s.request(u(`/record-integrations/${a}/${t}`)).then((i) => i.data),
160
+ queryFn: () => n.request(u(`/record-integrations/${a}/${t}`)).then((o) => o.data),
159
161
  staleTime: 3e4
160
162
  }), { data: c = [] } = p({
161
163
  queryKey: ["record-external-ids", a, t],
162
- queryFn: () => s.request(u(`/items/${a}/${t}`)).then((i) => {
163
- const x = i.data ?? {}, m = /(external|nuvolo|mwf|oracle|sap|erp|legacy|fusion|mdsi).*(id|number|ref)|^(order_number|requisition_id|sales_order_id)$/i;
164
+ queryFn: () => n.request(u(`/items/${a}/${t}`)).then((o) => {
165
+ const x = o.data ?? {}, m = /(external|nuvolo|mwf|oracle|sap|erp|legacy|fusion|mdsi).*(id|number|ref)|^(order_number|requisition_id|sales_order_id)$/i;
164
166
  return Object.entries(x).filter(([b, g]) => b !== "id" && g != null && g !== "" && m.test(b)).map(([b, g]) => ({ field: b, value: String(g).slice(0, 60) })).slice(0, 12);
165
167
  }).catch(() => []),
166
168
  staleTime: 6e4
167
169
  });
168
- return n || l ? /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : o.length + ((e == null ? void 0 : e.webhooks.length) ?? 0) === 0 ? /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "No integration activity for this record." }) : /* @__PURE__ */ d(y, { children: [
170
+ return i || l ? /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : r.length + ((e == null ? void 0 : e.webhooks.length) ?? 0) === 0 ? /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "No integration activity for this record." }) : /* @__PURE__ */ d(y, { children: [
169
171
  c.length > 0 && /* @__PURE__ */ d("div", { className: "border-b border-slate-100 px-3 py-2 dark:border-border/50", children: [
170
- /* @__PURE__ */ r("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "External identifiers" }),
171
- /* @__PURE__ */ r("div", { className: "mt-1 flex flex-wrap gap-1.5", children: c.map((i) => /* @__PURE__ */ d(
172
+ /* @__PURE__ */ s("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "External identifiers" }),
173
+ /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap gap-1.5", children: c.map((o) => /* @__PURE__ */ d(
172
174
  "span",
173
175
  {
174
176
  className: "inline-flex items-center gap-1 rounded border border-slate-200 bg-slate-50 px-1.5 py-0.5 text-[11px] dark:border-border dark:bg-muted/40",
175
177
  children: [
176
178
  /* @__PURE__ */ d("span", { className: "text-slate-400", children: [
177
- i.field,
179
+ o.field,
178
180
  ":"
179
181
  ] }),
180
- /* @__PURE__ */ r("span", { className: "font-mono text-slate-700 dark:text-slate-200", children: i.value })
182
+ /* @__PURE__ */ s("span", { className: "font-mono text-slate-700 dark:text-slate-200", children: o.value })
181
183
  ]
182
184
  },
183
- i.field
185
+ o.field
184
186
  )) })
185
187
  ] }),
186
188
  /* @__PURE__ */ d("div", { className: "max-h-72 space-y-1 overflow-y-auto text-[12px]", children: [
187
- o.map((i) => /* @__PURE__ */ d("p", { className: "flex items-baseline justify-between gap-2", children: [
188
- /* @__PURE__ */ r("span", { className: "min-w-0 truncate text-slate-700 dark:text-slate-200", children: i.external_api_name ?? i.target ?? i.endpoint_path ?? "ERP push" }),
189
+ r.map((o) => /* @__PURE__ */ d("p", { className: "flex items-baseline justify-between gap-2", children: [
190
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-slate-700 dark:text-slate-200", children: o.external_api_name ?? o.target ?? o.endpoint_path ?? "ERP push" }),
189
191
  /* @__PURE__ */ d(
190
192
  "span",
191
193
  {
192
- className: i.status === "failed" ? "shrink-0 text-red-500" : i.status === "accepted" ? "shrink-0 text-emerald-600" : "shrink-0 text-slate-400",
194
+ className: o.status === "failed" ? "shrink-0 text-red-500" : o.status === "accepted" ? "shrink-0 text-emerald-600" : "shrink-0 text-slate-400",
193
195
  children: [
194
- i.status,
196
+ o.status,
195
197
  " · ",
196
- new Date(i.created_at).toLocaleDateString()
198
+ new Date(o.created_at).toLocaleDateString()
197
199
  ]
198
200
  }
199
201
  )
200
- ] }, `e${i.id}`)),
201
- e == null ? void 0 : e.webhooks.map((i) => /* @__PURE__ */ d("p", { className: "flex items-baseline justify-between gap-2", children: [
202
+ ] }, `e${o.id}`)),
203
+ e == null ? void 0 : e.webhooks.map((o) => /* @__PURE__ */ d("p", { className: "flex items-baseline justify-between gap-2", children: [
202
204
  /* @__PURE__ */ d("span", { className: "min-w-0 truncate text-slate-700 dark:text-slate-200", children: [
203
205
  "webhook: ",
204
- i.webhook
206
+ o.webhook
205
207
  ] }),
206
208
  /* @__PURE__ */ d("span", { className: "shrink-0 text-slate-400", children: [
207
- i.response_status,
209
+ o.response_status,
208
210
  " · ",
209
- new Date(i.created_at).toLocaleDateString()
211
+ new Date(o.created_at).toLocaleDateString()
210
212
  ] })
211
- ] }, `w${i.id}`))
213
+ ] }, `w${o.id}`))
212
214
  ] })
213
215
  ] });
214
216
  }
215
217
  function T({ collection: a, itemId: t }) {
216
- const s = h(), { data: o = [], isLoading: l } = p({
218
+ const n = h(), { data: r = [], isLoading: l } = p({
217
219
  queryKey: ["record-owner-history", a, t],
218
- queryFn: () => s.request(u(`/owner-history/${a}/${t}`)).then((e) => e.data),
220
+ queryFn: () => n.request(u(`/owner-history/${a}/${t}`)).then((e) => e.data),
219
221
  staleTime: 3e4
220
222
  });
221
- return l ? /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : o.length === 0 ? /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-400", children: "No workflow history on this record." }) : /* @__PURE__ */ d("div", { className: "max-h-72 space-y-2 overflow-y-auto text-[12px]", children: [
222
- /* @__PURE__ */ r("p", { className: "text-[10.5px] text-amber-600 dark:text-amber-400", children: "Owners shown are resolved with TODAY's matrix config — membership changes since then aren't snapshotted." }),
223
- o.map((e, n) => (
223
+ return l ? /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : r.length === 0 ? /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: "No workflow history on this record." }) : /* @__PURE__ */ d("div", { className: "max-h-72 space-y-2 overflow-y-auto text-[12px]", children: [
224
+ /* @__PURE__ */ s("p", { className: "text-[10.5px] text-amber-600 dark:text-amber-400", children: "Owners shown are resolved with TODAY's matrix config — membership changes since then aren't snapshotted." }),
225
+ r.map((e, i) => (
224
226
  // biome-ignore lint/suspicious/noArrayIndexKey: ordered stays
225
227
  /* @__PURE__ */ d("div", { children: [
226
228
  /* @__PURE__ */ d("p", { className: "font-medium text-slate-700 dark:text-slate-200", children: [
@@ -234,8 +236,8 @@ function T({ collection: a, itemId: t }) {
234
236
  e.moved_by ? ` · moved by ${e.moved_by}` : ""
235
237
  ] })
236
238
  ] }),
237
- /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: e.owners.length > 0 ? e.owners.map((c) => c.name).join(", ") : "no resolved owners" })
238
- ] }, n)
239
+ /* @__PURE__ */ s("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: e.owners.length > 0 ? e.owners.map((c) => c.name).join(", ") : "no resolved owners" })
240
+ ] }, i)
239
241
  ))
240
242
  ] });
241
243
  }
@@ -249,17 +251,17 @@ const S = {
249
251
  }
250
252
  };
251
253
  function K(a) {
252
- const t = a.split(/[,;]/).map((o) => o.trim()).filter(Boolean);
253
- return t.slice(0, 2).map((o) => o.split("@")[0]).join(", ") + (t.length > 2 ? ` +${t.length - 2}` : "");
254
+ const t = a.split(/[,;]/).map((r) => r.trim()).filter(Boolean);
255
+ return t.slice(0, 2).map((r) => r.split("@")[0]).join(", ") + (t.length > 2 ? ` +${t.length - 2}` : "");
254
256
  }
255
257
  function D({ collection: a, itemId: t }) {
256
- const s = h(), { data: o = [], isLoading: l } = p({
258
+ const n = h(), { data: r = [], isLoading: l } = p({
257
259
  queryKey: ["record-mail-log", a, t],
258
- queryFn: () => s.request(u(`/mail-log/record/${a}/${t}`)).then((e) => e.data ?? []).catch(() => []),
260
+ queryFn: () => n.request(u(`/mail-log/record/${a}/${t}`)).then((e) => e.data ?? []).catch(() => []),
259
261
  staleTime: 3e4
260
262
  });
261
- return l ? /* @__PURE__ */ r("p", { className: "p-3 text-[12px] text-slate-400", children: "Loading…" }) : o.length === 0 ? /* @__PURE__ */ r("p", { className: "p-3 text-[12px] text-slate-400", children: "No emails have been sent about this record." }) : /* @__PURE__ */ r("div", { className: "max-h-80 overflow-y-auto", children: o.map((e) => {
262
- const n = S[e.status] ?? {
263
+ return l ? /* @__PURE__ */ s("p", { className: "p-3 text-[12px] text-slate-400", children: "Loading…" }) : r.length === 0 ? /* @__PURE__ */ s("p", { className: "p-3 text-[12px] text-slate-400", children: "No emails have been sent about this record." }) : /* @__PURE__ */ s("div", { className: "max-h-80 overflow-y-auto", children: r.map((e) => {
264
+ const i = S[e.status] ?? {
263
265
  label: e.status,
264
266
  cls: "bg-slate-500/10 text-slate-500"
265
267
  };
@@ -269,7 +271,7 @@ function D({ collection: a, itemId: t }) {
269
271
  className: "border-t border-slate-100 py-2 first:border-t-0 dark:border-border/50",
270
272
  children: [
271
273
  /* @__PURE__ */ d("div", { className: "flex items-start justify-between gap-2", children: [
272
- /* @__PURE__ */ r(
274
+ /* @__PURE__ */ s(
273
275
  "p",
274
276
  {
275
277
  className: "min-w-0 text-[12px] leading-snug text-slate-700 [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] overflow-hidden dark:text-slate-200",
@@ -277,11 +279,11 @@ function D({ collection: a, itemId: t }) {
277
279
  children: e.subject
278
280
  }
279
281
  ),
280
- /* @__PURE__ */ r(
282
+ /* @__PURE__ */ s(
281
283
  "span",
282
284
  {
283
- className: `shrink-0 rounded-full px-1.5 py-px text-[10px] font-medium ${n.cls}`,
284
- children: n.label
285
+ className: `shrink-0 rounded-full px-1.5 py-px text-[10px] font-medium ${i.cls}`,
286
+ children: i.label
285
287
  }
286
288
  )
287
289
  ] }),
@@ -291,12 +293,12 @@ function D({ collection: a, itemId: t }) {
291
293
  K(e.to)
292
294
  ] }),
293
295
  " · ",
294
- /* @__PURE__ */ r("span", { "data-tip": new Date(e.created_at).toLocaleString(), children: new Date(e.created_at).toLocaleDateString(void 0, {
296
+ /* @__PURE__ */ s("span", { "data-tip": new Date(e.created_at).toLocaleString(), children: new Date(e.created_at).toLocaleDateString(void 0, {
295
297
  month: "short",
296
298
  day: "numeric"
297
299
  }) })
298
300
  ] }),
299
- e.status === "failed" && e.error && /* @__PURE__ */ r(
301
+ e.status === "failed" && e.error && /* @__PURE__ */ s(
300
302
  "p",
301
303
  {
302
304
  className: "mt-0.5 truncate rounded bg-red-500/5 px-1.5 py-0.5 text-[10.5px] text-red-600 dark:text-red-400",
@@ -311,33 +313,33 @@ function D({ collection: a, itemId: t }) {
311
313
  }) });
312
314
  }
313
315
  function R({ collection: a, itemId: t }) {
314
- const s = h(), { data: o = [], isLoading: l } = p({
316
+ const n = h(), { data: r = [], isLoading: l } = p({
315
317
  queryKey: ["record-chat-mentions", a, t],
316
- queryFn: () => s.request(u(`/chat/record-mentions/${a}/${t}`)).then((n) => n.data ?? []).catch(() => []),
318
+ queryFn: () => n.request(u(`/chat/record-mentions/${a}/${t}`)).then((i) => i.data ?? []).catch(() => []),
317
319
  staleTime: 6e4
318
320
  });
319
- if (l) return /* @__PURE__ */ r("p", { className: "p-3 text-[12px] text-slate-400", children: "Loading…" });
320
- if (o.length === 0)
321
- return /* @__PURE__ */ r("p", { className: "p-3 text-[12px] text-slate-400", children: "No chat messages mention this record outside its own room." });
322
- const e = (n) => n === "global" ? "#global" : n.startsWith("ch:") ? `#${n.slice(3)}` : n.startsWith("dm:") ? "a direct message" : n;
323
- return /* @__PURE__ */ r("div", { className: "max-h-72 overflow-y-auto", children: o.map((n) => /* @__PURE__ */ d(
321
+ if (l) return /* @__PURE__ */ s("p", { className: "p-3 text-[12px] text-slate-400", children: "Loading…" });
322
+ if (r.length === 0)
323
+ return /* @__PURE__ */ s("p", { className: "p-3 text-[12px] text-slate-400", children: "No chat messages mention this record outside its own room." });
324
+ const e = (i) => i === "global" ? "#global" : i.startsWith("ch:") ? `#${i.slice(3)}` : i.startsWith("dm:") ? "a direct message" : i;
325
+ return /* @__PURE__ */ s("div", { className: "max-h-72 overflow-y-auto", children: r.map((i) => /* @__PURE__ */ d(
324
326
  "div",
325
327
  {
326
328
  className: "border-b border-slate-100 px-3 py-1.5 last:border-b-0 dark:border-border/50",
327
329
  children: [
328
330
  /* @__PURE__ */ d("p", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: [
329
- /* @__PURE__ */ r("span", { className: "font-medium", children: n.sender_name ?? "Someone" }),
331
+ /* @__PURE__ */ s("span", { className: "font-medium", children: i.sender_name ?? "Someone" }),
330
332
  " ",
331
333
  /* @__PURE__ */ d("span", { className: "text-slate-400", children: [
332
334
  "in ",
333
- e(n.room)
335
+ e(i.room)
334
336
  ] })
335
337
  ] }),
336
- /* @__PURE__ */ r("p", { className: "truncate text-[11.5px] text-slate-500", children: n.message.slice(0, 160) }),
337
- /* @__PURE__ */ r("p", { className: "text-[10px] text-slate-400", children: new Date(n.date_created).toLocaleString() })
338
+ /* @__PURE__ */ s("p", { className: "truncate text-[11.5px] text-slate-500", children: i.message.slice(0, 160) }),
339
+ /* @__PURE__ */ s("p", { className: "text-[10px] text-slate-400", children: new Date(i.date_created).toLocaleString() })
338
340
  ]
339
341
  },
340
- n.id
342
+ i.id
341
343
  )) });
342
344
  }
343
345
  export {
@@ -43,7 +43,10 @@ const Qe = 8e3, te = [
43
43
  "approval-brief",
44
44
  "erp-submissions",
45
45
  "record-integrations",
46
- "record-integrity"
46
+ "record-integrity",
47
+ // Per-state extension actions (Push to Fusion): someone else's move changes them (army 11 F-12).
48
+ "item-actions",
49
+ "ext-item-actions"
47
50
  ];
48
51
  function qe(e, r, u) {
49
52
  const p = new Set(te), f = String(u);