@nivaro/react 0.3.33 → 0.3.35

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 (32) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +79 -5
  4. package/dist/index.js +338 -329
  5. package/dist/shared/components/ItemEditForm.js +5274 -5069
  6. package/dist/shared/components/ProfileView.js +46 -44
  7. package/dist/shared/components/ReportView.js +208 -205
  8. package/dist/shared/components/SearchHighlight.js +30 -0
  9. package/dist/shared/components/TipLayer.js +39 -37
  10. package/dist/shared/components/item-edit/CatalogPickerField.js +1484 -1232
  11. package/dist/shared/components/item-edit/FieldAffordances.js +424 -213
  12. package/dist/shared/components/item-edit/FieldRow.js +475 -427
  13. package/dist/shared/components/item-edit/PersonalDefaultControl.js +211 -0
  14. package/dist/shared/components/item-edit/PersonalDefaultPill.js +20 -0
  15. package/dist/shared/components/item-edit/RecordLiveSync.js +115 -110
  16. package/dist/shared/components/item-edit/RelationCombobox.js +42 -41
  17. package/dist/shared/components/item-edit/catalog-search.js +34 -0
  18. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +43 -43
  19. package/dist/shared/components/item-edit/live-record-marks.js +13 -0
  20. package/dist/shared/components/item-edit/personal-default-checks.js +134 -0
  21. package/dist/shared/components/item-edit/usePersonalDefaults.js +442 -0
  22. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +130 -111
  23. package/dist/shared/components/layout-editor/inspector/RulesTab.js +76 -75
  24. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  25. package/dist/shared/components/profile/MyDefaultsCard.js +667 -0
  26. package/dist/shared/components/profile/PersonProfile.js +42 -40
  27. package/dist/shared/components/profile/my-defaults-labels.js +76 -0
  28. package/dist/shared/components/profile/primitives.js +72 -67
  29. package/dist/shared/lib/personal-defaults.js +76 -0
  30. package/dist/shared/lib/request-gate.js +78 -76
  31. package/dist/shared/lib/search-text.js +111 -0
  32. package/package.json +1 -1
@@ -1,28 +1,29 @@
1
- import { jsx as i, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
2
  import { useQueryClient as ue } from "@tanstack/react-query";
3
- import { EyeOff as me, ArrowLeft as le, Trash2 as be, Copy as fe, FileUp as pe, Bot as he, UploadCloud as ge } from "lucide-react";
4
- import { useState as w, useRef as h, useEffect as k } from "react";
3
+ import { EyeOff as me, ArrowLeft as le, Trash2 as fe, Copy as pe, FileUp as be, Bot as he, UploadCloud as ge } from "lucide-react";
4
+ import { useState as w, useRef as g, useEffect as k } from "react";
5
5
  import { toast as O } from "sonner";
6
6
  import { useNivaroClient as ve, useRecordSurface as ye, useItemEditAuth as xe } from "../../context.js";
7
7
  import { get as U, post as we } from "../../lib/commands.js";
8
- import { useLiveRecord as ke, useLiveEvent as ee, useLiveRecordEvent as re, LIVE_ASPECTS as g, batchTouches as Se } from "../../lib/live.js";
8
+ import { useLiveRecord as ke, useLiveEvent as ee, useLiveRecordEvent as re, LIVE_ASPECTS as v, batchTouches as Se } from "../../lib/live.js";
9
9
  import { useOptionalRealtime as Ne } from "../../lib/realtime.js";
10
10
  import { useRecordTabsSignal as Re, useRecordTabs as Te } from "../../lib/record-tabs.js";
11
11
  import { userErrorMessage as _e } from "../../lib/safe-error.js";
12
12
  import { formatRelative as $e } from "../../lib/utils.js";
13
- function Ee(e, r, d) {
14
- var b;
15
- if (d.active)
13
+ import { markLiveRecordWrite as Ee } from "./live-record-marks.js";
14
+ function De(e, r, c) {
15
+ var f;
16
+ if (c.active)
16
17
  return { text: e ? `${e} moved this to ${r}` : `This record moved to ${r}` };
17
- const f = ((b = d.label) == null ? void 0 : b.trim()) || "A record in your tabs";
18
+ const p = ((f = c.label) == null ? void 0 : f.trim()) || "A record in your tabs";
18
19
  return {
19
- text: e ? `${e} moved ${f} to ${r}` : `${f} moved to ${r}`,
20
- open: d.open
20
+ text: e ? `${e} moved ${p} to ${r}` : `${p} moved to ${r}`,
21
+ open: c.open
21
22
  };
22
23
  }
23
- function De(e, r) {
24
- const d = e == null ? void 0 : e.user_id;
25
- return typeof d == "string" && !!r && d.toUpperCase() === String(r).toUpperCase();
24
+ function Le(e, r) {
25
+ const c = e == null ? void 0 : e.user_id;
26
+ return typeof c == "string" && !!r && c.toUpperCase() === String(r).toUpperCase();
26
27
  }
27
28
  const Ae = 8e3, te = [
28
29
  "item",
@@ -44,21 +45,21 @@ const Ae = 8e3, te = [
44
45
  "record-integrations",
45
46
  "record-integrity"
46
47
  ];
47
- function Ce(e, r, d) {
48
- const f = new Set(te), b = String(d);
48
+ function Ce(e, r, c) {
49
+ const p = new Set(te), f = String(c);
49
50
  e.removeQueries({
50
- predicate: (c) => f.has(c.queryKey[0]) && c.queryKey[1] === r && String(c.queryKey[2]) === b
51
+ predicate: (u) => p.has(u.queryKey[0]) && u.queryKey[1] === r && String(u.queryKey[2]) === f
51
52
  });
52
53
  }
53
- function ze(e, r, d) {
54
- if (!r || d.length === 0) return;
55
- const f = new Set(te), b = new Set(d.map(String));
54
+ function Ge(e, r, c) {
55
+ if (!r || c.length === 0) return;
56
+ const p = new Set(te), f = new Set(c.map(String));
56
57
  e.invalidateQueries({
57
- predicate: (c) => f.has(c.queryKey[0]) && c.queryKey[1] === r && b.has(String(c.queryKey[2]))
58
+ predicate: (u) => p.has(u.queryKey[0]) && u.queryKey[1] === r && f.has(String(u.queryKey[2]))
58
59
  });
59
60
  }
60
- function Le({ onBack: e }) {
61
- return /* @__PURE__ */ i("div", { className: "p-6", children: /* @__PURE__ */ u(
61
+ function Qe({ onBack: e }) {
62
+ return /* @__PURE__ */ i("div", { className: "p-6", children: /* @__PURE__ */ m(
62
63
  "div",
63
64
  {
64
65
  "data-record-gone": "access",
@@ -66,11 +67,11 @@ function Le({ onBack: e }) {
66
67
  className: "flex items-center gap-3 rounded-lg border border-amber-300 bg-amber-50 px-3.5 py-2.5 dark:border-amber-500/40 dark:bg-amber-500/10",
67
68
  children: [
68
69
  /* @__PURE__ */ i(me, { className: "h-4 w-4 shrink-0 text-amber-500" }),
69
- /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
70
+ /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
70
71
  /* @__PURE__ */ i("span", { className: "font-semibold", children: "You no longer have access to this record." }),
71
72
  " A role, scope or filter change hid it while you had it open."
72
73
  ] }),
73
- /* @__PURE__ */ u(
74
+ /* @__PURE__ */ m(
74
75
  "button",
75
76
  {
76
77
  type: "button",
@@ -87,30 +88,30 @@ function Le({ onBack: e }) {
87
88
  }
88
89
  ) });
89
90
  }
90
- const Qe = (e) => {
91
+ const qe = (e) => {
91
92
  var r;
92
93
  return (e == null ? void 0 : e.status) ?? ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status);
93
94
  };
94
- function Ge({
95
+ function Je({
95
96
  collection: e,
96
97
  itemId: r,
97
- dirty: d = !1,
98
- loadDenied: f = !1,
99
- onGoneChange: b
98
+ dirty: c = !1,
99
+ loadDenied: p = !1,
100
+ onGoneChange: f
100
101
  }) {
101
- const c = Ne(), T = ve(), y = ue(), [A, j] = w(!1), [C, se] = w([]), [o, ne] = w(null), [ae, L] = w({}), [B, F] = w(!1), [P, Y] = w(!1), S = h(null), N = h(null), _ = h(Date.now()), Q = h(null), $ = h(b);
102
- $.current = b;
103
- const v = h(null), H = ye(), V = h(H);
104
- V.current = H;
102
+ const u = Ne(), T = ve(), x = ue(), [L, j] = w(!1), [A, se] = w([]), [o, ne] = w(null), [ae, C] = w({}), [B, F] = w(!1), [P, Y] = w(!1), S = g(null), N = g(null), _ = g(Date.now()), Q = g(null), $ = g(f);
103
+ $.current = f;
104
+ const y = g(null), W = ye(), H = g(W);
105
+ H.current = W;
105
106
  const R = (s) => {
106
107
  var t;
107
- v.current = s, ne(s), (t = $.current) == null || t.call($, s), (s == null ? void 0 : s.kind) === "access" && setTimeout(() => Ce(y, e, r), 0);
108
+ y.current = s, ne(s), (t = $.current) == null || t.call($, s), (s == null ? void 0 : s.kind) === "access" && setTimeout(() => Ce(x, e, r), 0);
108
109
  };
109
110
  k(() => {
110
- _.current = Date.now(), Q.current = null, L({}), v.current && R(null);
111
+ _.current = Date.now(), Q.current = null, C({}), y.current && R(null);
111
112
  }, [e, r]);
112
- const m = (s) => {
113
- for (const t of s) y.invalidateQueries({ queryKey: t });
113
+ const l = (s) => {
114
+ for (const t of s) x.invalidateQueries({ queryKey: t });
114
115
  }, q = async (s) => {
115
116
  let t = null;
116
117
  try {
@@ -135,7 +136,7 @@ function Ge({
135
136
  U(`/pipelines/instance/${e}/${r}`)
136
137
  )).data, a = (s = t == null ? void 0 : t.history) == null ? void 0 : s[0];
137
138
  if (!a || a.id === Q.current || a.timestamp && new Date(a.timestamp).getTime() < _.current - 5e3 || (Q.current = a.id, typeof document < "u" && document.visibilityState === "hidden")) return;
138
- const l = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.user_email || null, x = a.to_state_label ?? "a new state", n = Ee(l, x, V.current);
139
+ const b = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.user_email || null, d = a.to_state_label ?? "a new state", n = De(b, d, H.current);
139
140
  O.info(
140
141
  n.text,
141
142
  n.open ? { action: { label: "Open", onClick: n.open } } : {}
@@ -143,38 +144,42 @@ function Ge({
143
144
  } catch {
144
145
  }
145
146
  }, ie = (s) => {
146
- var a;
147
+ var a, b;
147
148
  if (s.deleted) {
148
149
  q("deleted");
149
150
  return;
150
151
  }
151
- if (v.current) return;
152
- s.events.some((l) => l.source === "import" && !l.own) && (Y(!0), S.current && clearTimeout(S.current), S.current = setTimeout(() => Y(!1), Ae));
153
- const t = (l) => Se(s, l);
154
- if (t(g.state) && (m([
152
+ if (y.current) return;
153
+ s.events.some((d) => d.source === "import" && !d.own) && (Y(!0), S.current && clearTimeout(S.current), S.current = setTimeout(() => Y(!1), Ae));
154
+ const t = (d) => Se(s, d);
155
+ if (t(v.state) && (l([
155
156
  ["pipeline-instance", e, r],
156
157
  ["pipeline-all-owners", e, r],
157
158
  ["pipeline-instance-owners", e, r],
158
159
  ["pipeline-owners-resolved", e, r],
159
160
  ["approval-brief", e, r]
160
- ]), (a = s.changedFields) != null && a.includes(g.state) && oe()), t(g.addendums) && m([["addendums", e, r]]), t(g.comments) ? m([
161
+ ]), (a = s.changedFields) != null && a.includes(v.state) && oe()), t(v.addendums) && l([["addendums", e, r]]), t(v.comments) ? l([
161
162
  ["comments", e, r],
162
163
  ["comments-related", e, r]
163
- ]) : (t(g.state) || t(g.integrations) || t(g.addendums) || !s.aspectsOnly) && m([["comments-related", e, r]]), t(g.tasks) && m([["tasks", e, r]]), t(g.integrations) && m([
164
+ ]) : (t(v.state) || t(v.integrations) || t(v.addendums) || !s.aspectsOnly) && l([["comments-related", e, r]]), t(v.tasks) && l([["tasks", e, r]]), t(v.integrations) && l([
164
165
  ["erp-submissions", e, r],
165
166
  ["record-integrations", e, r]
166
167
  ]), !s.aspectsOnly) {
167
- if (s.ids.length > 0 && s.ids.every((l) => l === "*")) {
168
- m([
168
+ if (s.ids.length > 0 && s.ids.every((d) => d === "*")) {
169
+ l([
169
170
  ["item", e, r],
170
171
  ["pipeline-instance", e, r]
171
172
  ]);
172
173
  return;
173
174
  }
174
- z(!0);
175
+ Ee(
176
+ e,
177
+ r,
178
+ ((b = s.changedFields) == null ? void 0 : b.filter((d) => !d.startsWith("$"))) ?? null
179
+ ), V(!0);
175
180
  }
176
- }, z = async (s) => {
177
- m([
181
+ }, V = async (s) => {
182
+ l([
178
183
  ["item", e, r],
179
184
  // Summary mode reads its own copy (#1869) — it diffs + highlights.
180
185
  ["rrv-record", e, r],
@@ -182,13 +187,13 @@ function Ge({
182
187
  ["revisions", e, r]
183
188
  ]);
184
189
  const t = ["last-touch", e, String(r)];
185
- await y.invalidateQueries({ queryKey: t }).catch(() => {
186
- }), !(!s || De(y.getQueryData(t), G.current)) && (j(!0), N.current && clearTimeout(N.current), N.current = setTimeout(() => j(!1), 4e3));
190
+ await x.invalidateQueries({ queryKey: t }).catch(() => {
191
+ }), !(!s || Le(x.getQueryData(t), z.current)) && (j(!0), N.current && clearTimeout(N.current), N.current = setTimeout(() => j(!1), 4e3));
187
192
  };
188
193
  ke(e, r, ie);
189
- const { userId: E } = xe(), G = h(E);
190
- G.current = E, Re(E, "saved", e, r, () => {
191
- v.current || (z(!1), m([
194
+ const { userId: E } = xe(), z = g(E);
195
+ z.current = E, Re(E, "saved", e, r, () => {
196
+ y.current || (V(!1), l([
192
197
  ["pipeline-instance", e, r],
193
198
  ["comments", e, r],
194
199
  ["tasks", e, r],
@@ -204,7 +209,7 @@ function Ge({
204
209
  ), ee(
205
210
  "owners:changed",
206
211
  () => {
207
- v.current || m([
212
+ y.current || l([
208
213
  ["pipeline-instance-owners", e, r],
209
214
  ["pipeline-owners-resolved", e, r],
210
215
  ["pipeline-all-owners", e, r],
@@ -216,25 +221,25 @@ function Ge({
216
221
  "record:integrity",
217
222
  e,
218
223
  r,
219
- () => m([["record-integrity", e, r]])
224
+ () => l([["record-integrity", e, r]])
220
225
  );
221
- const J = h(/* @__PURE__ */ new Map());
226
+ const G = g(/* @__PURE__ */ new Map());
222
227
  re("record:automation", e, r, (s) => {
223
228
  const t = String((s == null ? void 0 : s.flow_id) ?? "");
224
229
  if (!t) return;
225
- const a = J.current, l = a.get(t);
226
- l && clearTimeout(l), a.delete(t);
227
- const x = () => L((n) => {
228
- const { [t]: p, ...M } = n;
230
+ const a = G.current, b = a.get(t);
231
+ b && clearTimeout(b), a.delete(t);
232
+ const d = () => C((n) => {
233
+ const { [t]: h, ...M } = n;
229
234
  return M;
230
235
  });
231
236
  if ((s == null ? void 0 : s.state) === "end") {
232
- x();
237
+ d();
233
238
  return;
234
239
  }
235
- L((n) => ({ ...n, [t]: String((s == null ? void 0 : s.flow_name) || "An automation") })), a.set(t, setTimeout(x, 5 * 6e4));
240
+ C((n) => ({ ...n, [t]: String((s == null ? void 0 : s.flow_name) || "An automation") })), a.set(t, setTimeout(d, 5 * 6e4));
236
241
  }), k(() => {
237
- const s = J.current;
242
+ const s = G.current;
238
243
  return () => {
239
244
  for (const t of s.values()) clearTimeout(t);
240
245
  s.clear();
@@ -245,11 +250,11 @@ function Ge({
245
250
  setTimeout(
246
251
  () => {
247
252
  var s;
248
- ((s = v.current) == null ? void 0 : s.kind) !== "deleted" && T.request(U(`/items/${e}/${r}`, { fields: "id" })).then(() => {
253
+ ((s = y.current) == null ? void 0 : s.kind) !== "deleted" && T.request(U(`/items/${e}/${r}`, { fields: "id" })).then(() => {
249
254
  var t;
250
- ((t = v.current) == null ? void 0 : t.kind) === "access" && (R(null), m([["item", e, r]]));
255
+ ((t = y.current) == null ? void 0 : t.kind) === "access" && (R(null), l([["item", e, r]]));
251
256
  }).catch((t) => {
252
- const a = Qe(t);
257
+ const a = qe(t);
253
258
  (a === 403 || a === 404) && q("access");
254
259
  });
255
260
  },
@@ -258,59 +263,59 @@ function Ge({
258
263
  },
259
264
  { debounceMs: 300 }
260
265
  ), k(() => {
261
- f && !v.current && q("access");
262
- }, [f]);
263
- const D = Te(e, r, d, E), [de, W] = w(!1);
266
+ p && !y.current && q("access");
267
+ }, [p]);
268
+ const D = Te(e, r, c, E), [de, J] = w(!1);
264
269
  k(() => {
265
- D.otherDirty || W(!1);
270
+ D.otherDirty || J(!1);
266
271
  }, [D.otherDirty]), k(() => {
267
- if (!c) return;
272
+ if (!u) return;
268
273
  const s = (n) => {
269
- const p = n.detail;
270
- p != null && p.name && c.emit("record:uploading", {
274
+ const h = n.detail;
275
+ h != null && h.name && u.emit("record:uploading", {
271
276
  collection: e,
272
277
  item: String(r),
273
- name: p.name,
274
- state: p.state
278
+ name: h.name,
279
+ state: h.state
275
280
  });
276
281
  };
277
282
  window.addEventListener("nvr:upload-state", s);
278
283
  const t = (n) => {
279
284
  if ((n == null ? void 0 : n.collection) !== e || String(n == null ? void 0 : n.item) !== String(r)) return;
280
- const p = String(n.user_name ?? n.user ?? "Someone");
285
+ const h = String(n.user_name ?? n.user ?? "Someone");
281
286
  se((M) => {
282
- const Z = M.filter((I) => !(I.user === p && I.name === n.name));
283
- return n.state === "start" ? [...Z, { user: p, name: String(n.name) }] : Z;
287
+ const Z = M.filter((I) => !(I.user === h && I.name === n.name));
288
+ return n.state === "start" ? [...Z, { user: h, name: String(n.name) }] : Z;
284
289
  });
285
- }, a = c.on("record:uploading", t), l = c.on("record:comment", (n) => {
286
- (n == null ? void 0 : n.collection) !== e || String(n == null ? void 0 : n.item) !== String(r) || (y.invalidateQueries({ queryKey: ["comments", e, r] }), y.invalidateQueries({ queryKey: ["comments-related", e, r] }));
287
- }), x = (n) => t(n.detail);
288
- return window.addEventListener("nvr:record-uploading", x), () => {
289
- window.removeEventListener("nvr:upload-state", s), window.removeEventListener("nvr:record-uploading", x), a(), l();
290
+ }, a = u.on("record:uploading", t), b = u.on("record:comment", (n) => {
291
+ (n == null ? void 0 : n.collection) !== e || String(n == null ? void 0 : n.item) !== String(r) || (x.invalidateQueries({ queryKey: ["comments", e, r] }), x.invalidateQueries({ queryKey: ["comments-related", e, r] }));
292
+ }), d = (n) => t(n.detail);
293
+ return window.addEventListener("nvr:record-uploading", d), () => {
294
+ window.removeEventListener("nvr:upload-state", s), window.removeEventListener("nvr:record-uploading", d), a(), b();
290
295
  };
291
- }, [c, e, r, y]);
296
+ }, [u, e, r, x]);
292
297
  const ce = async () => {
293
298
  if (o != null && o.trashId) {
294
299
  F(!0);
295
300
  try {
296
- await T.request(we(`/trash/${o.trashId}/restore`, {})), R(null), _.current = Date.now(), m([["item", e, r]]), O.success("Record restored");
301
+ await T.request(we(`/trash/${o.trashId}/restore`, {})), R(null), _.current = Date.now(), l([["item", e, r]]), O.success("Record restored");
297
302
  } catch (s) {
298
303
  O.error(_e(s, "Restore failed"));
299
304
  } finally {
300
305
  F(!1);
301
306
  }
302
307
  }
303
- }, K = Object.values(ae), X = D.otherDirty && !de && !d && !o;
304
- return !o && K.length === 0 && !X && !P && (!c || !A && C.length === 0) ? null : /* @__PURE__ */ u("div", { className: "space-y-2", children: [
305
- (o == null ? void 0 : o.kind) === "deleted" && /* @__PURE__ */ u(
308
+ }, K = Object.values(ae), X = D.otherDirty && !de && !c && !o;
309
+ return !o && K.length === 0 && !X && !P && (!u || !L && A.length === 0) ? null : /* @__PURE__ */ m("div", { className: "space-y-2", children: [
310
+ (o == null ? void 0 : o.kind) === "deleted" && /* @__PURE__ */ m(
306
311
  "div",
307
312
  {
308
313
  "data-record-gone": "deleted",
309
314
  role: "alert",
310
315
  className: "flex items-center gap-3 rounded-lg border border-rose-300 bg-rose-50 px-3.5 py-2.5 dark:border-rose-500/40 dark:bg-rose-500/10",
311
316
  children: [
312
- /* @__PURE__ */ i(be, { className: "h-4 w-4 shrink-0 text-rose-500" }),
313
- /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-rose-800 dark:text-rose-300", children: [
317
+ /* @__PURE__ */ i(fe, { className: "h-4 w-4 shrink-0 text-rose-500" }),
318
+ /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-rose-800 dark:text-rose-300", children: [
314
319
  /* @__PURE__ */ i("span", { className: "font-semibold", children: "This record was deleted" }),
315
320
  o.by ? ` by ${o.by}` : "",
316
321
  o.at ? ` ${$e(o.at)}` : "",
@@ -330,14 +335,14 @@ function Ge({
330
335
  ]
331
336
  }
332
337
  ),
333
- (o == null ? void 0 : o.kind) === "access" && !b && /* @__PURE__ */ i(Le, { onBack: () => window.history.back() }),
334
- X && /* @__PURE__ */ u(
338
+ (o == null ? void 0 : o.kind) === "access" && !f && /* @__PURE__ */ i(Qe, { onBack: () => window.history.back() }),
339
+ X && /* @__PURE__ */ m(
335
340
  "div",
336
341
  {
337
342
  "data-record-other-tab": !0,
338
343
  className: "flex items-center gap-3 rounded-lg border border-amber-300 bg-amber-50 px-3.5 py-2.5 dark:border-amber-500/40 dark:bg-amber-500/10",
339
344
  children: [
340
- /* @__PURE__ */ i(fe, { className: "h-4 w-4 shrink-0 text-amber-500" }),
345
+ /* @__PURE__ */ i(pe, { className: "h-4 w-4 shrink-0 text-amber-500" }),
341
346
  /* @__PURE__ */ i("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: "This record is open with unsaved changes in another tab — editing it here too may overwrite them." }),
342
347
  /* @__PURE__ */ i(
343
348
  "button",
@@ -352,7 +357,7 @@ function Ge({
352
357
  "button",
353
358
  {
354
359
  type: "button",
355
- onClick: () => W(!0),
360
+ onClick: () => J(!0),
356
361
  className: "h-7 shrink-0 rounded-md px-2 text-[11.5px] text-amber-700 hover:bg-amber-100 dark:text-amber-300 dark:hover:bg-amber-500/10",
357
362
  children: "Dismiss"
358
363
  }
@@ -360,23 +365,23 @@ function Ge({
360
365
  ]
361
366
  }
362
367
  ),
363
- P && !o && /* @__PURE__ */ u(
368
+ P && !o && /* @__PURE__ */ m(
364
369
  "div",
365
370
  {
366
371
  "data-record-importing": !0,
367
372
  role: "status",
368
373
  className: "flex items-center gap-3 rounded-lg border border-amber-300 bg-amber-50 px-3.5 py-2.5 dark:border-amber-500/40 dark:bg-amber-500/10",
369
374
  children: [
370
- /* @__PURE__ */ i(pe, { className: "h-4 w-4 shrink-0 animate-pulse text-amber-500" }),
371
- /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
375
+ /* @__PURE__ */ i(be, { className: "h-4 w-4 shrink-0 animate-pulse text-amber-500" }),
376
+ /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-amber-800 dark:text-amber-300", children: [
372
377
  /* @__PURE__ */ i("span", { className: "font-semibold", children: "An import is updating this record" }),
373
378
  " — the changed fields refresh here as it goes.",
374
- d ? " Your unsaved edits may be out of date; check them before saving." : ""
379
+ c ? " Your unsaved edits may be out of date; check them before saving." : ""
375
380
  ] })
376
381
  ]
377
382
  }
378
383
  ),
379
- K.length > 0 && !o && /* @__PURE__ */ u(
384
+ K.length > 0 && !o && /* @__PURE__ */ m(
380
385
  "div",
381
386
  {
382
387
  "data-record-automation": !0,
@@ -384,7 +389,7 @@ function Ge({
384
389
  className: "flex items-center gap-3 rounded-lg border border-nvr-cyan/40 bg-nvr-cyan/10 px-3.5 py-2.5",
385
390
  children: [
386
391
  /* @__PURE__ */ i(he, { className: "h-4 w-4 shrink-0 animate-pulse text-nvr-cyan" }),
387
- /* @__PURE__ */ u("p", { className: "min-w-0 flex-1 text-[12px] text-[#0e7490] dark:text-[#67e8f9]", children: [
392
+ /* @__PURE__ */ m("p", { className: "min-w-0 flex-1 text-[12px] text-[#0e7490] dark:text-[#67e8f9]", children: [
388
393
  /* @__PURE__ */ i("span", { className: "font-semibold", children: "Automation is updating this record" }),
389
394
  " —",
390
395
  " ",
@@ -394,12 +399,12 @@ function Ge({
394
399
  ]
395
400
  }
396
401
  ),
397
- c && (A || C.length > 0) && /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-2", children: [
398
- A && /* @__PURE__ */ u("span", { className: "inline-flex items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-0.5 text-[11px] font-medium text-[#0e7490] dark:text-[#67e8f9]", children: [
402
+ u && (L || A.length > 0) && /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-2", children: [
403
+ L && /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-0.5 text-[11px] font-medium text-[#0e7490] dark:text-[#67e8f9]", children: [
399
404
  /* @__PURE__ */ i("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
400
405
  "Updated just now by someone else"
401
406
  ] }),
402
- C.map((s) => /* @__PURE__ */ u(
407
+ A.map((s) => /* @__PURE__ */ m(
403
408
  "span",
404
409
  {
405
410
  className: "inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-0.5 text-[11px] text-slate-600 dark:border-border dark:bg-card dark:text-slate-300",
@@ -418,10 +423,10 @@ function Ge({
418
423
  }
419
424
  export {
420
425
  te as RECORD_QUERY_HEADS,
421
- Le as RecordAccessLostPanel,
422
- Ge as RecordLiveSync,
423
- ze as invalidateRecordQueries,
424
- Ee as moveNotice,
426
+ Qe as RecordAccessLostPanel,
427
+ Je as RecordLiveSync,
428
+ Ge as invalidateRecordQueries,
429
+ De as moveNotice,
425
430
  Ce as purgeRecordQueries,
426
- De as writtenBySelf
431
+ Le as writtenBySelf
427
432
  };