@nivaro/react 0.3.64 → 0.3.66

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 (74) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +62 -8
  4. package/dist/shared/components/CollectionBrowserView.js +3127 -3204
  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 +4842 -4500
  8. package/dist/shared/components/MyWorkView.js +124 -113
  9. package/dist/shared/components/PageRenderer.js +146 -138
  10. package/dist/shared/components/ProfileView.js +483 -472
  11. package/dist/shared/components/RecordDrilldownSheet.js +73 -65
  12. package/dist/shared/components/ReportView.js +1100 -1094
  13. package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
  14. package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
  15. package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
  16. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
  17. package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
  18. package/dist/shared/components/bulk/bulk-field-options.js +29 -23
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
  20. package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
  21. package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
  22. package/dist/shared/components/integrations/SendCurrentData.js +126 -0
  23. package/dist/shared/components/item-edit/CatalogPickerField.js +1535 -1440
  24. package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
  25. package/dist/shared/components/item-edit/FieldRow.js +413 -403
  26. package/dist/shared/components/item-edit/GroupSection.js +555 -538
  27. package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
  28. package/dist/shared/components/item-edit/M2MCombobox.js +407 -338
  29. package/dist/shared/components/item-edit/MidairCollisionDialog.js +367 -116
  30. package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
  31. package/dist/shared/components/item-edit/PlanGrid.js +783 -724
  32. package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
  33. package/dist/shared/components/item-edit/RecordInsights.js +113 -111
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
  35. package/dist/shared/components/item-edit/RelationCombobox.js +398 -364
  36. package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
  37. package/dist/shared/components/item-edit/UserChip.js +264 -229
  38. package/dist/shared/components/item-edit/cascade-clear-notice.js +56 -0
  39. package/dist/shared/components/item-edit/collision-format.js +37 -0
  40. package/dist/shared/components/item-edit/field-a11y.js +25 -0
  41. package/dist/shared/components/item-edit/header-path-preview.js +52 -0
  42. package/dist/shared/components/item-edit/line-merge.js +84 -0
  43. package/dist/shared/components/item-edit/line-midair.js +94 -87
  44. package/dist/shared/components/item-edit/move-guard.js +17 -0
  45. package/dist/shared/components/item-edit/picker-search.js +27 -16
  46. package/dist/shared/components/item-edit/rail-width.js +8 -0
  47. package/dist/shared/components/monitoring/InactiveUserLinksView.js +126 -124
  48. package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
  49. package/dist/shared/components/panels/CommentPanel.js +142 -136
  50. package/dist/shared/components/panels/ItemLockBanner.js +246 -240
  51. package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
  52. package/dist/shared/components/panels/RevisionsPanel.js +106 -102
  53. package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
  54. package/dist/shared/components/panels/SlaClock.js +90 -68
  55. package/dist/shared/components/queue/QueueItemSheet.js +94 -87
  56. package/dist/shared/components/queue/QueueWorklist.js +1522 -1347
  57. package/dist/shared/components/queue/worklist-csv.js +75 -0
  58. package/dist/shared/components/queue/worklist-helpers.js +20 -0
  59. package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
  60. package/dist/shared/lib/bulk-copy.js +17 -0
  61. package/dist/shared/lib/cbv-export.js +122 -0
  62. package/dist/shared/lib/delete-offer.js +13 -0
  63. package/dist/shared/lib/error-hints.js +1 -0
  64. package/dist/shared/lib/leave-guard.js +41 -26
  65. package/dist/shared/lib/list-link.js +72 -56
  66. package/dist/shared/lib/live-queries.js +32 -30
  67. package/dist/shared/lib/moved-notice.js +25 -0
  68. package/dist/shared/lib/notification-target.js +56 -54
  69. package/dist/shared/lib/obligation-banner.js +11 -8
  70. package/dist/shared/lib/obligation-reason-text.js +6 -6
  71. package/dist/shared/lib/quick-filter-cascade.js +29 -19
  72. package/dist/shared/lib/sort-cycle.js +6 -0
  73. package/dist/shared/lib/summary-mode.js +59 -41
  74. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ function c(e, n) {
2
+ const r = n.trim() || "this record";
3
+ if (e.kind === "update_fields" && e.summary.trim())
4
+ return `${e.summary.trim().replace(/\.$/, "")} on ${r}.`;
5
+ const t = (e.confirm_text ?? e.summary ?? "").trim();
6
+ return t ? t.replace(/\bthe selected records\b/gi, r).replace(/\bselected records\b/gi, r).replace(/\beach record\b/gi, r) : `${e.label} on ${r}.`;
7
+ }
8
+ function s(e, n) {
9
+ const r = String(e.label ?? "").trim();
10
+ if (r) return r;
11
+ const t = n.find((i) => String(i.id).toLowerCase() === String(e.item).toLowerCase());
12
+ return String((t == null ? void 0 : t.label) ?? "").trim() || "A record";
13
+ }
14
+ export {
15
+ s as outcomeName,
16
+ c as rowActionSentence
17
+ };
@@ -0,0 +1,122 @@
1
+ import { dotsForRecord as m } from "./integration-dots.js";
2
+ const v = {
3
+ state: "State",
4
+ entered: "Last State Change",
5
+ aging: "Aging (days)",
6
+ owners: "Owners",
7
+ addendums: "Addendums",
8
+ fulfilment: "Shipped",
9
+ integrations: "Integrations",
10
+ tasks: "Open tasks"
11
+ }, d = (s) => String(s).padStart(2, "0");
12
+ function f(s) {
13
+ if (s == null || s === "") return "";
14
+ const t = String(s).trim();
15
+ if (/^\d{4}-\d{2}-\d{2}$/.test(t)) return t;
16
+ const a = new Date(t);
17
+ return Number.isNaN(a.getTime()) ? t : `${a.getFullYear()}-${d(a.getMonth() + 1)}-${d(a.getDate())} ${d(a.getHours())}:${d(a.getMinutes())}`;
18
+ }
19
+ function b(s) {
20
+ if (s == null || s === "") return "";
21
+ if (typeof s == "number") return Number.isFinite(s) ? s : "";
22
+ const t = String(s).replace(/[$,\s]/g, "");
23
+ return /^-?\d+(\.\d+)?$/.test(t) ? Number(t) : String(s);
24
+ }
25
+ const p = {
26
+ danger: "behind",
27
+ warning: "in progress",
28
+ positive: "sent",
29
+ neutral: "unknown"
30
+ }, h = {
31
+ draft: "draft",
32
+ submitted: "submitted",
33
+ review: "in review",
34
+ approved: "approved",
35
+ rejected: "rejected"
36
+ };
37
+ function $(s, t, a, i, u = {}) {
38
+ var o;
39
+ const n = a.instances[t];
40
+ switch (s) {
41
+ case "state":
42
+ return (n == null ? void 0 : n.state_label) ?? (n == null ? void 0 : n.state_key) ?? "";
43
+ case "entered":
44
+ return f((n == null ? void 0 : n.entered_at) ?? "");
45
+ case "aging": {
46
+ const e = n != null && n.entered_at ? new Date(n.entered_at).getTime() : Number.NaN;
47
+ if (n != null && n.completed_at || !Number.isFinite(e)) return "";
48
+ const r = ((u.now ?? Date.now()) - e) / 864e5;
49
+ return Math.max(0, Math.round(r * 10) / 10);
50
+ }
51
+ case "owners":
52
+ return (a.owners[t] ?? []).map((e) => e.name).join("; ");
53
+ case "addendums": {
54
+ const e = a.addendums[t];
55
+ if (!e || e.total === 0) return "";
56
+ const r = e.latest ? h[e.latest.status] ?? e.latest.status : "";
57
+ return e.active > 0 ? `${e.active} ${e.active === 1 ? "addendum" : "addendums"} ${r || "active"}` : `${e.total} ${r}`.trim();
58
+ }
59
+ case "fulfilment": {
60
+ const e = u.fulfilment;
61
+ if (!e) return "";
62
+ const r = Number(i[e.shipped_field] ?? 0) || 0, c = Number(i[e.requested_field] ?? 0) || 0;
63
+ return c > 0 || r > 0 ? `${r} of ${c}` : "";
64
+ }
65
+ case "integrations":
66
+ return m(a.integrations[t] ?? []).map((e) => `${e.api}: ${p[e.tone]}`).join("; ");
67
+ case "tasks":
68
+ return ((o = a.tasks[t]) == null ? void 0 : o.open) ?? 0;
69
+ }
70
+ }
71
+ const g = 200;
72
+ async function N(s, t, a) {
73
+ const i = {
74
+ instances: {},
75
+ owners: {},
76
+ addendums: {},
77
+ integrations: {},
78
+ tasks: {}
79
+ }, u = t.has("state") || t.has("entered") || t.has("aging");
80
+ for (let n = 0; n < s.length; n += g) {
81
+ const o = s.slice(n, n + g), e = [];
82
+ u && e.push(
83
+ a.instances(o).then(
84
+ (r) => void Object.assign(i.instances, r),
85
+ () => {
86
+ }
87
+ )
88
+ ), t.has("owners") && e.push(
89
+ a.owners(o).then(
90
+ (r) => void Object.assign(i.owners, r),
91
+ () => {
92
+ }
93
+ )
94
+ ), t.has("addendums") && e.push(
95
+ a.addendums(o).then(
96
+ (r) => void Object.assign(i.addendums, r),
97
+ () => {
98
+ }
99
+ )
100
+ ), t.has("integrations") && e.push(
101
+ a.integrations(o).then(
102
+ (r) => void Object.assign(i.integrations, r),
103
+ () => {
104
+ }
105
+ )
106
+ ), t.has("tasks") && e.push(
107
+ a.tasks(o).then(
108
+ (r) => void Object.assign(i.tasks, r),
109
+ () => {
110
+ }
111
+ )
112
+ ), await Promise.all(e);
113
+ }
114
+ return i;
115
+ }
116
+ export {
117
+ v as VIRTUAL_HEADERS,
118
+ f as csvDateTime,
119
+ b as csvNumber,
120
+ N as readExportExtras,
121
+ $ as virtualExportCell
122
+ };
@@ -0,0 +1,13 @@
1
+ const f = (e) => e === !0 || e === 1 || e === "1" || e === "true";
2
+ function l(e) {
3
+ var n, u, i;
4
+ if (e.isAdmin) return !0;
5
+ if (!e.roleMayDelete || e.builtinOpen !== !0) return !1;
6
+ if (!e.hasPipeline) return !0;
7
+ if (e.run === void 0) return !1;
8
+ const r = (n = e.run) == null ? void 0 : n.instance;
9
+ return r ? r.completed_at != null || !f((u = r.current_state_obj) == null ? void 0 : u.is_initial) ? !1 : !(((i = e.run) == null ? void 0 : i.history) ?? []).some((t) => (t == null ? void 0 : t.from_state) != null) : !0;
10
+ }
11
+ export {
12
+ l as rowDeleteOffered
13
+ };
@@ -47,6 +47,7 @@ const h = {
47
47
  DELETE_GUARDED: "This record is protected from deletion. Sort out what the message names first.",
48
48
  TRANSITION_DUPLICATE: "This move was already made. Reload the record to see where it is now.",
49
49
  PRIORITY_REQUIRED: "Flag the workflow as Priority, then approve.",
50
+ ON_HOLD: "Take the hold off (Remove Hold, with a note), then move it on.",
50
51
  NESTED_ROW_REFUSED: "Fix the line the message names, then save again.",
51
52
  NESTED_ROW_NOT_OWNED: "That line belongs to another record. Reload, then try again.",
52
53
  NESTED_ROWS_LIMIT: "Save fewer lines at once, then add the rest in another save.",
@@ -1,38 +1,53 @@
1
- import { useRef as o, useEffect as c } from "react";
2
- function d(n, r, t, e) {
3
- if (n.defaultPrevented || n.button !== 0 || n.metaKey || n.ctrlKey || n.shiftKey || n.altKey || !r || r.target && r.target !== "_self" || r.hasAttribute("download")) return !1;
4
- let i;
1
+ import { useRef as y, useEffect as L } from "react";
2
+ function K(r, n, t, i) {
3
+ if (r.defaultPrevented || r.button !== 0 || r.metaKey || r.ctrlKey || r.shiftKey || r.altKey || !n || n.target && n.target !== "_self" || n.hasAttribute("download")) return !1;
4
+ let a;
5
5
  try {
6
- i = new URL(r.href, `${t.origin}${t.pathname}${t.search}`);
6
+ a = new URL(n.href, `${t.origin}${t.pathname}${t.search}`);
7
7
  } catch {
8
8
  return !1;
9
9
  }
10
- if (i.origin !== t.origin || i.pathname + i.search === t.pathname + t.search || e != null && e.contains(r)) return !1;
11
- const a = r.closest('[role="dialog"]');
12
- return !(a && !(e && a.contains(e)));
10
+ if (a.origin !== t.origin || a.pathname + a.search === t.pathname + t.search || i != null && i.contains(n)) return !1;
11
+ const u = n.closest('[role="dialog"]');
12
+ return !(u && !(i && u.contains(i)));
13
13
  }
14
- function m(n, r, t) {
15
- const e = o(r);
16
- e.current = r, c(() => {
17
- if (!n) return;
18
- let i = !1;
19
- const a = (s) => {
20
- var u, l;
21
- if (i) return;
22
- const f = (l = (u = s.target) == null ? void 0 : u.closest) == null ? void 0 : l.call(u, "a[href]");
23
- !d(s, f, window.location, t == null ? void 0 : t.current) || !f || (s.preventDefault(), s.stopImmediatePropagation(), e.current(() => {
24
- i = !0;
14
+ function b(r, n, t) {
15
+ if (!n || r.defaultPrevented || r.button !== 0 || r.metaKey || r.ctrlKey || r.shiftKey || r.altKey || !n.hasAttribute("data-leave-guard") || n instanceof HTMLButtonElement && n.disabled || t != null && t.contains(n)) return !1;
16
+ const i = n.closest('[role="dialog"]');
17
+ return !(i && !(t && i.contains(t)));
18
+ }
19
+ function R(r, n, t, i) {
20
+ const a = y(n);
21
+ a.current = n;
22
+ const u = y(i);
23
+ u.current = i, L(() => {
24
+ if (!r) return;
25
+ let o = !1;
26
+ const c = (e) => {
27
+ var m, v;
28
+ if (o) return;
29
+ const s = e.target, l = (m = s == null ? void 0 : s.closest) == null ? void 0 : m.call(s, "a[href]"), d = l ? null : ((v = s == null ? void 0 : s.closest) == null ? void 0 : v.call(s, "[data-leave-guard]")) ?? null, g = l ? K(e, l, window.location, t == null ? void 0 : t.current) : b(e, d, t == null ? void 0 : t.current), f = l ?? d;
30
+ if (!g || !f) return;
31
+ e.preventDefault(), e.stopImmediatePropagation();
32
+ const h = l ? null : f.getAttribute("data-leave-href");
33
+ a.current(() => {
34
+ o = !0;
25
35
  try {
26
- f.click();
36
+ w(f, h, u.current);
27
37
  } finally {
28
- i = !1;
38
+ o = !1;
29
39
  }
30
- }, f));
40
+ }, f);
31
41
  };
32
- return document.addEventListener("click", a, !0), () => document.removeEventListener("click", a, !0);
33
- }, [n, t]);
42
+ return document.addEventListener("click", c, !0), () => document.removeEventListener("click", c, !0);
43
+ }, [r, t]);
44
+ }
45
+ function w(r, n, t) {
46
+ return r.isConnected ? (r.click(), "clicked") : n && t ? (t(n), "navigated") : "lost";
34
47
  }
35
48
  export {
36
- d as isLeavingLink,
37
- m as useLeaveLinkGuard
49
+ b as isLeavingControl,
50
+ K as isLeavingLink,
51
+ w as replayLeave,
52
+ R as useLeaveLinkGuard
38
53
  };
@@ -1,47 +1,47 @@
1
- const _ = "lv";
2
- const m = 7e3;
3
- function A(t) {
1
+ const I = "lv";
2
+ const k = 7e3;
3
+ function L(t) {
4
4
  const e = new TextEncoder().encode(t);
5
- let r = "";
6
- for (const i of e) r += String.fromCharCode(i);
7
- return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
5
+ let o = "";
6
+ for (const i of e) o += String.fromCharCode(i);
7
+ return btoa(o).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
8
8
  }
9
9
  function g(t) {
10
10
  try {
11
- const e = t.replace(/-/g, "+").replace(/_/g, "/"), r = atob(e + "=".repeat((4 - e.length % 4) % 4)), i = Uint8Array.from(r, (s) => s.charCodeAt(0));
11
+ const e = t.replace(/-/g, "+").replace(/_/g, "/"), o = atob(e + "=".repeat((4 - e.length % 4) % 4)), i = Uint8Array.from(o, (r) => r.charCodeAt(0));
12
12
  return new TextDecoder().decode(i);
13
13
  } catch {
14
14
  return null;
15
15
  }
16
16
  }
17
- function L(t) {
17
+ function h(t) {
18
18
  const e = {};
19
- for (const [r, i] of Object.entries(t))
20
- i == null || i === "" || Array.isArray(i) && i.length === 0 || typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (e[r] = i);
19
+ for (const [o, i] of Object.entries(t))
20
+ i == null || i === "" || Array.isArray(i) && i.length === 0 || typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (e[o] = i);
21
21
  return e;
22
22
  }
23
- function h(t, e) {
24
- return A(JSON.stringify({ v: 1, k: t, s: L(e) }));
23
+ function A(t, e) {
24
+ return L(JSON.stringify({ v: 1, k: t, s: h(e) }));
25
25
  }
26
26
  function b(t, e) {
27
27
  if (!t) return null;
28
- const r = g(t);
29
- if (!r) return null;
28
+ const o = g(t);
29
+ if (!o) return null;
30
30
  try {
31
- const i = JSON.parse(r);
31
+ const i = JSON.parse(o);
32
32
  return (i == null ? void 0 : i.v) !== 1 || i.k !== e || !i.s || typeof i.s != "object" || Array.isArray(i.s) ? null : i.s;
33
33
  } catch {
34
34
  return null;
35
35
  }
36
36
  }
37
- function S(t, e, r) {
37
+ function S(t, e, o) {
38
38
  const i = new URL(t);
39
- return i.searchParams.set("lv", h(e, r)), i.toString();
39
+ return i.searchParams.set("lv", A(e, o)), i.toString();
40
40
  }
41
- function I(t) {
41
+ function m(t) {
42
42
  return typeof window > "u" ? null : b(new URLSearchParams(window.location.search).get("lv"), t);
43
43
  }
44
- function v() {
44
+ function N() {
45
45
  if (typeof window > "u") return;
46
46
  const t = new URLSearchParams(window.location.search);
47
47
  if (!t.has("lv")) return;
@@ -53,28 +53,43 @@ function v() {
53
53
  `${window.location.pathname}${e ? `?${e}` : ""}${window.location.hash}`
54
54
  );
55
55
  }
56
- async function N(t, e) {
56
+ function R(t, e) {
57
+ if (typeof window > "u" || !window.history) return;
58
+ const o = new URLSearchParams(window.location.search), i = e ? A(t, e) : null;
59
+ if ((o.get("lv") ?? null) === i) return;
60
+ i ? o.set("lv", i) : o.delete("lv");
61
+ const r = o.toString();
62
+ try {
63
+ window.history.replaceState(
64
+ window.history.state,
65
+ "",
66
+ `${window.location.pathname}${r ? `?${r}` : ""}${window.location.hash}`
67
+ );
68
+ } catch {
69
+ }
70
+ }
71
+ async function v(t, e) {
57
72
  if (typeof window > "u") return "failed";
58
- const r = S(window.location.href, t, e);
59
- if (r.length > 7e3) return "too-long";
73
+ const o = S(window.location.href, t, e);
74
+ if (o.length > 7e3) return "too-long";
60
75
  try {
61
- return await navigator.clipboard.writeText(r), "copied";
76
+ return await navigator.clipboard.writeText(o), "copied";
62
77
  } catch {
63
78
  return "failed";
64
79
  }
65
80
  }
66
- const l = (t) => !!t && typeof t == "object" && !Array.isArray(t), u = (t) => typeof t == "string" ? t : void 0, d = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string") : void 0, k = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string" || typeof e == "number") : [], p = (t, e) => {
67
- const r = Number(t);
68
- return Number.isInteger(r) && r > 0 ? Math.min(r, e) : void 0;
81
+ const l = (t) => !!t && typeof t == "object" && !Array.isArray(t), u = (t) => typeof t == "string" ? t : void 0, d = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string") : void 0, _ = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string" || typeof e == "number") : [], p = (t, e) => {
82
+ const o = Number(t);
83
+ return Number.isInteger(o) && o > 0 ? Math.min(o, e) : void 0;
69
84
  };
70
- function O(t) {
85
+ function w(t) {
71
86
  if (!t) return null;
72
- const e = {}, r = u(t.q);
73
- r && (e.q = r.slice(0, 500)), Array.isArray(t.f) && (e.f = t.f.filter(
87
+ const e = {}, o = u(t.q);
88
+ o && (e.q = o.slice(0, 500)), Array.isArray(t.f) && (e.f = t.f.filter(
74
89
  (n) => l(n) && Array.isArray(n.path) && typeof n.op == "string"
75
- ).slice(0, 50).map((n, o) => ({
90
+ ).slice(0, 50).map((n, s) => ({
76
91
  ...n,
77
- id: typeof n.id == "string" && n.id ? n.id : `lv-${o}`,
92
+ id: typeof n.id == "string" && n.id ? n.id : `lv-${s}`,
78
93
  pathLabels: Array.isArray(n.pathLabels) ? n.pathLabels : n.path,
79
94
  fieldType: typeof n.fieldType == "string" ? n.fieldType : "string",
80
95
  value: n.value ?? ""
@@ -84,64 +99,65 @@ function O(t) {
84
99
  (n) => typeof n == "string" || l(n) && typeof n.key == "string"
85
100
  ).slice(0, 100)), l(t.qf)) {
86
101
  const n = {};
87
- for (const [o, f] of Object.entries(t.qf)) {
88
- const y = k(f);
89
- y.length && (n[o] = y.slice(0, 500));
102
+ for (const [s, f] of Object.entries(t.qf)) {
103
+ const y = _(f);
104
+ y.length && (n[s] = y.slice(0, 500));
90
105
  }
91
106
  e.qf = n;
92
107
  }
93
108
  if (l(t.cf)) {
94
109
  const n = {};
95
- for (const [o, f] of Object.entries(t.cf))
96
- l(f) && typeof f.kind == "string" && (n[o] = f);
110
+ for (const [s, f] of Object.entries(t.cf))
111
+ l(f) && typeof f.kind == "string" && (n[s] = f);
97
112
  e.cf = n;
98
113
  }
99
114
  Array.isArray(t.lc) && (e.lc = t.lc.filter(
100
115
  (n) => l(n) && Array.isArray(n.path) && typeof n.op == "string"
101
116
  ).slice(0, 50)), Array.isArray(t.ex) && (e.ex = t.ex.filter((n) => l(n) && Array.isArray(n.path)).slice(0, 50));
102
- const s = u(t.g);
103
- s && /^[\w.$]+$/.test(s) && (e.g = s);
117
+ const r = u(t.g);
118
+ r && /^[\w.$]+$/.test(r) && (e.g = r);
104
119
  const a = p(t.ps, 200);
105
120
  a && (e.ps = a);
106
121
  const c = p(t.p, 1e5);
107
122
  return c && (e.p = c), t.a === !0 && (e.a = !0), e;
108
123
  }
109
- function R(t) {
124
+ function T(t) {
110
125
  if (!t) return null;
111
126
  const e = {};
112
127
  if ((t.scope === "mine" || t.scope === "unowned" || t.scope === "all" || t.scope === "claimed") && (e.scope = t.scope), l(t.filters)) {
113
128
  const c = {};
114
- for (const [n, o] of Object.entries(t.filters))
115
- if (typeof o == "string") c[n] = o.slice(0, 500);
129
+ for (const [n, s] of Object.entries(t.filters))
130
+ if (typeof s == "string") c[n] = s.slice(0, 500);
116
131
  else {
117
- const f = d(o);
132
+ const f = d(s);
118
133
  f != null && f.length && (c[n] = f.slice(0, 500));
119
134
  }
120
135
  e.filters = c;
121
136
  }
122
- const r = u(t.sort);
123
- r && /^-?[\w.$]+$/.test(r) && (e.sort = r);
137
+ const o = u(t.sort);
138
+ o && /^-?[\w.$]+$/.test(o) && (e.sort = o);
124
139
  const i = u(t.group_by);
125
140
  i && (e.group_by = i), (t.view === "table" || t.view === "kanban" || t.view === "workload") && (e.view = t.view);
126
- const s = d(t.columns);
127
- if (s != null && s.length && (e.columns = s.slice(0, 100)), l(t.pins)) {
141
+ const r = d(t.columns);
142
+ if (r != null && r.length && (e.columns = r.slice(0, 100)), l(t.pins)) {
128
143
  const c = {};
129
- for (const [n, o] of Object.entries(t.pins)) (o === "left" || o === "right") && (c[n] = o);
144
+ for (const [n, s] of Object.entries(t.pins)) (s === "left" || s === "right") && (c[n] = s);
130
145
  Object.keys(c).length && (e.pins = c);
131
146
  }
132
147
  const a = p(t.page, 1e5);
133
148
  return a && (e.page = a), e;
134
149
  }
135
150
  export {
136
- m as LIST_LINK_MAX_CHARS,
137
- _ as LIST_LINK_PARAM,
138
- N as copyListLink,
151
+ k as LIST_LINK_MAX_CHARS,
152
+ I as LIST_LINK_PARAM,
153
+ v as copyListLink,
139
154
  b as decodeListLink,
140
- v as dropListLinkParam,
141
- h as encodeListLink,
155
+ N as dropListLinkParam,
156
+ A as encodeListLink,
142
157
  S as listLinkUrl,
143
- L as pruneListLinkState,
144
- I as readListLinkFromLocation,
145
- O as sanitizeCbvLinkState,
146
- R as sanitizeQueueLinkState
158
+ h as pruneListLinkState,
159
+ m as readListLinkFromLocation,
160
+ R as replaceListLinkParam,
161
+ w as sanitizeCbvLinkState,
162
+ T as sanitizeQueueLinkState
147
163
  };
@@ -26,6 +26,8 @@ const he = [
26
26
  "erp-submissions",
27
27
  "record-integrations",
28
28
  "record-integrity",
29
+ "item-actions",
30
+ "ext-item-actions",
29
31
  "cbv-items",
30
32
  "cbv-pipeline-instances",
31
33
  "cbv-owners",
@@ -77,12 +79,12 @@ const _ = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Set(), z = (t, s) =
77
79
  o > 0 ? _.set(t, o) : _.delete(t);
78
80
  for (const l of j) l();
79
81
  };
80
- function we(t, s, o = {}) {
82
+ function me(t, s, o = {}) {
81
83
  var U, W;
82
84
  const l = o.windowMs ?? 300, a = o.readsGapMs ?? 1e4, M = o.hiddenReconcileMs ?? 5 * 6e4, E = o.lingerMs ?? 3e4, C = o.jitterMs ?? 1500, h = o.isOwn ?? ((e, n) => ae(e, n)), d = o.now ?? (() => Date.now()), R = o.random ?? Math.random, c = o.doc === void 0 ? typeof document > "u" ? null : document : o.doc, p = o.win === void 0 ? typeof window > "u" ? null : window : o.win, L = t.getQueryCache(), S = { events: 0, refetches: 0, reconciles: 0, deferred: 0 };
83
- let w = !1;
84
- const v = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), ee = 500, ne = (e) => {
85
- if (w || !(e != null && e.collection)) return;
85
+ let m = !1;
86
+ const v = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), ee = 500, ne = (e) => {
87
+ if (m || !(e != null && e.collection)) return;
86
88
  const n = String(e.collection);
87
89
  if (!v.has(n)) return;
88
90
  S.events++;
@@ -99,28 +101,28 @@ function we(t, s, o = {}) {
99
101
  setTimeout(() => ie(n), l)
100
102
  );
101
103
  }, B = () => {
102
- if (w) return;
104
+ if (m) return;
103
105
  const e = /* @__PURE__ */ new Set();
104
106
  for (const n of L.getAll())
105
107
  if (n.getObserversCount() !== 0)
106
108
  for (const i of ge(I(n))) e.add(i);
107
109
  for (const n of e) {
108
- const i = m.get(n);
109
- i && (clearTimeout(i), m.delete(n)), v.has(n) || v.set(n, s.subscribeCollections([n], ne));
110
+ const i = w.get(n);
111
+ i && (clearTimeout(i), w.delete(n)), v.has(n) || v.set(n, s.subscribeCollections([n], ne));
110
112
  }
111
113
  for (const n of v.keys())
112
- e.has(n) || m.has(n) || m.set(
114
+ e.has(n) || w.has(n) || w.set(
113
115
  n,
114
116
  setTimeout(() => {
115
117
  var i;
116
- m.delete(n), (i = v.get(n)) == null || i(), v.delete(n);
118
+ w.delete(n), (i = v.get(n)) == null || i(), v.delete(n);
117
119
  }, E)
118
120
  );
119
121
  };
120
- let G = !1;
122
+ let x = !1;
121
123
  const te = () => {
122
- G || (G = !0, queueMicrotask(() => {
123
- G = !1, B();
124
+ x || (x = !0, queueMicrotask(() => {
125
+ x = !1, B();
124
126
  }));
125
127
  }, se = L.subscribe((e) => {
126
128
  (e.type === "added" || e.type === "removed" || e.type === "observerAdded" || e.type === "observerRemoved" || e.type === "observerOptionsUpdated") && te();
@@ -132,7 +134,7 @@ function we(t, s, o = {}) {
132
134
  { predicate: (f) => i.has(f) },
133
135
  { cancelRefetch: n }
134
136
  );
135
- }, q = (e, n = !0) => {
137
+ }, G = (e, n = !0) => {
136
138
  const i = [], r = [];
137
139
  for (const u of e)
138
140
  u.getObserversCount() === 0 ? r.push(u) : c != null && c.hidden ? (r.push(u), k.add(u)) : i.push(u);
@@ -150,7 +152,7 @@ function we(t, s, o = {}) {
150
152
  u,
151
153
  setTimeout(
152
154
  () => {
153
- y.delete(u), w || q([u]);
155
+ y.delete(u), m || G([u]);
154
156
  },
155
157
  Y + N - f
156
158
  )
@@ -160,15 +162,15 @@ function we(t, s, o = {}) {
160
162
  }, ie = (e) => {
161
163
  Q.delete(e);
162
164
  const n = T.get(e) ?? [];
163
- if (T.delete(e), w || n.length === 0) return;
165
+ if (T.delete(e), m || n.length === 0) return;
164
166
  const i = [];
165
167
  for (const r of L.getAll()) {
166
168
  const f = I(r);
167
169
  f && pe(f, e, n) && i.push(r);
168
170
  }
169
- q(i);
170
- }, re = new Set(he), x = (e) => {
171
- if (w) return;
171
+ G(i);
172
+ }, re = new Set(he), q = (e) => {
173
+ if (m) return;
172
174
  S.reconciles++;
173
175
  const n = [];
174
176
  for (const r of L.getAll())
@@ -186,7 +188,7 @@ function we(t, s, o = {}) {
186
188
  const V = (e) => {
187
189
  O || (O = setTimeout(
188
190
  () => {
189
- O = null, x();
191
+ O = null, q();
190
192
  },
191
193
  Math.floor(R() * C)
192
194
  ));
@@ -206,20 +208,20 @@ function we(t, s, o = {}) {
206
208
  }
207
209
  const e = A == null ? 0 : d() - A;
208
210
  if (A = null, e >= M) {
209
- x();
211
+ q();
210
212
  return;
211
213
  }
212
214
  const n = [...k].filter((i) => i.getObserversCount() > 0);
213
- k.clear(), q(n, !1);
215
+ k.clear(), G(n, !1);
214
216
  };
215
217
  return c == null || c.addEventListener("visibilitychange", P), z(t, 1), B(), {
216
- reconcile: x,
218
+ reconcile: q,
217
219
  collections: () => [...v.keys()],
218
220
  stats: () => ({ ...S }),
219
221
  dispose() {
220
- if (!w) {
221
- w = !0, se(), D == null || D(), b == null || b.removeEventListener("nvr:catchup-full", K), c == null || c.removeEventListener("visibilitychange", P);
222
- for (const e of [...Q.values(), ...m.values(), ...y.values()])
222
+ if (!m) {
223
+ m = !0, se(), D == null || D(), b == null || b.removeEventListener("nvr:catchup-full", K), c == null || c.removeEventListener("visibilitychange", P);
224
+ for (const e of [...Q.values(), ...w.values(), ...y.values()])
223
225
  clearTimeout(e);
224
226
  O && clearTimeout(O);
225
227
  for (const e of v.values()) e();
@@ -232,11 +234,11 @@ function Le(t) {
232
234
  const s = J(), o = Z(), l = le(t);
233
235
  ue(() => {
234
236
  if (!o) return;
235
- const a = we(s, o, l.current);
237
+ const a = me(s, o, l.current);
236
238
  return () => a.dispose();
237
239
  }, [s, o]);
238
240
  }
239
- function me() {
241
+ function we() {
240
242
  const t = J();
241
243
  return ce(
242
244
  (s) => (j.add(s), () => {
@@ -247,7 +249,7 @@ function me() {
247
249
  );
248
250
  }
249
251
  function Te(t, s = {}) {
250
- const o = Z(), l = ve(), a = me(), M = s.enabled !== !1 && !!o && (l == null ? void 0 : l.state) !== "reconnecting" && (!s.requireBridge || a);
252
+ const o = Z(), l = ve(), a = we(), M = s.enabled !== !1 && !!o && (l == null ? void 0 : l.state) !== "reconnecting" && (!s.requireBridge || a);
251
253
  return ye(M, t, s.safetyMs);
252
254
  }
253
255
  function ye(t, s, o = de) {
@@ -255,12 +257,12 @@ function ye(t, s, o = de) {
255
257
  }
256
258
  export {
257
259
  he as LIVE_RECONCILE_HEADS,
258
- we as createLiveQueryBridge,
260
+ me as createLiveQueryBridge,
259
261
  ge as liveCollectionsOf,
260
262
  pe as liveEventsMatch,
261
263
  Re as liveQueryMeta,
262
264
  ye as liveRefetchInterval,
263
- me as useLiveQueriesOn,
265
+ we as useLiveQueriesOn,
264
266
  Le as useLiveQueryBridge,
265
267
  Te as useLiveRefetchInterval
266
268
  };
@@ -0,0 +1,25 @@
1
+ const a = /* @__PURE__ */ new Map();
2
+ function i(e, t) {
3
+ return `nvr-record-moved:${e}:${String(t)}`;
4
+ }
5
+ function r(e, t, o = Date.now()) {
6
+ a.set(i(e, t), o);
7
+ }
8
+ function s(e, t, o = Date.now()) {
9
+ const n = a.get(i(e, t));
10
+ return n != null && o - n < 15e3;
11
+ }
12
+ function c(e) {
13
+ const t = typeof e.by_name == "string" && e.by_name.trim() ? e.by_name.trim() : "Someone", o = typeof e.state_label == "string" && e.state_label.trim() ? ` to ${e.state_label.trim()}` : "";
14
+ return e.still_editable === !1 ? `${t} moved this record${o} while you were editing. What you haven’t saved can no longer be saved here — it stays on this page so you can copy it.` : `${t} moved this record${o} while you were editing. You can still save your changes.`;
15
+ }
16
+ function d(e) {
17
+ return `${e.trim().replace(/[.\s]+$/, "")}. What you haven’t saved can no longer be saved here — it stays on this page so you can copy it.`;
18
+ }
19
+ export {
20
+ d as lockedAfterMoveText,
21
+ i as movedNoticeId,
22
+ c as movedNoticeText,
23
+ s as namedMovedNoticeRecent,
24
+ r as noteNamedMovedNotice
25
+ };