@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.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +62 -8
- package/dist/shared/components/CollectionBrowserView.js +3127 -3204
- package/dist/shared/components/ConformanceView.js +235 -221
- package/dist/shared/components/DataTable.js +478 -459
- package/dist/shared/components/ItemEditForm.js +4842 -4500
- package/dist/shared/components/MyWorkView.js +124 -113
- package/dist/shared/components/PageRenderer.js +146 -138
- package/dist/shared/components/ProfileView.js +483 -472
- package/dist/shared/components/RecordDrilldownSheet.js +73 -65
- package/dist/shared/components/ReportView.js +1100 -1094
- package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
- package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
- package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
- package/dist/shared/components/bulk/bulk-field-options.js +29 -23
- package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
- package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
- package/dist/shared/components/integrations/SendCurrentData.js +126 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +1535 -1440
- package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
- package/dist/shared/components/item-edit/FieldRow.js +413 -403
- package/dist/shared/components/item-edit/GroupSection.js +555 -538
- package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
- package/dist/shared/components/item-edit/M2MCombobox.js +407 -338
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +367 -116
- package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
- package/dist/shared/components/item-edit/PlanGrid.js +783 -724
- package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
- package/dist/shared/components/item-edit/RecordInsights.js +113 -111
- package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
- package/dist/shared/components/item-edit/RelationCombobox.js +398 -364
- package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
- package/dist/shared/components/item-edit/UserChip.js +264 -229
- package/dist/shared/components/item-edit/cascade-clear-notice.js +56 -0
- package/dist/shared/components/item-edit/collision-format.js +37 -0
- package/dist/shared/components/item-edit/field-a11y.js +25 -0
- package/dist/shared/components/item-edit/header-path-preview.js +52 -0
- package/dist/shared/components/item-edit/line-merge.js +84 -0
- package/dist/shared/components/item-edit/line-midair.js +94 -87
- package/dist/shared/components/item-edit/move-guard.js +17 -0
- package/dist/shared/components/item-edit/picker-search.js +27 -16
- package/dist/shared/components/item-edit/rail-width.js +8 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +126 -124
- package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
- package/dist/shared/components/panels/CommentPanel.js +142 -136
- package/dist/shared/components/panels/ItemLockBanner.js +246 -240
- package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
- package/dist/shared/components/panels/RevisionsPanel.js +106 -102
- package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
- package/dist/shared/components/panels/SlaClock.js +90 -68
- package/dist/shared/components/queue/QueueItemSheet.js +94 -87
- package/dist/shared/components/queue/QueueWorklist.js +1522 -1347
- package/dist/shared/components/queue/worklist-csv.js +75 -0
- package/dist/shared/components/queue/worklist-helpers.js +20 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
- package/dist/shared/lib/bulk-copy.js +17 -0
- package/dist/shared/lib/cbv-export.js +122 -0
- package/dist/shared/lib/delete-offer.js +13 -0
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/leave-guard.js +41 -26
- package/dist/shared/lib/list-link.js +72 -56
- package/dist/shared/lib/live-queries.js +32 -30
- package/dist/shared/lib/moved-notice.js +25 -0
- package/dist/shared/lib/notification-target.js +56 -54
- package/dist/shared/lib/obligation-banner.js +11 -8
- package/dist/shared/lib/obligation-reason-text.js +6 -6
- package/dist/shared/lib/quick-filter-cascade.js +29 -19
- package/dist/shared/lib/sort-cycle.js +6 -0
- package/dist/shared/lib/summary-mode.js +59 -41
- 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
|
|
2
|
-
function
|
|
3
|
-
if (
|
|
4
|
-
let
|
|
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
|
-
|
|
6
|
+
a = new URL(n.href, `${t.origin}${t.pathname}${t.search}`);
|
|
7
7
|
} catch {
|
|
8
8
|
return !1;
|
|
9
9
|
}
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
return !(
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
36
|
+
w(f, h, u.current);
|
|
27
37
|
} finally {
|
|
28
|
-
|
|
38
|
+
o = !1;
|
|
29
39
|
}
|
|
30
|
-
}, f)
|
|
40
|
+
}, f);
|
|
31
41
|
};
|
|
32
|
-
return document.addEventListener("click",
|
|
33
|
-
}, [
|
|
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
|
-
|
|
37
|
-
|
|
49
|
+
b as isLeavingControl,
|
|
50
|
+
K as isLeavingLink,
|
|
51
|
+
w as replayLeave,
|
|
52
|
+
R as useLeaveLinkGuard
|
|
38
53
|
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
const I = "lv";
|
|
2
|
+
const k = 7e3;
|
|
3
|
+
function L(t) {
|
|
4
4
|
const e = new TextEncoder().encode(t);
|
|
5
|
-
let
|
|
6
|
-
for (const i of e)
|
|
7
|
-
return btoa(
|
|
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, "/"),
|
|
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
|
|
17
|
+
function h(t) {
|
|
18
18
|
const e = {};
|
|
19
|
-
for (const [
|
|
20
|
-
i == null || i === "" || Array.isArray(i) && i.length === 0 || typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (e[
|
|
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
|
|
24
|
-
return
|
|
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
|
|
29
|
-
if (!
|
|
28
|
+
const o = g(t);
|
|
29
|
+
if (!o) return null;
|
|
30
30
|
try {
|
|
31
|
-
const i = JSON.parse(
|
|
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,
|
|
37
|
+
function S(t, e, o) {
|
|
38
38
|
const i = new URL(t);
|
|
39
|
-
return i.searchParams.set("lv",
|
|
39
|
+
return i.searchParams.set("lv", A(e, o)), i.toString();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function m(t) {
|
|
42
42
|
return typeof window > "u" ? null : b(new URLSearchParams(window.location.search).get("lv"), t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
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
|
-
|
|
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
|
|
59
|
-
if (
|
|
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(
|
|
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,
|
|
67
|
-
const
|
|
68
|
-
return Number.isInteger(
|
|
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
|
|
85
|
+
function w(t) {
|
|
71
86
|
if (!t) return null;
|
|
72
|
-
const e = {},
|
|
73
|
-
|
|
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,
|
|
90
|
+
).slice(0, 50).map((n, s) => ({
|
|
76
91
|
...n,
|
|
77
|
-
id: typeof n.id == "string" && n.id ? n.id : `lv-${
|
|
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 [
|
|
88
|
-
const y =
|
|
89
|
-
y.length && (n[
|
|
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 [
|
|
96
|
-
l(f) && typeof f.kind == "string" && (n[
|
|
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
|
|
103
|
-
|
|
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
|
|
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,
|
|
115
|
-
if (typeof
|
|
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(
|
|
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
|
|
123
|
-
|
|
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
|
|
127
|
-
if (
|
|
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,
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
|
|
151
|
+
k as LIST_LINK_MAX_CHARS,
|
|
152
|
+
I as LIST_LINK_PARAM,
|
|
153
|
+
v as copyListLink,
|
|
139
154
|
b as decodeListLink,
|
|
140
|
-
|
|
141
|
-
|
|
155
|
+
N as dropListLinkParam,
|
|
156
|
+
A as encodeListLink,
|
|
142
157
|
S as listLinkUrl,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
|
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
|
|
84
|
-
const v = /* @__PURE__ */ new Map(),
|
|
85
|
-
if (
|
|
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 (
|
|
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 =
|
|
109
|
-
i && (clearTimeout(i),
|
|
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) ||
|
|
114
|
+
e.has(n) || w.has(n) || w.set(
|
|
113
115
|
n,
|
|
114
116
|
setTimeout(() => {
|
|
115
117
|
var i;
|
|
116
|
-
|
|
118
|
+
w.delete(n), (i = v.get(n)) == null || i(), v.delete(n);
|
|
117
119
|
}, E)
|
|
118
120
|
);
|
|
119
121
|
};
|
|
120
|
-
let
|
|
122
|
+
let x = !1;
|
|
121
123
|
const te = () => {
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
},
|
|
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),
|
|
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),
|
|
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
|
-
|
|
170
|
-
}, re = new Set(he),
|
|
171
|
-
if (
|
|
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,
|
|
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
|
-
|
|
211
|
+
q();
|
|
210
212
|
return;
|
|
211
213
|
}
|
|
212
214
|
const n = [...k].filter((i) => i.getObserversCount() > 0);
|
|
213
|
-
k.clear(),
|
|
215
|
+
k.clear(), G(n, !1);
|
|
214
216
|
};
|
|
215
217
|
return c == null || c.addEventListener("visibilitychange", P), z(t, 1), B(), {
|
|
216
|
-
reconcile:
|
|
218
|
+
reconcile: q,
|
|
217
219
|
collections: () => [...v.keys()],
|
|
218
220
|
stats: () => ({ ...S }),
|
|
219
221
|
dispose() {
|
|
220
|
-
if (!
|
|
221
|
-
|
|
222
|
-
for (const e of [...Q.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 =
|
|
237
|
+
const a = me(s, o, l.current);
|
|
236
238
|
return () => a.dispose();
|
|
237
239
|
}, [s, o]);
|
|
238
240
|
}
|
|
239
|
-
function
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
};
|