@nivaro/react 0.3.48 → 0.3.49
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/shared/components/CellCopyLayer.js +81 -44
- package/dist/shared/components/CollectionBrowserView.js +306 -297
- package/dist/shared/components/DataTable.js +3 -3
- package/dist/shared/components/FulfilmentPill.js +98 -78
- package/dist/shared/components/ItemEditForm.js +2830 -2815
- package/dist/shared/components/NotificationSourcesCard.js +151 -147
- package/dist/shared/components/ProfileView.js +72 -70
- package/dist/shared/components/QueryTable.js +3 -3
- package/dist/shared/components/imports/ImportConsole.js +4 -4
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +58 -50
- package/dist/shared/components/item-edit/HeaderTools.js +118 -113
- package/dist/shared/components/item-edit/InlineTableField.js +874 -868
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +65 -65
- package/dist/shared/components/layout-editor/settings/settings-registry.js +4 -4
- package/dist/shared/components/notifications/DeliveryChips.js +9 -9
- package/dist/shared/components/panels/PipelinePanel.js +73 -71
- package/dist/shared/components/panels/SlaBreachBanner.js +2 -2
- package/dist/shared/components/panels/TransitionRequirementsDialog.js +384 -380
- package/dist/shared/components/profile/PersonProfile.js +23 -21
- package/dist/shared/components/profile/SignedInDevices.js +126 -0
- package/dist/shared/components/queue/QueueItemSheet.js +38 -37
- package/dist/shared/components/support/SupportView.js +1 -1
- package/dist/shared/lib/edit-lock-fields.js +7 -0
- package/dist/shared/lib/reimport-visibility.js +10 -0
- package/package.json +1 -1
|
@@ -1,153 +1,158 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MoreHorizontal as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
1
|
+
import { jsx as v, jsxs as W } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHorizontal as N } from "lucide-react";
|
|
3
|
+
import { useRef as b, useState as R, useEffect as _ } from "react";
|
|
4
|
+
import { createPortal as L } from "react-dom";
|
|
5
|
+
import { cn as y } from "../../lib/utils.js";
|
|
6
|
+
function B(c, t) {
|
|
7
7
|
const d = c.target;
|
|
8
8
|
if (!(d != null && d.closest)) return !0;
|
|
9
9
|
if (d.closest("[data-radix-popper-content-wrapper]")) return !1;
|
|
10
10
|
const a = d.closest('[role="dialog"]');
|
|
11
11
|
return !a || !!(t && a.contains(t));
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
var
|
|
15
|
-
const t =
|
|
16
|
-
|
|
17
|
-
const o =
|
|
18
|
-
if (
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
13
|
+
function D({ children: c }) {
|
|
14
|
+
var g, x;
|
|
15
|
+
const t = b(null), d = b(null), [a, i] = R(!1), u = b(!1);
|
|
16
|
+
u.current = a;
|
|
17
|
+
const n = b(0), o = b(0), [s, l] = R(!1);
|
|
18
|
+
if (_(() => {
|
|
19
|
+
var k, C;
|
|
20
|
+
const e = (k = t.current) == null ? void 0 : k.closest("[data-nvr-header-row]");
|
|
21
|
+
if (!e) return;
|
|
22
22
|
const f = () => {
|
|
23
|
-
|
|
23
|
+
if (!u.current) {
|
|
24
|
+
e.scrollWidth > e.clientWidth + 2 && (n.current = e.scrollWidth, i(!0), l(!1));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const E = e.hasAttribute("data-nvr-header-wrap");
|
|
28
|
+
!E && e.scrollWidth > e.clientWidth + 2 ? (o.current = e.scrollWidth, e.setAttribute("data-nvr-header-wrap", "")) : E && e.clientWidth > o.current + 32 ? e.removeAttribute("data-nvr-header-wrap") : !E && n.current > 0 && e.clientWidth > n.current + 32 && i(!1);
|
|
24
29
|
};
|
|
25
30
|
f();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const p = (
|
|
29
|
-
return p && p !==
|
|
30
|
-
}),
|
|
31
|
-
if (!
|
|
32
|
-
const
|
|
33
|
-
f.key !== "Escape" || !
|
|
31
|
+
const w = new ResizeObserver(f);
|
|
32
|
+
w.observe(e);
|
|
33
|
+
const p = (C = t.current) == null ? void 0 : C.parentElement;
|
|
34
|
+
return p && p !== e && w.observe(p), () => w.disconnect();
|
|
35
|
+
}), _(() => {
|
|
36
|
+
if (!s) return;
|
|
37
|
+
const e = (f) => {
|
|
38
|
+
f.key !== "Escape" || !B(f, t.current) || (f.stopPropagation(), l(!1));
|
|
34
39
|
};
|
|
35
|
-
return window.addEventListener("keydown",
|
|
36
|
-
}, [
|
|
37
|
-
if (!
|
|
38
|
-
const
|
|
39
|
-
const p =
|
|
40
|
+
return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
|
|
41
|
+
}, [s]), _(() => {
|
|
42
|
+
if (!s) return;
|
|
43
|
+
const e = (w) => {
|
|
44
|
+
const p = w.target;
|
|
40
45
|
if (p.closest("[data-nvr-header-tools-panel]") || p.closest("[data-nvr-header-tools-btn]") || p.closest("[data-nvr-header-menu-panel]") || p.closest("[data-radix-popper-content-wrapper]"))
|
|
41
46
|
return;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
}, f = (
|
|
45
|
-
|
|
47
|
+
const k = p.closest('[role="dialog"]');
|
|
48
|
+
k && !k.contains(t.current) || l(!1);
|
|
49
|
+
}, f = (w) => {
|
|
50
|
+
w.target.closest("[data-nvr-header-menu-panel] [data-nvr-menu-close]") && l(!1);
|
|
46
51
|
};
|
|
47
|
-
return window.addEventListener("mousedown",
|
|
48
|
-
window.removeEventListener("mousedown",
|
|
52
|
+
return window.addEventListener("mousedown", e, !0), window.addEventListener("click", f), () => {
|
|
53
|
+
window.removeEventListener("mousedown", e, !0), window.removeEventListener("click", f);
|
|
49
54
|
};
|
|
50
|
-
}, [
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
const
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
}, [s]), !a)
|
|
56
|
+
return /* @__PURE__ */ v("div", { ref: t, className: "contents", "data-nvr-header-tools": "inline", children: c });
|
|
57
|
+
const r = s ? (g = d.current) == null ? void 0 : g.getBoundingClientRect() : void 0, h = ((x = d.current) == null ? void 0 : x.closest('[role="dialog"]')) ?? document.body, m = r ? r.right - (h === document.body ? 0 : h.getBoundingClientRect().left) - 16 : 440;
|
|
58
|
+
return /* @__PURE__ */ W("div", { ref: t, className: "flex shrink-0 items-center", "data-nvr-header-tools": "folded", children: [
|
|
59
|
+
/* @__PURE__ */ v(
|
|
55
60
|
"button",
|
|
56
61
|
{
|
|
57
62
|
ref: d,
|
|
58
63
|
type: "button",
|
|
59
64
|
"data-nvr-header-tools-btn": !0,
|
|
60
|
-
"aria-expanded":
|
|
65
|
+
"aria-expanded": s,
|
|
61
66
|
"aria-label": "More tools",
|
|
62
67
|
"data-tip": "More tools",
|
|
63
|
-
onClick: () =>
|
|
64
|
-
className:
|
|
68
|
+
onClick: () => l((e) => !e),
|
|
69
|
+
className: y(
|
|
65
70
|
"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",
|
|
66
|
-
|
|
71
|
+
s && "bg-accent text-accent-foreground dark:bg-accent"
|
|
67
72
|
),
|
|
68
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ v(N, { className: "h-4 w-4" })
|
|
69
74
|
}
|
|
70
75
|
),
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */
|
|
76
|
+
s && r && L(
|
|
77
|
+
/* @__PURE__ */ v(
|
|
73
78
|
"div",
|
|
74
79
|
{
|
|
75
80
|
"data-nvr-header-tools-panel": !0,
|
|
76
|
-
style:
|
|
81
|
+
style: h === document.body ? {
|
|
77
82
|
position: "fixed",
|
|
78
|
-
top:
|
|
79
|
-
right: Math.max(8, window.innerWidth -
|
|
80
|
-
maxWidth: Math.min(440,
|
|
83
|
+
top: r.bottom + 6,
|
|
84
|
+
right: Math.max(8, window.innerWidth - r.right),
|
|
85
|
+
maxWidth: Math.min(440, m),
|
|
81
86
|
zIndex: 110
|
|
82
87
|
} : {
|
|
83
88
|
position: "absolute",
|
|
84
|
-
top:
|
|
85
|
-
right: Math.max(8,
|
|
86
|
-
maxWidth: Math.min(440,
|
|
89
|
+
top: r.bottom - h.getBoundingClientRect().top + 6,
|
|
90
|
+
right: Math.max(8, h.getBoundingClientRect().right - r.right),
|
|
91
|
+
maxWidth: Math.min(440, m),
|
|
87
92
|
zIndex: 110
|
|
88
93
|
},
|
|
89
94
|
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 [&_[data-nvr-header-tool-group]]:h-auto [&_[data-nvr-header-tool-group]]:min-h-9 [&_[data-nvr-header-tool-group]]:max-w-full [&_[data-nvr-header-tool-group]]:shrink [&_[data-nvr-header-tool-group]]:flex-wrap",
|
|
90
95
|
children: c
|
|
91
96
|
}
|
|
92
97
|
),
|
|
93
|
-
|
|
98
|
+
h
|
|
94
99
|
)
|
|
95
100
|
] });
|
|
96
101
|
}
|
|
97
|
-
function
|
|
98
|
-
const [d, a] =
|
|
102
|
+
function P(c, t) {
|
|
103
|
+
const [d, a] = R(!1), i = b(!1);
|
|
99
104
|
i.current = d;
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
-
const
|
|
103
|
-
if (!t || !
|
|
105
|
+
const u = b(0);
|
|
106
|
+
return _(() => {
|
|
107
|
+
const n = c.current, o = n == null ? void 0 : n.closest("[data-nvr-header-row]");
|
|
108
|
+
if (!t || !n || !o) {
|
|
104
109
|
!t && i.current && a(!1);
|
|
105
110
|
return;
|
|
106
111
|
}
|
|
107
|
-
const
|
|
112
|
+
const s = () => {
|
|
108
113
|
if (i.current)
|
|
109
|
-
|
|
114
|
+
u.current > 0 && o.clientWidth > u.current + 32 && a(!1);
|
|
110
115
|
else {
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
if ((
|
|
116
|
+
if (o.scrollWidth <= o.clientWidth + 2) return;
|
|
117
|
+
const r = o.querySelector("[data-nvr-header-tools]");
|
|
118
|
+
if ((r == null ? void 0 : r.getAttribute("data-nvr-header-tools")) === "inline" && r.childElementCount > 0)
|
|
114
119
|
return;
|
|
115
|
-
|
|
120
|
+
u.current = o.scrollWidth, a(!0);
|
|
116
121
|
}
|
|
117
122
|
};
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
return
|
|
123
|
+
s();
|
|
124
|
+
const l = new ResizeObserver(s);
|
|
125
|
+
return l.observe(o), n.parentElement && n.parentElement !== o && l.observe(n.parentElement), () => l.disconnect();
|
|
121
126
|
}), d;
|
|
122
127
|
}
|
|
123
|
-
const
|
|
124
|
-
function
|
|
125
|
-
return Math.max(8, Math.min(c, t -
|
|
128
|
+
const z = 240;
|
|
129
|
+
function M(c, t) {
|
|
130
|
+
return Math.max(8, Math.min(c, t - z - 8));
|
|
126
131
|
}
|
|
127
|
-
function
|
|
132
|
+
function T({
|
|
128
133
|
children: c,
|
|
129
134
|
label: t = "More",
|
|
130
135
|
className: d
|
|
131
136
|
}) {
|
|
132
|
-
var
|
|
133
|
-
const a =
|
|
134
|
-
|
|
137
|
+
var s, l;
|
|
138
|
+
const a = b(null), [i, u] = R(!1);
|
|
139
|
+
_(() => {
|
|
135
140
|
if (!i) return;
|
|
136
|
-
const
|
|
137
|
-
var
|
|
138
|
-
const g =
|
|
141
|
+
const r = (m) => {
|
|
142
|
+
var x;
|
|
143
|
+
const g = m.target;
|
|
139
144
|
g.closest("[data-nvr-header-menu-panel]") || g.closest("[data-nvr-header-menu-btn]") || g.closest("[data-radix-popper-content-wrapper]") || // A dialog opened from a menu row, not one hosting the form.
|
|
140
|
-
g.closest('[role="dialog"]') && !((
|
|
141
|
-
},
|
|
142
|
-
|
|
145
|
+
g.closest('[role="dialog"]') && !((x = g.closest('[role="dialog"]')) != null && x.contains(a.current)) || u(!1);
|
|
146
|
+
}, h = (m) => {
|
|
147
|
+
m.key !== "Escape" || !B(m, a.current) || (m.stopPropagation(), u(!1));
|
|
143
148
|
};
|
|
144
|
-
return window.addEventListener("mousedown",
|
|
145
|
-
window.removeEventListener("mousedown",
|
|
149
|
+
return window.addEventListener("mousedown", r, !0), window.addEventListener("keydown", h, !0), () => {
|
|
150
|
+
window.removeEventListener("mousedown", r, !0), window.removeEventListener("keydown", h, !0);
|
|
146
151
|
};
|
|
147
152
|
}, [i]);
|
|
148
|
-
const
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
153
|
+
const n = i ? (s = a.current) == null ? void 0 : s.getBoundingClientRect() : void 0, o = ((l = a.current) == null ? void 0 : l.closest('[role="dialog"]')) ?? document.body;
|
|
154
|
+
return /* @__PURE__ */ W("div", { className: y("relative shrink-0", d), children: [
|
|
155
|
+
/* @__PURE__ */ W(
|
|
151
156
|
"button",
|
|
152
157
|
{
|
|
153
158
|
ref: a,
|
|
@@ -157,41 +162,41 @@ function P({
|
|
|
157
162
|
"aria-expanded": i,
|
|
158
163
|
"aria-label": t,
|
|
159
164
|
"data-tip": "More actions",
|
|
160
|
-
onClick: () =>
|
|
161
|
-
className:
|
|
165
|
+
onClick: () => u((r) => !r),
|
|
166
|
+
className: y(
|
|
162
167
|
"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",
|
|
163
168
|
i && "bg-accent text-accent-foreground dark:bg-accent"
|
|
164
169
|
),
|
|
165
170
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ v(N, { className: "h-4 w-4" }),
|
|
172
|
+
/* @__PURE__ */ v("span", { className: "hidden lg:inline", children: t })
|
|
168
173
|
]
|
|
169
174
|
}
|
|
170
175
|
),
|
|
171
|
-
i &&
|
|
172
|
-
/* @__PURE__ */
|
|
176
|
+
i && n && L(
|
|
177
|
+
/* @__PURE__ */ v(
|
|
173
178
|
"div",
|
|
174
179
|
{
|
|
175
180
|
"data-nvr-header-menu-panel": !0,
|
|
176
181
|
role: "menu",
|
|
177
|
-
onClick: (
|
|
178
|
-
|
|
182
|
+
onClick: (r) => {
|
|
183
|
+
r.target.closest("[data-nvr-menu-close]") && u(!1);
|
|
179
184
|
},
|
|
180
|
-
style:
|
|
185
|
+
style: o === document.body ? {
|
|
181
186
|
position: "fixed",
|
|
182
|
-
top:
|
|
183
|
-
right:
|
|
187
|
+
top: n.bottom + 6,
|
|
188
|
+
right: M(window.innerWidth - n.right, window.innerWidth),
|
|
184
189
|
zIndex: 110
|
|
185
190
|
} : {
|
|
186
191
|
position: "absolute",
|
|
187
|
-
top:
|
|
188
|
-
right:
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
top: n.bottom - o.getBoundingClientRect().top + 6,
|
|
193
|
+
right: M(
|
|
194
|
+
o.getBoundingClientRect().right - n.right,
|
|
195
|
+
o.getBoundingClientRect().width
|
|
191
196
|
),
|
|
192
197
|
zIndex: 110
|
|
193
198
|
},
|
|
194
|
-
className:
|
|
199
|
+
className: y(
|
|
195
200
|
"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",
|
|
196
201
|
"[&_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",
|
|
197
202
|
"[&_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",
|
|
@@ -200,19 +205,19 @@ function P({
|
|
|
200
205
|
children: c
|
|
201
206
|
}
|
|
202
207
|
),
|
|
203
|
-
|
|
208
|
+
o
|
|
204
209
|
)
|
|
205
210
|
] });
|
|
206
211
|
}
|
|
207
|
-
function
|
|
212
|
+
function F({
|
|
208
213
|
children: c,
|
|
209
214
|
className: t
|
|
210
215
|
}) {
|
|
211
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ v(
|
|
212
217
|
"div",
|
|
213
218
|
{
|
|
214
219
|
"data-nvr-header-tool-group": !0,
|
|
215
|
-
className:
|
|
220
|
+
className: y(
|
|
216
221
|
"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",
|
|
217
222
|
t
|
|
218
223
|
),
|
|
@@ -221,9 +226,9 @@ function T({
|
|
|
221
226
|
);
|
|
222
227
|
}
|
|
223
228
|
export {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
+
T as HeaderMenu,
|
|
230
|
+
F as HeaderToolGroup,
|
|
231
|
+
D as HeaderTools,
|
|
232
|
+
M as menuRight,
|
|
233
|
+
P as useHeaderFold
|
|
229
234
|
};
|