@nivaro/react 0.3.13 → 0.3.15
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/components/slots/pipeline/OwnersSection.js +79 -75
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +33 -2
- package/dist/index.js +520 -516
- package/dist/shared/components/CollectionBrowserView.js +2393 -2318
- package/dist/shared/components/DataTable.js +347 -335
- package/dist/shared/components/ItemEditForm.js +5278 -5149
- package/dist/shared/components/ListLoadError.js +33 -0
- package/dist/shared/components/PageRenderer.js +562 -529
- package/dist/shared/components/ProfileView.js +53 -51
- package/dist/shared/components/RecordReadView.js +119 -117
- package/dist/shared/components/ReportView.js +1268 -1241
- package/dist/shared/components/cbv/export-rows.js +69 -0
- package/dist/shared/components/cbv/saved-view-risk.js +35 -0
- package/dist/shared/components/cbv/unknown-fields.js +18 -0
- package/dist/shared/components/integrations/console/AlertsView.js +27 -25
- package/dist/shared/components/integrations/console/EventsView.js +244 -209
- package/dist/shared/components/item-edit/CatalogPickerField.js +946 -878
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +84 -57
- package/dist/shared/components/item-edit/FieldAffordances.js +63 -61
- package/dist/shared/components/item-edit/FieldRow.js +195 -179
- package/dist/shared/components/item-edit/FilePickerField.js +257 -254
- package/dist/shared/components/item-edit/HeaderTools.js +139 -95
- package/dist/shared/components/item-edit/InlineTableField.js +2087 -2075
- package/dist/shared/components/item-edit/RowComments.js +1 -3
- package/dist/shared/components/item-edit/SummaryPanel.js +62 -62
- package/dist/shared/components/item-edit/UserChip.js +113 -113
- package/dist/shared/components/item-edit/file-download.js +18 -0
- package/dist/shared/components/item-edit/line-qty.js +67 -32
- package/dist/shared/components/item-edit/save-refusal.js +23 -0
- package/dist/shared/components/monitoring/TrafficMiniMap.js +9 -9
- package/dist/shared/components/panels/CommentPanel.js +30 -30
- package/dist/shared/components/panels/ItemLockBanner.js +207 -185
- package/dist/shared/components/panels/PipelinePanel.js +915 -786
- package/dist/shared/components/pipeline/PipelineEditorView.js +45 -25
- package/dist/shared/components/profile/DelegationCard.js +1 -1
- package/dist/shared/components/profile/session-actions.js +24 -24
- package/dist/shared/components/queue/QueueItemSheet.js +18 -18
- package/dist/shared/components/queue/QueueWorklist.js +517 -504
- package/dist/shared/components/ui/dropdown-menu.js +8 -7
- package/dist/shared/lib/draft-store.js +60 -33
- package/dist/shared/lib/leave-guard.js +38 -0
- package/dist/shared/lib/load-error.js +38 -17
- package/dist/shared/lib/summary-mode.js +25 -25
- package/dist/shared/lib/table-pins.js +23 -0
- package/dist/shared/lib/validation-rules.js +55 -51
- package/package.json +1 -1
|
@@ -1,177 +1,221 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MoreHorizontal as
|
|
3
|
-
import { useRef as v, useState as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const a =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as h, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHorizontal as C } from "lucide-react";
|
|
3
|
+
import { useRef as v, useState as _, useEffect as k } from "react";
|
|
4
|
+
import { createPortal as M } from "react-dom";
|
|
5
|
+
import { cn as y } from "../../lib/utils.js";
|
|
6
|
+
function W(u, r) {
|
|
7
|
+
const d = u.target;
|
|
8
|
+
if (!(d != null && d.closest)) return !0;
|
|
9
|
+
if (d.closest("[data-radix-popper-content-wrapper]")) return !1;
|
|
10
|
+
const a = d.closest('[role="dialog"]');
|
|
11
|
+
return !a || !!(r && a.contains(r));
|
|
12
|
+
}
|
|
13
|
+
function I({ children: u }) {
|
|
14
|
+
var m, b;
|
|
15
|
+
const r = v(null), d = v(null), [a, i] = _(!1), c = v(!1);
|
|
16
|
+
c.current = a;
|
|
17
|
+
const o = v(0), [e, l] = _(!1);
|
|
18
|
+
if (k(() => {
|
|
19
|
+
var x, R;
|
|
20
|
+
const n = (x = r.current) == null ? void 0 : x.closest("[data-nvr-header-row]");
|
|
21
|
+
if (!n) return;
|
|
22
|
+
const p = () => {
|
|
23
|
+
c.current ? o.current > 0 && n.clientWidth > o.current + 32 && i(!1) : n.scrollWidth > n.clientWidth + 2 && (o.current = n.scrollWidth, i(!0), l(!1));
|
|
24
|
+
};
|
|
25
|
+
p();
|
|
26
|
+
const g = new ResizeObserver(p);
|
|
27
|
+
g.observe(n);
|
|
28
|
+
const f = (R = r.current) == null ? void 0 : R.parentElement;
|
|
29
|
+
return f && f !== n && g.observe(f), () => g.disconnect();
|
|
30
|
+
}), k(() => {
|
|
14
31
|
if (!e) return;
|
|
15
|
-
const
|
|
16
|
-
|
|
32
|
+
const n = (p) => {
|
|
33
|
+
p.key !== "Escape" || !W(p, r.current) || (p.stopPropagation(), l(!1));
|
|
17
34
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const d = g.target;
|
|
25
|
-
if (d.closest("[data-nvr-header-tools-panel]") || d.closest("[data-nvr-header-tools-btn]") || d.closest("[data-nvr-header-menu-panel]") || d.closest("[data-radix-popper-content-wrapper]"))
|
|
35
|
+
return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
|
|
36
|
+
}, [e]), k(() => {
|
|
37
|
+
if (!e) return;
|
|
38
|
+
const n = (g) => {
|
|
39
|
+
const f = g.target;
|
|
40
|
+
if (f.closest("[data-nvr-header-tools-panel]") || f.closest("[data-nvr-header-tools-btn]") || f.closest("[data-nvr-header-menu-panel]") || f.closest("[data-radix-popper-content-wrapper]"))
|
|
26
41
|
return;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
g.target.closest("[data-nvr-header-menu-panel] [data-nvr-menu-close]") &&
|
|
42
|
+
const x = f.closest('[role="dialog"]');
|
|
43
|
+
x && !x.contains(r.current) || l(!1);
|
|
44
|
+
}, p = (g) => {
|
|
45
|
+
g.target.closest("[data-nvr-header-menu-panel] [data-nvr-menu-close]") && l(!1);
|
|
31
46
|
};
|
|
32
|
-
return window.addEventListener("mousedown",
|
|
33
|
-
window.removeEventListener("mousedown",
|
|
47
|
+
return window.addEventListener("mousedown", n, !0), window.addEventListener("click", p), () => {
|
|
48
|
+
window.removeEventListener("mousedown", n, !0), window.removeEventListener("click", p);
|
|
34
49
|
};
|
|
35
|
-
}, [
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
const s =
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
50
|
+
}, [e]), !a)
|
|
51
|
+
return /* @__PURE__ */ h("div", { ref: r, className: "contents", "data-nvr-header-tools": "inline", children: u });
|
|
52
|
+
const s = e ? (m = d.current) == null ? void 0 : m.getBoundingClientRect() : void 0, t = ((b = d.current) == null ? void 0 : b.closest('[role="dialog"]')) ?? document.body, w = s ? s.right - (t === document.body ? 0 : t.getBoundingClientRect().left) - 16 : 440;
|
|
53
|
+
return /* @__PURE__ */ E("div", { ref: r, className: "flex shrink-0 items-center", "data-nvr-header-tools": "folded", children: [
|
|
54
|
+
/* @__PURE__ */ h(
|
|
40
55
|
"button",
|
|
41
56
|
{
|
|
42
|
-
ref:
|
|
57
|
+
ref: d,
|
|
43
58
|
type: "button",
|
|
44
59
|
"data-nvr-header-tools-btn": !0,
|
|
45
|
-
"aria-expanded":
|
|
60
|
+
"aria-expanded": e,
|
|
46
61
|
"aria-label": "More tools",
|
|
47
62
|
"data-tip": "More tools",
|
|
48
|
-
onClick: () =>
|
|
49
|
-
className:
|
|
63
|
+
onClick: () => l((n) => !n),
|
|
64
|
+
className: y(
|
|
50
65
|
"inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground dark:bg-transparent dark:hover:bg-accent",
|
|
51
|
-
|
|
66
|
+
e && "bg-accent text-accent-foreground dark:bg-accent"
|
|
52
67
|
),
|
|
53
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ h(C, { className: "h-4 w-4" })
|
|
54
69
|
}
|
|
55
70
|
),
|
|
56
|
-
|
|
57
|
-
/* @__PURE__ */
|
|
71
|
+
e && s && M(
|
|
72
|
+
/* @__PURE__ */ h(
|
|
58
73
|
"div",
|
|
59
74
|
{
|
|
60
75
|
"data-nvr-header-tools-panel": !0,
|
|
61
|
-
style:
|
|
76
|
+
style: t === document.body ? {
|
|
62
77
|
position: "fixed",
|
|
63
78
|
top: s.bottom + 6,
|
|
64
79
|
right: Math.max(8, window.innerWidth - s.right),
|
|
80
|
+
maxWidth: Math.min(440, w),
|
|
65
81
|
zIndex: 110
|
|
66
82
|
} : {
|
|
67
83
|
position: "absolute",
|
|
68
|
-
top: s.bottom -
|
|
69
|
-
right: Math.max(8,
|
|
84
|
+
top: s.bottom - t.getBoundingClientRect().top + 6,
|
|
85
|
+
right: Math.max(8, t.getBoundingClientRect().right - s.right),
|
|
86
|
+
maxWidth: Math.min(440, w),
|
|
70
87
|
zIndex: 110
|
|
71
88
|
},
|
|
72
|
-
className: "flex
|
|
73
|
-
children:
|
|
89
|
+
className: "flex flex-wrap items-center justify-end gap-1.5 rounded-lg border border-slate-200 bg-white p-2 shadow-xl dark:border-border dark:bg-card",
|
|
90
|
+
children: u
|
|
74
91
|
}
|
|
75
92
|
),
|
|
76
|
-
|
|
93
|
+
t
|
|
77
94
|
)
|
|
78
95
|
] });
|
|
79
96
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
97
|
+
function O(u, r) {
|
|
98
|
+
const [d, a] = _(!1), i = v(!1);
|
|
99
|
+
i.current = d;
|
|
100
|
+
const c = v(0);
|
|
101
|
+
return k(() => {
|
|
102
|
+
const o = u.current, e = o == null ? void 0 : o.closest("[data-nvr-header-row]");
|
|
103
|
+
if (!r || !o || !e) {
|
|
104
|
+
!r && i.current && a(!1);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const l = () => {
|
|
108
|
+
if (i.current)
|
|
109
|
+
c.current > 0 && e.clientWidth > c.current + 32 && a(!1);
|
|
110
|
+
else {
|
|
111
|
+
if (e.scrollWidth <= e.clientWidth + 2) return;
|
|
112
|
+
const t = e.querySelector("[data-nvr-header-tools]");
|
|
113
|
+
if ((t == null ? void 0 : t.getAttribute("data-nvr-header-tools")) === "inline" && t.childElementCount > 0)
|
|
114
|
+
return;
|
|
115
|
+
c.current = e.scrollWidth, a(!0);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
l();
|
|
119
|
+
const s = new ResizeObserver(l);
|
|
120
|
+
return s.observe(e), o.parentElement && o.parentElement !== e && s.observe(o.parentElement), () => s.disconnect();
|
|
121
|
+
}), d;
|
|
122
|
+
}
|
|
123
|
+
function j({
|
|
124
|
+
children: u,
|
|
82
125
|
label: r = "More",
|
|
83
|
-
className:
|
|
126
|
+
className: d
|
|
84
127
|
}) {
|
|
85
|
-
var
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
if (!
|
|
89
|
-
const
|
|
90
|
-
var
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
|
|
128
|
+
var l, s;
|
|
129
|
+
const a = v(null), [i, c] = _(!1);
|
|
130
|
+
k(() => {
|
|
131
|
+
if (!i) return;
|
|
132
|
+
const t = (m) => {
|
|
133
|
+
var n;
|
|
134
|
+
const b = m.target;
|
|
135
|
+
b.closest("[data-nvr-header-menu-panel]") || b.closest("[data-nvr-header-menu-btn]") || b.closest("[data-radix-popper-content-wrapper]") || // A dialog opened from a menu row, not one hosting the form.
|
|
136
|
+
b.closest('[role="dialog"]') && !((n = b.closest('[role="dialog"]')) != null && n.contains(a.current)) || c(!1);
|
|
137
|
+
}, w = (m) => {
|
|
138
|
+
m.key !== "Escape" || !W(m, a.current) || (m.stopPropagation(), c(!1));
|
|
96
139
|
};
|
|
97
|
-
return window.addEventListener("mousedown",
|
|
98
|
-
window.removeEventListener("mousedown",
|
|
140
|
+
return window.addEventListener("mousedown", t, !0), window.addEventListener("keydown", w, !0), () => {
|
|
141
|
+
window.removeEventListener("mousedown", t, !0), window.removeEventListener("keydown", w, !0);
|
|
99
142
|
};
|
|
100
|
-
}, [
|
|
101
|
-
const
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
143
|
+
}, [i]);
|
|
144
|
+
const o = i ? (l = a.current) == null ? void 0 : l.getBoundingClientRect() : void 0, e = ((s = a.current) == null ? void 0 : s.closest('[role="dialog"]')) ?? document.body;
|
|
145
|
+
return /* @__PURE__ */ E("div", { className: y("relative shrink-0", d), children: [
|
|
146
|
+
/* @__PURE__ */ E(
|
|
104
147
|
"button",
|
|
105
148
|
{
|
|
106
|
-
ref:
|
|
149
|
+
ref: a,
|
|
107
150
|
type: "button",
|
|
108
151
|
"data-nvr-header-menu-btn": !0,
|
|
109
152
|
"aria-haspopup": "menu",
|
|
110
|
-
"aria-expanded":
|
|
153
|
+
"aria-expanded": i,
|
|
111
154
|
"aria-label": r,
|
|
112
155
|
"data-tip": "More actions",
|
|
113
|
-
onClick: () =>
|
|
114
|
-
className:
|
|
156
|
+
onClick: () => c((t) => !t),
|
|
157
|
+
className: y(
|
|
115
158
|
"inline-flex h-9 items-center gap-1 rounded-md border border-input bg-background px-2.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground dark:bg-transparent dark:hover:bg-accent",
|
|
116
|
-
|
|
159
|
+
i && "bg-accent text-accent-foreground dark:bg-accent"
|
|
117
160
|
),
|
|
118
161
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ h(C, { className: "h-4 w-4" }),
|
|
163
|
+
/* @__PURE__ */ h("span", { className: "hidden lg:inline", children: r })
|
|
121
164
|
]
|
|
122
165
|
}
|
|
123
166
|
),
|
|
124
|
-
|
|
125
|
-
/* @__PURE__ */
|
|
167
|
+
i && o && M(
|
|
168
|
+
/* @__PURE__ */ h(
|
|
126
169
|
"div",
|
|
127
170
|
{
|
|
128
171
|
"data-nvr-header-menu-panel": !0,
|
|
129
172
|
role: "menu",
|
|
130
|
-
onClick: (
|
|
131
|
-
|
|
173
|
+
onClick: (t) => {
|
|
174
|
+
t.target.closest("[data-nvr-menu-close]") && c(!1);
|
|
132
175
|
},
|
|
133
|
-
style:
|
|
176
|
+
style: e === document.body ? {
|
|
134
177
|
position: "fixed",
|
|
135
|
-
top:
|
|
136
|
-
right: Math.max(8, window.innerWidth -
|
|
178
|
+
top: o.bottom + 6,
|
|
179
|
+
right: Math.max(8, window.innerWidth - o.right),
|
|
137
180
|
zIndex: 110
|
|
138
181
|
} : {
|
|
139
182
|
position: "absolute",
|
|
140
|
-
top:
|
|
141
|
-
right: Math.max(8,
|
|
183
|
+
top: o.bottom - e.getBoundingClientRect().top + 6,
|
|
184
|
+
right: Math.max(8, e.getBoundingClientRect().right - o.right),
|
|
142
185
|
zIndex: 110
|
|
143
186
|
},
|
|
144
|
-
className:
|
|
187
|
+
className: y(
|
|
145
188
|
"flex w-[240px] flex-col gap-px rounded-lg border border-slate-200 bg-white p-1 shadow-xl dark:border-border dark:bg-card",
|
|
146
189
|
"[&_button]:h-8 [&_button]:w-full [&_button]:justify-start [&_button]:gap-2 [&_button]:rounded-sm [&_button]:border-0 [&_button]:bg-transparent [&_button]:px-2 [&_button]:text-[12.5px] [&_button]:font-medium [&_button]:shadow-none",
|
|
147
190
|
"[&_button:hover]:bg-accent [&_button:hover]:text-accent-foreground [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button_svg]:shrink-0 [&_button_svg]:text-slate-500",
|
|
148
191
|
"[&>[data-nvr-menu-divider]]:my-1 [&>[data-nvr-menu-divider]]:h-px [&>[data-nvr-menu-divider]]:bg-slate-100 dark:[&>[data-nvr-menu-divider]]:bg-border"
|
|
149
192
|
),
|
|
150
|
-
children:
|
|
193
|
+
children: u
|
|
151
194
|
}
|
|
152
195
|
),
|
|
153
|
-
|
|
196
|
+
e
|
|
154
197
|
)
|
|
155
198
|
] });
|
|
156
199
|
}
|
|
157
|
-
function
|
|
158
|
-
children:
|
|
200
|
+
function P({
|
|
201
|
+
children: u,
|
|
159
202
|
className: r
|
|
160
203
|
}) {
|
|
161
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ h(
|
|
162
205
|
"div",
|
|
163
206
|
{
|
|
164
207
|
"data-nvr-header-tool-group": !0,
|
|
165
|
-
className:
|
|
208
|
+
className: y(
|
|
166
209
|
"inline-flex h-9 shrink-0 items-center rounded-md border border-input bg-background px-0.5 shadow-sm [&>*+*]:border-l [&>*+*]:border-input/70",
|
|
167
210
|
r
|
|
168
211
|
),
|
|
169
|
-
children:
|
|
212
|
+
children: u
|
|
170
213
|
}
|
|
171
214
|
);
|
|
172
215
|
}
|
|
173
216
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
217
|
+
j as HeaderMenu,
|
|
218
|
+
P as HeaderToolGroup,
|
|
219
|
+
I as HeaderTools,
|
|
220
|
+
O as useHeaderFold
|
|
177
221
|
};
|