@nivaro/react 0.3.52 → 0.3.54
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 +47 -3
- package/dist/shared/components/ItemEditForm.js +4196 -4163
- package/dist/shared/components/NotificationBell.js +163 -150
- package/dist/shared/components/PageRenderer.js +645 -593
- package/dist/shared/components/ProfileView.js +36 -34
- package/dist/shared/components/QueryStatStrip.js +96 -89
- package/dist/shared/components/QueryTable.js +214 -215
- package/dist/shared/components/ReportView.js +548 -529
- package/dist/shared/components/alerts/AlertManagerView.js +346 -320
- package/dist/shared/components/item-edit/CatalogPickerField.js +1300 -1219
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +52 -54
- package/dist/shared/components/item-edit/FieldAffordances.js +145 -136
- package/dist/shared/components/item-edit/FieldRenderer.js +366 -326
- package/dist/shared/components/item-edit/InlineTableField.js +3047 -2932
- package/dist/shared/components/item-edit/NestedRelationEditor.js +149 -143
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +12 -11
- package/dist/shared/components/item-edit/PlanGrid.js +718 -705
- package/dist/shared/components/item-edit/RelationCombobox.js +23 -20
- package/dist/shared/components/item-edit/SummaryPanel.js +415 -361
- package/dist/shared/components/item-edit/line-qty.js +115 -53
- package/dist/shared/components/item-edit/save-outcome.js +48 -0
- package/dist/shared/components/item-edit/save-refusal.js +18 -18
- package/dist/shared/components/item-edit/stale-banner.js +13 -0
- package/dist/shared/components/item-edit/usePersonalDefaults.js +225 -220
- package/dist/shared/components/panels/CommentPanel.js +204 -197
- package/dist/shared/components/panels/ItemLockBanner.js +318 -291
- package/dist/shared/components/panels/PipelinePanel.js +1388 -1218
- package/dist/shared/components/panels/RecordIntegrityBanner.js +201 -172
- package/dist/shared/components/panels/RevisionsPanel.js +101 -106
- package/dist/shared/components/panels/TransitionRequirementsDialog.js +564 -534
- package/dist/shared/components/panels/requirement-side-effects.js +46 -29
- package/dist/shared/components/queue/QueueItemSheet.js +219 -146
- package/dist/shared/components/queue/QueueWorklist.js +738 -730
- package/dist/shared/components/widgets/ReviewListWidget.js +236 -201
- package/dist/shared/lib/activity-sentence.js +236 -227
- package/dist/shared/lib/draft-store.js +35 -29
- package/dist/shared/lib/page-widget-access.js +11 -0
- package/dist/shared/lib/record-ref.js +43 -34
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ function lt(n) {
|
|
|
26
26
|
d({ x: p.left, y: m ? p.top - 58 : p.bottom + 4 });
|
|
27
27
|
},
|
|
28
28
|
onMouseLeave: () => d(null)
|
|
29
|
-
},
|
|
29
|
+
}, _ = n && r ? je(
|
|
30
30
|
/* @__PURE__ */ s(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
@@ -37,7 +37,7 @@ function lt(n) {
|
|
|
37
37
|
),
|
|
38
38
|
document.body
|
|
39
39
|
) : null;
|
|
40
|
-
return { bind: y, tip:
|
|
40
|
+
return { bind: y, tip: _ };
|
|
41
41
|
}
|
|
42
42
|
function Le(n, r) {
|
|
43
43
|
return n == null || n === "" || r == null || r === "" ? !1 : String(n) === String(r);
|
|
@@ -47,7 +47,7 @@ function dt({
|
|
|
47
47
|
value: r,
|
|
48
48
|
onChange: d,
|
|
49
49
|
disabled: y,
|
|
50
|
-
placeholder:
|
|
50
|
+
placeholder: _,
|
|
51
51
|
extraFilter: g,
|
|
52
52
|
autoSelectSingle: p,
|
|
53
53
|
optionSort: m,
|
|
@@ -56,7 +56,7 @@ function dt({
|
|
|
56
56
|
fieldKey: C,
|
|
57
57
|
narrowedBy: a,
|
|
58
58
|
pinned: f,
|
|
59
|
-
missPlacement:
|
|
59
|
+
missPlacement: q,
|
|
60
60
|
defaultOpen: Fe,
|
|
61
61
|
onClose: le
|
|
62
62
|
}) {
|
|
@@ -93,16 +93,16 @@ function dt({
|
|
|
93
93
|
if (!i) return;
|
|
94
94
|
const t = i.getBoundingClientRect(), l = i.closest('[role="dialog"]') ?? document.body;
|
|
95
95
|
Oe(l);
|
|
96
|
-
const Ne = window.innerHeight - t.bottom < 340 && t.top > window.innerHeight - t.bottom, ke = t.left, Se = Ne ? t.top - 4 : t.bottom + 4,
|
|
96
|
+
const Ne = window.innerHeight - t.bottom < 340 && t.top > window.innerHeight - t.bottom, ke = t.left, Se = Ne ? t.top - 4 : t.bottom + 4, _e = {
|
|
97
97
|
minWidth: t.width,
|
|
98
98
|
zIndex: 120,
|
|
99
99
|
...Ne ? { transform: "translateY(-100%)" } : {}
|
|
100
100
|
};
|
|
101
101
|
if (l === document.body)
|
|
102
|
-
ee({ position: "fixed", left: ke, top: Se, ...
|
|
102
|
+
ee({ position: "fixed", left: ke, top: Se, ..._e });
|
|
103
103
|
else {
|
|
104
|
-
const
|
|
105
|
-
ee({ position: "absolute", left: ke -
|
|
104
|
+
const qe = l.getBoundingClientRect();
|
|
105
|
+
ee({ position: "absolute", left: ke - qe.left, top: Se - qe.top, ..._e });
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
@@ -184,7 +184,7 @@ function dt({
|
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
j(() => Ee(O), [O]), st({
|
|
187
|
-
placement:
|
|
187
|
+
placement: q,
|
|
188
188
|
open: c,
|
|
189
189
|
search: L,
|
|
190
190
|
settled: !O && !be && h !== void 0,
|
|
@@ -244,7 +244,10 @@ function dt({
|
|
|
244
244
|
() => ot(
|
|
245
245
|
h ?? [],
|
|
246
246
|
(e) => k(w, e) || `#${e.id}`,
|
|
247
|
-
|
|
247
|
+
// The server also reads a joined code by its parts ("2026-NNO-POWER"
|
|
248
|
+
// finds 2026-WEST-NNO-HE-POWERING, services/search-synonyms.ts), so
|
|
249
|
+
// the list narrowed while that search is out does too.
|
|
250
|
+
v.replace(/[-_/]+/g, " "),
|
|
248
251
|
ie
|
|
249
252
|
),
|
|
250
253
|
[h, w, v, ie]
|
|
@@ -321,7 +324,7 @@ function dt({
|
|
|
321
324
|
),
|
|
322
325
|
children: [
|
|
323
326
|
M && /* @__PURE__ */ s(ze, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
|
|
324
|
-
/* @__PURE__ */ s("span", { className: "truncate", children: ye ??
|
|
327
|
+
/* @__PURE__ */ s("span", { className: "truncate", children: ye ?? _ ?? "Select…" })
|
|
325
328
|
]
|
|
326
329
|
}
|
|
327
330
|
),
|
|
@@ -525,24 +528,24 @@ function ct({
|
|
|
525
528
|
search: r,
|
|
526
529
|
filter: d,
|
|
527
530
|
narrowedLabels: y,
|
|
528
|
-
auto:
|
|
531
|
+
auto: _
|
|
529
532
|
}) {
|
|
530
533
|
const g = ae(), [p, m] = $(!1), F = d ? JSON.stringify(d) : "", { data: o, isFetching: C } = S({
|
|
531
534
|
queryKey: ["picker-narrowing", n, r, F],
|
|
532
535
|
queryFn: () => g.request(
|
|
533
536
|
Ve("/picker-narrowing", { collection: n, search: r, filter: d ?? null })
|
|
534
|
-
).then((
|
|
535
|
-
enabled: p ||
|
|
537
|
+
).then((q) => q.data),
|
|
538
|
+
enabled: p || _,
|
|
536
539
|
staleTime: 3e4,
|
|
537
540
|
retry: !1
|
|
538
541
|
});
|
|
539
|
-
if (!p && !
|
|
542
|
+
if (!p && !_)
|
|
540
543
|
return /* @__PURE__ */ s(
|
|
541
544
|
"button",
|
|
542
545
|
{
|
|
543
546
|
type: "button",
|
|
544
|
-
onClick: (
|
|
545
|
-
|
|
547
|
+
onClick: (q) => {
|
|
548
|
+
q.stopPropagation(), m(!0);
|
|
546
549
|
},
|
|
547
550
|
className: "w-full border-t border-border px-3 py-1.5 text-left text-[11px] text-muted-foreground hover:text-foreground",
|
|
548
551
|
"data-picker-narrowing-ask": !0,
|
|
@@ -566,7 +569,7 @@ function ct({
|
|
|
566
569
|
"data-picker-narrowing": !0,
|
|
567
570
|
"data-picker-narrowing-field": o.by_field_filter,
|
|
568
571
|
"data-picker-narrowing-excluded": o.by_exclusions,
|
|
569
|
-
children: a.map((
|
|
572
|
+
children: a.map((q) => /* @__PURE__ */ s("p", { children: q }, q))
|
|
570
573
|
}
|
|
571
574
|
);
|
|
572
575
|
}
|
|
@@ -575,7 +578,7 @@ function Ct({
|
|
|
575
578
|
id: r,
|
|
576
579
|
displayTemplate: d
|
|
577
580
|
}) {
|
|
578
|
-
const y = ae(),
|
|
581
|
+
const y = ae(), _ = Re(), g = n === "nivaro_files" || n === "directus_files", p = (() => {
|
|
579
582
|
if (!d || !d.includes(".")) return null;
|
|
580
583
|
const o = [...d.matchAll(/\{\{([^}]+)\}\}/g)].map((C) => C[1].trim());
|
|
581
584
|
return o.length > 0 ? ["id", ...o].join(",") : null;
|
|
@@ -588,7 +591,7 @@ function Ct({
|
|
|
588
591
|
y.request(
|
|
589
592
|
R(`/files/${encodeURIComponent(String(r))}/meta`)
|
|
590
593
|
).then((o) => o.data)
|
|
591
|
-
) :
|
|
594
|
+
) : _(n, r, p),
|
|
592
595
|
enabled: !!r && !!n,
|
|
593
596
|
staleTime: 6e4
|
|
594
597
|
});
|