@nivaro/react 0.3.61 → 0.3.63
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 +66 -0
- package/dist/index.js +239 -235
- package/dist/shared/components/CollectionBrowserView.js +424 -420
- package/dist/shared/components/ItemEditForm.js +3576 -3561
- package/dist/shared/components/QualityRulesView.js +212 -138
- package/dist/shared/components/alerts/AlertManagerView.js +341 -335
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +102 -98
- package/dist/shared/components/help-videos/library/PurgeVideoDialog.js +8 -8
- package/dist/shared/components/import/reimportDiff.js +67 -46
- package/dist/shared/components/imports/CollectionImportPanel.js +273 -247
- package/dist/shared/components/item-edit/QueueReturnChip.js +17 -13
- package/dist/shared/components/item-edit/staged-links.js +21 -21
- package/dist/shared/components/pipeline/PipelineEditorView.js +636 -632
- package/dist/shared/components/pipeline/PipelineStateOwners.js +88 -87
- package/dist/shared/components/queue/QueueWorklist.js +224 -222
- package/dist/shared/lib/batch-gets.js +68 -0
- package/dist/shared/lib/list-page-memory.js +40 -32
- package/dist/shared/lib/request-gate.js +284 -230
- package/package.json +1 -1
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as u, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowLeft as a } from "lucide-react";
|
|
3
3
|
import { useNavigation as s } from "../../context.js";
|
|
4
|
-
const r = "nvr:queue-return",
|
|
5
|
-
function
|
|
4
|
+
const r = "nvr:queue-return", c = 360 * 60 * 1e3;
|
|
5
|
+
function l() {
|
|
6
6
|
try {
|
|
7
7
|
const t = sessionStorage.getItem(r);
|
|
8
8
|
if (!t) return null;
|
|
9
9
|
const e = JSON.parse(t);
|
|
10
|
-
return !e || typeof e != "object" || !e.path || Date.now() - Number(e.at ?? 0) >
|
|
10
|
+
return !e || typeof e != "object" || !e.path || Date.now() - Number(e.at ?? 0) > c ? null : e;
|
|
11
11
|
} catch {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function f(t) {
|
|
16
16
|
try {
|
|
17
17
|
t ? sessionStorage.setItem(r, JSON.stringify(t)) : sessionStorage.removeItem(r);
|
|
18
18
|
} catch {
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
function v(t, e, n, o) {
|
|
22
|
+
return t.queue_id !== e ? !1 : t.restore || t.entry && n && t.entry === n ? !0 : o;
|
|
23
|
+
}
|
|
24
|
+
function x() {
|
|
25
|
+
const t = s(), e = l();
|
|
26
|
+
return e ? /* @__PURE__ */ u("div", { className: "flex items-center", "data-queue-return": e.queue_id, children: /* @__PURE__ */ i(
|
|
24
27
|
"button",
|
|
25
28
|
{
|
|
26
29
|
type: "button",
|
|
27
30
|
onClick: () => {
|
|
28
|
-
|
|
31
|
+
f({ ...e, restore: !0 }), t.navigate(e.path);
|
|
29
32
|
},
|
|
30
33
|
className: "inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[11.5px] font-medium text-slate-600 transition-colors hover:border-nvr-cyan/50 hover:text-nvr-navy dark:border-border dark:bg-card dark:text-slate-300 dark:hover:text-nvr-cyan",
|
|
31
34
|
"data-tip": "Return to the queue with its filters and scroll position",
|
|
32
35
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ u(a, { className: "h-3.5 w-3.5" }),
|
|
34
37
|
"Back to ",
|
|
35
38
|
e.name
|
|
36
39
|
]
|
|
@@ -39,7 +42,8 @@ function f() {
|
|
|
39
42
|
}
|
|
40
43
|
export {
|
|
41
44
|
r as QUEUE_RETURN_KEY,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
x as QueueReturnChip,
|
|
46
|
+
v as queueReturnApplies,
|
|
47
|
+
l as readQueueReturn,
|
|
48
|
+
f as writeQueueReturn
|
|
45
49
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m2aWriteMeta as
|
|
1
|
+
import { m2aWriteMeta as x } from "./M2MCombobox.js";
|
|
2
2
|
function F(n, l, s) {
|
|
3
3
|
var r;
|
|
4
4
|
let e = l.find((o) => o.one_collection === n && o.one_field === s);
|
|
@@ -13,14 +13,14 @@ function F(n, l, s) {
|
|
|
13
13
|
if (!c) return null;
|
|
14
14
|
const d = l.find(
|
|
15
15
|
(o) => o.many_collection === e.many_collection && o.many_field === c && o.id !== e.id
|
|
16
|
-
), _ =
|
|
16
|
+
), _ = x(d);
|
|
17
17
|
return { field: e.one_field, junctionField: c, m2aCollection: (_ == null ? void 0 : _.value) ?? null };
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function L(n) {
|
|
20
20
|
return n == null || n === "" ? [] : Array.isArray(n) ? n : typeof n == "object" ? [] : [n];
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
function
|
|
22
|
+
const C = (n) => n && typeof n == "object" ? `${String(n.collection ?? "").toLowerCase()}:${String(n.id ?? "").toLowerCase()}` : `:${String(n).toLowerCase()}`;
|
|
23
|
+
function A(n) {
|
|
24
24
|
var i;
|
|
25
25
|
const { collection: l, relations: s, links: e, unlinks: c, payload: d, isNew: _ } = n, r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set([...e.keys(), ...c.keys()]);
|
|
26
26
|
for (const f of o) {
|
|
@@ -32,38 +32,38 @@ function E(n) {
|
|
|
32
32
|
if (_) {
|
|
33
33
|
if (y.size > 0) continue;
|
|
34
34
|
const t = [], m = /* @__PURE__ */ new Set();
|
|
35
|
-
for (const a of [...
|
|
36
|
-
const S =
|
|
35
|
+
for (const a of [...L(d[u.field]), ...g.map(p)]) {
|
|
36
|
+
const S = C(a);
|
|
37
37
|
m.has(S) || (m.add(S), t.push(a));
|
|
38
38
|
}
|
|
39
39
|
d[u.field] = t, r.add(f);
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
let
|
|
42
|
+
const w = (i = n.committed) == null ? void 0 : i.call(n, f);
|
|
43
|
+
let h = [];
|
|
44
44
|
if (y.size > 0) {
|
|
45
|
-
if (!
|
|
46
|
-
const t = new Map(
|
|
45
|
+
if (!w) continue;
|
|
46
|
+
const t = new Map(w.map((a) => [String(a.id), a])), m = [...y].map((a) => {
|
|
47
47
|
var S;
|
|
48
48
|
return (S = t.get(String(a))) == null ? void 0 : S[u.junctionField];
|
|
49
49
|
});
|
|
50
50
|
if (m.some((a) => a == null)) continue;
|
|
51
|
-
|
|
51
|
+
h = m.map(p);
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
for (const t of [...
|
|
55
|
-
const m =
|
|
53
|
+
const b = (w ?? []).filter((t) => !y.has(t.id) && !y.has(String(t.id))).map((t) => t[u.junctionField]).filter((t) => t != null), k = [], j = /* @__PURE__ */ new Set();
|
|
54
|
+
for (const t of [...b.map(p), ...g.map(p)]) {
|
|
55
|
+
const m = C(t);
|
|
56
56
|
j.has(m) || (j.add(m), k.push(t));
|
|
57
57
|
}
|
|
58
58
|
d[u.field] = {
|
|
59
59
|
...k.length ? { create: k } : {},
|
|
60
|
-
...
|
|
60
|
+
...h.length ? { delete: h } : {}
|
|
61
61
|
}, r.add(f);
|
|
62
62
|
}
|
|
63
63
|
return r;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const O = 500;
|
|
66
|
+
function E(n) {
|
|
67
67
|
var s;
|
|
68
68
|
const l = /* @__PURE__ */ new Set();
|
|
69
69
|
for (const [e, c] of n.rows) {
|
|
@@ -73,7 +73,7 @@ function W(n) {
|
|
|
73
73
|
const _ = e.slice(0, d), r = e.slice(d + 1), o = n.relations.find(
|
|
74
74
|
(i) => i.one_collection === n.collection && i.many_collection === _ && i.many_field === r && !!i.one_field && i.junction_field == null
|
|
75
75
|
);
|
|
76
|
-
o != null && o.one_field && (c.length >
|
|
76
|
+
o != null && o.one_field && (c.length > O || c.some((i) => Object.keys(i).some((f) => f.startsWith("__o2m_"))) || (n.payload[o.one_field] = c.map((i) => {
|
|
77
77
|
const { id: f, ...g } = i;
|
|
78
78
|
return g;
|
|
79
79
|
}), l.add(e)));
|
|
@@ -81,6 +81,6 @@ function W(n) {
|
|
|
81
81
|
return l;
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
A as foldStagedLinks,
|
|
85
|
+
E as foldStagedRows
|
|
86
86
|
};
|