@nivaro/react 0.3.98 → 0.3.100
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/useFormSchema.js +82 -85
- package/dist/hooks/useSessionRecorder.js +206 -175
- package/dist/index.d.ts +38 -13
- package/dist/index.js +182 -180
- package/dist/lib/commands.js +15 -11
- package/dist/shared/components/CollectionBrowserView.js +516 -503
- package/dist/shared/components/ItemEditForm.js +3021 -3019
- package/dist/shared/components/JobsTray.js +20 -16
- package/dist/shared/components/MyWorkView.js +133 -126
- package/dist/shared/components/NotificationBell.js +314 -288
- package/dist/shared/components/RecordCompare.js +38 -40
- package/dist/shared/components/RecordReadView.js +119 -119
- package/dist/shared/components/cbv/FoundElsewhere.js +61 -0
- package/dist/shared/components/item-edit/InlineGridField.js +45 -45
- package/dist/shared/components/item-edit/InlineTableField.js +750 -749
- package/dist/shared/components/item-edit/QuickPickerDialog.js +44 -44
- package/dist/shared/components/item-edit/RawEditSheet.js +122 -114
- package/dist/shared/components/item-edit/RelationCombobox.js +454 -378
- package/dist/shared/components/item-edit/SummaryPanel.js +56 -48
- package/dist/shared/components/item-edit/related-missing.js +75 -19
- package/dist/shared/components/notifications/NotificationCenterView.js +249 -226
- package/dist/shared/components/panels/AccessDeniedPanel.js +31 -28
- package/dist/shared/components/panels/BackgroundMove.js +175 -0
- package/dist/shared/components/panels/MoveAdvisory.js +204 -0
- package/dist/shared/components/panels/PipelinePanel.js +1450 -1219
- package/dist/shared/components/panels/RecordIntegrityBanner.js +113 -112
- package/dist/shared/lib/commands.js +18 -14
- package/dist/shared/lib/error-hints.js +1 -1
- package/dist/shared/lib/job-failure-text.js +12 -0
- package/dist/shared/lib/move-failure.js +9 -0
- package/dist/shared/lib/obligation-banner.js +15 -14
- package/dist/shared/lib/partner-failure.js +71 -0
- package/dist/shared/lib/prefetch.js +73 -73
- package/dist/shared/lib/replay-checkout.js +18 -13
- package/dist/shared/lib/replay-context.js +90 -77
- package/dist/shared/lib/replay-idle.js +21 -0
- package/dist/shared/lib/replay-socket.js +21 -17
- package/dist/shared/lib/rum.js +56 -51
- package/dist/shared/lib/safe-error.js +17 -13
- package/dist/shared/lib/stale-chunk.js +69 -26
- package/dist/shared/lib/system-collections.js +20 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
import { unsavedWorkLabels as S } from "./unsaved-work.js";
|
|
2
|
+
const c = "nvr-stale-chunk-reload", m = 6e4, w = [
|
|
3
3
|
/Failed to fetch dynamically imported module/i,
|
|
4
4
|
// Chromium
|
|
5
5
|
/Importing a module script failed/i,
|
|
@@ -9,44 +9,85 @@ const d = [
|
|
|
9
9
|
/Unable to preload CSS/i
|
|
10
10
|
// Vite's CSS preload
|
|
11
11
|
];
|
|
12
|
-
function
|
|
12
|
+
function v(e) {
|
|
13
13
|
const n = e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "";
|
|
14
|
-
return
|
|
14
|
+
return w.some((t) => t.test(n));
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
let r = 0;
|
|
16
|
+
function y(e = {}) {
|
|
17
|
+
var l, i;
|
|
18
|
+
let n = [];
|
|
20
19
|
try {
|
|
21
|
-
|
|
20
|
+
n = (e.unsaved ?? S)();
|
|
22
21
|
} catch {
|
|
23
|
-
|
|
22
|
+
n = [];
|
|
24
23
|
}
|
|
25
|
-
if (
|
|
26
|
-
return (
|
|
24
|
+
if (n.length > 0)
|
|
25
|
+
return e.onHeld ? e.onHeld(n) : (l = e.onGiveUp) == null || l.call(e), "held";
|
|
26
|
+
const t = (e.now ?? Date.now)(), r = e.storage === void 0 ? h() : e.storage;
|
|
27
|
+
let o = 0;
|
|
27
28
|
try {
|
|
28
|
-
|
|
29
|
+
o = Number(r == null ? void 0 : r.getItem(c)) || 0;
|
|
30
|
+
} catch {
|
|
31
|
+
o = 0;
|
|
32
|
+
}
|
|
33
|
+
if (o && t - o < m)
|
|
34
|
+
return (i = e.onGiveUp) == null || i.call(e), "gave-up";
|
|
35
|
+
try {
|
|
36
|
+
r == null || r.setItem(c, String(t));
|
|
29
37
|
} catch {
|
|
30
38
|
}
|
|
31
39
|
return (e.reload ?? (() => window.location.reload()))(), "reload";
|
|
32
40
|
}
|
|
33
|
-
function
|
|
41
|
+
function C(e = {}) {
|
|
42
|
+
const n = e.storage === void 0 ? h() : e.storage;
|
|
43
|
+
try {
|
|
44
|
+
const t = Number(n == null ? void 0 : n.getItem(c)) || 0;
|
|
45
|
+
return t > 0 && (e.now ?? Date.now)() - t < m;
|
|
46
|
+
} catch {
|
|
47
|
+
return !1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const E = 2e3, g = 1e4;
|
|
51
|
+
function d(e) {
|
|
52
|
+
let n = null;
|
|
53
|
+
return () => {
|
|
54
|
+
const t = (e.now ?? Date.now)(), r = (n == null ? void 0 : n.outcome) === "reload" ? g : E;
|
|
55
|
+
if (n && t - n.at < r) return n.outcome;
|
|
56
|
+
const o = y(e);
|
|
57
|
+
return n = { outcome: o, at: t }, o;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
let u = null, f = null;
|
|
61
|
+
function R(e = {}) {
|
|
34
62
|
const n = e.target ?? (typeof window < "u" ? window : void 0);
|
|
35
63
|
if (!n) return () => {
|
|
36
64
|
};
|
|
37
|
-
|
|
65
|
+
const t = d(e);
|
|
66
|
+
u = t;
|
|
38
67
|
const r = () => {
|
|
39
|
-
t
|
|
40
|
-
}, o = (
|
|
41
|
-
|
|
42
|
-
}, a = (i) => {
|
|
43
|
-
c(i.reason) && (i.preventDefault(), r());
|
|
68
|
+
t();
|
|
69
|
+
}, o = (l) => {
|
|
70
|
+
v(l.reason) && (l.preventDefault(), t());
|
|
44
71
|
};
|
|
45
|
-
return n.addEventListener("vite:preloadError",
|
|
46
|
-
n.removeEventListener("vite:preloadError",
|
|
72
|
+
return n.addEventListener("vite:preloadError", r), n.addEventListener("unhandledrejection", o), () => {
|
|
73
|
+
n.removeEventListener("vite:preloadError", r), n.removeEventListener("unhandledrejection", o), u === t && (u = null);
|
|
47
74
|
};
|
|
48
75
|
}
|
|
49
|
-
function
|
|
76
|
+
function D(e, n, t) {
|
|
77
|
+
const r = t ? d(t) : null, o = () => (f ?? (f = d({})), (r ?? u ?? f)() !== "reload" ? Promise.resolve({ default: n }) : new Promise((i) => {
|
|
78
|
+
var s;
|
|
79
|
+
const a = setTimeout(() => i({ default: n }), g);
|
|
80
|
+
(s = a.unref) == null || s.call(a);
|
|
81
|
+
}));
|
|
82
|
+
return () => e().then(
|
|
83
|
+
(l) => l && l.default !== void 0 ? l : o(),
|
|
84
|
+
(l) => {
|
|
85
|
+
if (!v(l)) throw l;
|
|
86
|
+
return o();
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function h() {
|
|
50
91
|
try {
|
|
51
92
|
return typeof sessionStorage < "u" ? sessionStorage : null;
|
|
52
93
|
} catch {
|
|
@@ -54,7 +95,9 @@ function s() {
|
|
|
54
95
|
}
|
|
55
96
|
}
|
|
56
97
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
98
|
+
D as guardLazyImport,
|
|
99
|
+
R as installStaleChunkRecovery,
|
|
100
|
+
v as isStaleChunkError,
|
|
101
|
+
y as recoverFromStaleChunk,
|
|
102
|
+
C as staleChunkReloadJustTried
|
|
60
103
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const r = /^(nivaro_|directus_)/i;
|
|
2
|
+
function t(e) {
|
|
3
|
+
return !!e && r.test(e);
|
|
4
|
+
}
|
|
5
|
+
function i(e) {
|
|
6
|
+
return !t(e);
|
|
7
|
+
}
|
|
8
|
+
function o(e) {
|
|
9
|
+
return !t(e) || String(e).toLowerCase() === "nivaro_addendums";
|
|
10
|
+
}
|
|
11
|
+
function s(e) {
|
|
12
|
+
const n = String(e ?? "").toLowerCase();
|
|
13
|
+
return n === "nivaro_files" || n === "directus_files";
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
i as hasRecordExtras,
|
|
17
|
+
s as isFileCollection,
|
|
18
|
+
t as isSystemCollection,
|
|
19
|
+
o as mayHavePipeline
|
|
20
|
+
};
|