@nivaro/react 0.3.117 → 0.3.119
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 +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4451 -4385
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +88 -85
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +245 -141
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/addendum-view.js +6 -0
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,234 +1,338 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MoreHorizontal as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
if (!(
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
11
|
-
return !
|
|
1
|
+
import { jsx as w, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHorizontal as F } from "lucide-react";
|
|
3
|
+
import { useRef as m, useState as M, useEffect as R, useContext as K, createContext as U } from "react";
|
|
4
|
+
import { createPortal as P } from "react-dom";
|
|
5
|
+
import { cn as W } from "../../lib/utils.js";
|
|
6
|
+
function j(i, t) {
|
|
7
|
+
const s = i.target;
|
|
8
|
+
if (!(s != null && s.closest)) return !0;
|
|
9
|
+
if (s.closest("[data-radix-popper-content-wrapper]")) return !1;
|
|
10
|
+
const n = s.closest('[role="dialog"]');
|
|
11
|
+
return !n || !!(t && n.contains(t));
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
const N = U(!0), q = '[role="dialog"],[role="alertdialog"]';
|
|
14
|
+
function J(i, t) {
|
|
15
|
+
return i instanceof Element ? (i.matches(q) ? [i] : Array.from(i.querySelectorAll(q))).some((n) => !n.closest("[data-radix-popper-content-wrapper]") && !t(n)) : !1;
|
|
16
|
+
}
|
|
17
|
+
const Q = 1500;
|
|
18
|
+
function G(i, t, s) {
|
|
19
|
+
const n = m(t);
|
|
20
|
+
n.current = t;
|
|
21
|
+
const p = m(s);
|
|
22
|
+
p.current = s, R(() => {
|
|
23
|
+
if (!i) return;
|
|
24
|
+
let f = 0;
|
|
25
|
+
const o = [], u = (a) => {
|
|
26
|
+
const c = a.target;
|
|
27
|
+
if (!(c != null && c.closest) || !p.current(c)) return;
|
|
28
|
+
const d = window.location.href, h = !!c.closest("a[href]");
|
|
29
|
+
f = Date.now() + Q;
|
|
30
|
+
const l = () => {
|
|
31
|
+
(h || window.location.href !== d) && n.current();
|
|
32
|
+
};
|
|
33
|
+
o.push(setTimeout(l, 0), setTimeout(l, 250));
|
|
34
|
+
}, r = typeof MutationObserver > "u" ? null : new MutationObserver((a) => {
|
|
35
|
+
if (!(Date.now() > f)) {
|
|
36
|
+
for (const c of a)
|
|
37
|
+
for (const d of Array.from(c.addedNodes))
|
|
38
|
+
if (J(d, p.current)) {
|
|
39
|
+
f = 0, n.current();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return r == null || r.observe(document.body, { childList: !0, subtree: !0 }), window.addEventListener("click", u, !0), () => {
|
|
45
|
+
r == null || r.disconnect(), window.removeEventListener("click", u, !0);
|
|
46
|
+
for (const a of o) clearTimeout(a);
|
|
47
|
+
};
|
|
48
|
+
}, [i]);
|
|
49
|
+
}
|
|
50
|
+
function O(i, t) {
|
|
51
|
+
const s = i.querySelector("[data-nvr-header-title]"), n = s == null ? void 0 : s.querySelector("[data-nvr-record-title]"), p = n == null ? void 0 : n.parentElement;
|
|
52
|
+
if (!s || !n || !p || !t) return 0;
|
|
53
|
+
const f = s.getBoundingClientRect();
|
|
54
|
+
if (t.getBoundingClientRect().top >= f.bottom - 1) return 0;
|
|
55
|
+
const u = n.getBoundingClientRect().top, r = Array.from(p.children).filter(
|
|
56
|
+
(d) => d instanceof HTMLElement && d.offsetWidth > 0
|
|
57
|
+
);
|
|
58
|
+
if (!r.some((d) => d.getBoundingClientRect().top > u + 2)) return 0;
|
|
59
|
+
const a = Number.parseFloat(getComputedStyle(p).columnGap) || 0, c = r.reduce((d, h) => d + h.offsetWidth, 0) + a * (r.length - 1);
|
|
60
|
+
return Math.max(0, Math.ceil(c - p.clientWidth));
|
|
61
|
+
}
|
|
62
|
+
function te({ children: i }) {
|
|
63
|
+
var x, k;
|
|
64
|
+
const t = m(null), s = m(null), [n, p] = M(!1), f = m(!1);
|
|
65
|
+
f.current = n;
|
|
66
|
+
const o = m(0), u = m(0), [r, a] = M(!1), c = m(null), d = m(!1);
|
|
67
|
+
if (n ? r && (d.current = !0) : d.current = !1, G(
|
|
68
|
+
r,
|
|
69
|
+
() => a(!1),
|
|
70
|
+
(e) => {
|
|
71
|
+
var b;
|
|
72
|
+
return !!((b = c.current) != null && b.contains(e) || e.closest("[data-nvr-header-menu-panel]"));
|
|
73
|
+
}
|
|
74
|
+
), R(() => {
|
|
75
|
+
var A, B;
|
|
76
|
+
const e = (A = t.current) == null ? void 0 : A.closest("[data-nvr-header-row]");
|
|
21
77
|
if (!e) return;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
78
|
+
const b = () => {
|
|
79
|
+
var I, D;
|
|
80
|
+
if (!f.current) {
|
|
81
|
+
if (e.scrollWidth > e.clientWidth + 2) {
|
|
82
|
+
o.current = e.scrollWidth, p(!0), a(!1);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const H = O(e, ((I = t.current) == null ? void 0 : I.parentElement) ?? null);
|
|
86
|
+
H > 0 && (o.current = e.clientWidth + H, p(!0), a(!1));
|
|
25
87
|
return;
|
|
26
88
|
}
|
|
27
|
-
const
|
|
28
|
-
!
|
|
89
|
+
const C = e.hasAttribute("data-nvr-header-wrap"), S = e.scrollWidth > e.clientWidth + 2, T = C || e.querySelector('[data-nvr-header-fold="inline"]') ? 0 : O(e, ((D = t.current) == null ? void 0 : D.parentElement) ?? null);
|
|
90
|
+
!C && (S || T > 0) ? (u.current = Math.max(
|
|
91
|
+
S ? e.scrollWidth : 0,
|
|
92
|
+
e.clientWidth + T
|
|
93
|
+
), e.setAttribute("data-nvr-header-wrap", "")) : C && e.clientWidth > u.current + 32 ? e.removeAttribute("data-nvr-header-wrap") : !C && o.current > 0 && e.clientWidth > o.current + 32 && p(!1);
|
|
94
|
+
};
|
|
95
|
+
b();
|
|
96
|
+
const E = new ResizeObserver(b);
|
|
97
|
+
E.observe(e);
|
|
98
|
+
const v = (B = t.current) == null ? void 0 : B.parentElement;
|
|
99
|
+
v && v !== e && E.observe(v);
|
|
100
|
+
let y = 0;
|
|
101
|
+
const _ = typeof MutationObserver > "u" ? null : new MutationObserver(() => {
|
|
102
|
+
y || (y = requestAnimationFrame(() => {
|
|
103
|
+
y = 0, b();
|
|
104
|
+
}));
|
|
105
|
+
});
|
|
106
|
+
return _ == null || _.observe(e, { childList: !0, subtree: !0 }), () => {
|
|
107
|
+
E.disconnect(), _ == null || _.disconnect(), y && cancelAnimationFrame(y);
|
|
29
108
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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));
|
|
109
|
+
}), R(() => {
|
|
110
|
+
if (!r) return;
|
|
111
|
+
const e = (b) => {
|
|
112
|
+
b.key !== "Escape" || !j(b, t.current) || (b.stopPropagation(), a(!1));
|
|
39
113
|
};
|
|
40
114
|
return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
|
|
41
|
-
}, [
|
|
42
|
-
if (!
|
|
43
|
-
const e = (
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
115
|
+
}, [r]), R(() => {
|
|
116
|
+
if (!r) return;
|
|
117
|
+
const e = (E) => {
|
|
118
|
+
const v = E.target;
|
|
119
|
+
if (v.closest("[data-nvr-header-tools-panel]") || v.closest("[data-nvr-header-tools-btn]") || v.closest("[data-nvr-header-menu-panel]") || v.closest("[data-radix-popper-content-wrapper]"))
|
|
46
120
|
return;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
121
|
+
const y = v.closest('[role="dialog"]');
|
|
122
|
+
y && !y.contains(t.current) || a(!1);
|
|
123
|
+
}, b = (E) => {
|
|
124
|
+
E.target.closest("[data-nvr-header-menu-panel] [data-nvr-menu-close]") && a(!1);
|
|
51
125
|
};
|
|
52
|
-
return window.addEventListener("mousedown", e, !0), window.addEventListener("click",
|
|
53
|
-
window.removeEventListener("mousedown", e, !0), window.removeEventListener("click",
|
|
126
|
+
return window.addEventListener("mousedown", e, !0), window.addEventListener("click", b), () => {
|
|
127
|
+
window.removeEventListener("mousedown", e, !0), window.removeEventListener("click", b);
|
|
54
128
|
};
|
|
55
|
-
}, [
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
const
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
129
|
+
}, [r]), !n)
|
|
130
|
+
return /* @__PURE__ */ w("div", { ref: t, className: "contents", "data-nvr-header-tools": "inline", children: /* @__PURE__ */ w(N.Provider, { value: !0, children: i }) });
|
|
131
|
+
const h = r ? (x = s.current) == null ? void 0 : x.getBoundingClientRect() : void 0, l = ((k = s.current) == null ? void 0 : k.closest('[role="dialog"]')) ?? document.body, g = h ? h.right - (l === document.body ? 0 : l.getBoundingClientRect().left) - 16 : 440;
|
|
132
|
+
return /* @__PURE__ */ L("div", { ref: t, className: "flex shrink-0 items-center", "data-nvr-header-tools": "folded", children: [
|
|
133
|
+
/* @__PURE__ */ w(
|
|
60
134
|
"button",
|
|
61
135
|
{
|
|
62
|
-
ref:
|
|
136
|
+
ref: s,
|
|
63
137
|
type: "button",
|
|
64
138
|
"data-nvr-header-tools-btn": !0,
|
|
65
|
-
"aria-expanded":
|
|
139
|
+
"aria-expanded": r,
|
|
66
140
|
"aria-label": "More tools",
|
|
67
141
|
"data-tip": "More tools",
|
|
68
|
-
onClick: () =>
|
|
69
|
-
className:
|
|
142
|
+
onClick: () => a((e) => !e),
|
|
143
|
+
className: W(
|
|
70
144
|
"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",
|
|
71
|
-
|
|
145
|
+
r && "bg-accent text-accent-foreground dark:bg-accent"
|
|
72
146
|
),
|
|
73
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ w(F, { className: "h-4 w-4" })
|
|
74
148
|
}
|
|
75
149
|
),
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
150
|
+
d.current && P(
|
|
151
|
+
/* @__PURE__ */ w(
|
|
78
152
|
"div",
|
|
79
153
|
{
|
|
154
|
+
ref: c,
|
|
80
155
|
"data-nvr-header-tools-panel": !0,
|
|
81
|
-
style: h === document.body ? {
|
|
156
|
+
style: r && h ? l === document.body ? {
|
|
82
157
|
position: "fixed",
|
|
83
|
-
top:
|
|
84
|
-
right: Math.max(8, window.innerWidth -
|
|
85
|
-
maxWidth: Math.min(440,
|
|
158
|
+
top: h.bottom + 6,
|
|
159
|
+
right: Math.max(8, window.innerWidth - h.right),
|
|
160
|
+
maxWidth: Math.min(440, g),
|
|
86
161
|
zIndex: 110
|
|
87
162
|
} : {
|
|
88
163
|
position: "absolute",
|
|
89
|
-
top:
|
|
90
|
-
right: Math.max(8,
|
|
91
|
-
maxWidth: Math.min(440,
|
|
164
|
+
top: h.bottom - l.getBoundingClientRect().top + 6,
|
|
165
|
+
right: Math.max(8, l.getBoundingClientRect().right - h.right),
|
|
166
|
+
maxWidth: Math.min(440, g),
|
|
92
167
|
zIndex: 110
|
|
93
|
-
},
|
|
168
|
+
} : { display: "none" },
|
|
94
169
|
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",
|
|
95
|
-
children:
|
|
170
|
+
children: /* @__PURE__ */ w(N.Provider, { value: r, children: i })
|
|
96
171
|
}
|
|
97
172
|
),
|
|
98
|
-
|
|
173
|
+
l
|
|
99
174
|
)
|
|
100
175
|
] });
|
|
101
176
|
}
|
|
102
|
-
function
|
|
103
|
-
const [
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
const
|
|
108
|
-
if (!t || !
|
|
109
|
-
!t &&
|
|
177
|
+
function ne(i, t) {
|
|
178
|
+
const [s, n] = M(!1), p = m(!1);
|
|
179
|
+
p.current = s;
|
|
180
|
+
const f = m(0);
|
|
181
|
+
return R(() => {
|
|
182
|
+
const o = i.current, u = o == null ? void 0 : o.closest("[data-nvr-header-row]");
|
|
183
|
+
if (!t || !o || !u) {
|
|
184
|
+
!t && p.current && n(!1);
|
|
110
185
|
return;
|
|
111
186
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
187
|
+
o.setAttribute("data-nvr-header-fold", p.current ? "folded" : "inline");
|
|
188
|
+
const r = () => {
|
|
189
|
+
if (p.current)
|
|
190
|
+
f.current > 0 && u.clientWidth > f.current + 32 && n(!1);
|
|
115
191
|
else {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if ((r == null ? void 0 : r.getAttribute("data-nvr-header-tools")) === "inline" && r.childElementCount > 0)
|
|
192
|
+
const h = u.scrollWidth > u.clientWidth + 2, l = u.querySelector("[data-nvr-header-tools]");
|
|
193
|
+
if ((l == null ? void 0 : l.getAttribute("data-nvr-header-tools")) === "inline" && l.childElementCount > 0)
|
|
119
194
|
return;
|
|
120
|
-
|
|
195
|
+
const g = h ? 0 : O(u, o.parentElement);
|
|
196
|
+
if (!h && g <= 0) return;
|
|
197
|
+
f.current = h ? u.scrollWidth : u.clientWidth + g, n(!0);
|
|
121
198
|
}
|
|
122
199
|
};
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
200
|
+
r();
|
|
201
|
+
const a = new ResizeObserver(r);
|
|
202
|
+
a.observe(u), o.parentElement && o.parentElement !== u && a.observe(o.parentElement);
|
|
203
|
+
let c = 0;
|
|
204
|
+
const d = typeof MutationObserver > "u" ? null : new MutationObserver(() => {
|
|
205
|
+
c || (c = requestAnimationFrame(() => {
|
|
206
|
+
c = 0, r();
|
|
207
|
+
}));
|
|
208
|
+
});
|
|
209
|
+
return d == null || d.observe(u, { childList: !0, subtree: !0 }), () => {
|
|
210
|
+
a.disconnect(), d == null || d.disconnect(), c && cancelAnimationFrame(c);
|
|
211
|
+
};
|
|
212
|
+
}), R(() => {
|
|
213
|
+
var o;
|
|
214
|
+
t || (o = i.current) == null || o.removeAttribute("data-nvr-header-fold");
|
|
215
|
+
}, [t, i]), s;
|
|
127
216
|
}
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
-
return Math.max(8, Math.min(
|
|
217
|
+
const V = 240;
|
|
218
|
+
function z(i, t) {
|
|
219
|
+
return Math.max(8, Math.min(i, t - V - 8));
|
|
131
220
|
}
|
|
132
|
-
function
|
|
133
|
-
children:
|
|
221
|
+
function re({
|
|
222
|
+
children: i,
|
|
134
223
|
label: t = "More",
|
|
135
|
-
className:
|
|
224
|
+
className: s
|
|
136
225
|
}) {
|
|
137
|
-
var
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
g
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
226
|
+
var d, h;
|
|
227
|
+
const n = m(null), p = m(null), [f, o] = M(!1), u = m(!1);
|
|
228
|
+
f && (u.current = !0), G(
|
|
229
|
+
f,
|
|
230
|
+
() => o(!1),
|
|
231
|
+
(l) => {
|
|
232
|
+
var g;
|
|
233
|
+
return !!((g = p.current) != null && g.contains(l));
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
const r = K(N);
|
|
237
|
+
R(() => {
|
|
238
|
+
r || o(!1);
|
|
239
|
+
}, [r]), R(() => {
|
|
240
|
+
if (!f) return;
|
|
241
|
+
const l = (x) => {
|
|
242
|
+
var e;
|
|
243
|
+
const k = x.target;
|
|
244
|
+
k.closest("[data-nvr-header-menu-panel]") || k.closest("[data-nvr-header-menu-btn]") || k.closest("[data-radix-popper-content-wrapper]") || // A dialog opened from a menu row, not one hosting the form.
|
|
245
|
+
k.closest('[role="dialog"]') && !((e = k.closest('[role="dialog"]')) != null && e.contains(n.current)) || o(!1);
|
|
246
|
+
}, g = (x) => {
|
|
247
|
+
x.key !== "Escape" || !j(x, n.current) || (x.stopPropagation(), o(!1));
|
|
148
248
|
};
|
|
149
|
-
return window.addEventListener("mousedown",
|
|
150
|
-
window.removeEventListener("mousedown",
|
|
249
|
+
return window.addEventListener("mousedown", l, !0), window.addEventListener("keydown", g, !0), () => {
|
|
250
|
+
window.removeEventListener("mousedown", l, !0), window.removeEventListener("keydown", g, !0);
|
|
151
251
|
};
|
|
152
|
-
}, [
|
|
153
|
-
const
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
252
|
+
}, [f]);
|
|
253
|
+
const a = f ? (d = n.current) == null ? void 0 : d.getBoundingClientRect() : void 0, c = ((h = n.current) == null ? void 0 : h.closest('[role="dialog"]')) ?? document.body;
|
|
254
|
+
return /* @__PURE__ */ L("div", { className: W("relative shrink-0", s), children: [
|
|
255
|
+
/* @__PURE__ */ L(
|
|
156
256
|
"button",
|
|
157
257
|
{
|
|
158
|
-
ref:
|
|
258
|
+
ref: n,
|
|
159
259
|
type: "button",
|
|
160
260
|
"data-nvr-header-menu-btn": !0,
|
|
161
261
|
"aria-haspopup": "menu",
|
|
162
|
-
"aria-expanded":
|
|
262
|
+
"aria-expanded": f,
|
|
163
263
|
"aria-label": t,
|
|
164
264
|
"data-tip": "More actions",
|
|
165
|
-
onClick: () =>
|
|
166
|
-
className:
|
|
265
|
+
onClick: () => o((l) => !l),
|
|
266
|
+
className: W(
|
|
167
267
|
"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",
|
|
168
|
-
|
|
268
|
+
f && "bg-accent text-accent-foreground dark:bg-accent"
|
|
169
269
|
),
|
|
170
270
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ w(F, { className: "h-4 w-4" }),
|
|
272
|
+
/* @__PURE__ */ w("span", { className: "hidden lg:inline", children: t })
|
|
173
273
|
]
|
|
174
274
|
}
|
|
175
275
|
),
|
|
176
|
-
|
|
177
|
-
/* @__PURE__ */
|
|
276
|
+
u.current && P(
|
|
277
|
+
/* @__PURE__ */ w(
|
|
178
278
|
"div",
|
|
179
279
|
{
|
|
280
|
+
ref: p,
|
|
180
281
|
"data-nvr-header-menu-panel": !0,
|
|
181
282
|
role: "menu",
|
|
182
|
-
onClick: (
|
|
183
|
-
|
|
283
|
+
onClick: (l) => {
|
|
284
|
+
l.target.closest("[data-nvr-menu-close]") && o(!1);
|
|
184
285
|
},
|
|
185
|
-
style:
|
|
286
|
+
style: f && a ? c === document.body ? {
|
|
186
287
|
position: "fixed",
|
|
187
|
-
top:
|
|
188
|
-
right:
|
|
288
|
+
top: a.bottom + 6,
|
|
289
|
+
right: z(window.innerWidth - a.right, window.innerWidth),
|
|
189
290
|
zIndex: 110
|
|
190
291
|
} : {
|
|
191
292
|
position: "absolute",
|
|
192
|
-
top:
|
|
193
|
-
right:
|
|
194
|
-
|
|
195
|
-
|
|
293
|
+
top: a.bottom - c.getBoundingClientRect().top + 6,
|
|
294
|
+
right: z(
|
|
295
|
+
c.getBoundingClientRect().right - a.right,
|
|
296
|
+
c.getBoundingClientRect().width
|
|
196
297
|
),
|
|
197
298
|
zIndex: 110
|
|
198
|
-
},
|
|
199
|
-
className:
|
|
299
|
+
} : { display: "none" },
|
|
300
|
+
className: W(
|
|
200
301
|
"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",
|
|
201
302
|
"[&_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",
|
|
202
303
|
"[&_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",
|
|
203
304
|
"[&>[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"
|
|
204
305
|
),
|
|
205
|
-
children:
|
|
306
|
+
children: i
|
|
206
307
|
}
|
|
207
308
|
),
|
|
208
|
-
|
|
309
|
+
c
|
|
209
310
|
)
|
|
210
311
|
] });
|
|
211
312
|
}
|
|
212
|
-
function
|
|
213
|
-
children:
|
|
313
|
+
function oe({
|
|
314
|
+
children: i,
|
|
214
315
|
className: t
|
|
215
316
|
}) {
|
|
216
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ w(
|
|
217
318
|
"div",
|
|
218
319
|
{
|
|
219
320
|
"data-nvr-header-tool-group": !0,
|
|
220
|
-
className:
|
|
321
|
+
className: W(
|
|
221
322
|
"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",
|
|
222
323
|
t
|
|
223
324
|
),
|
|
224
|
-
children:
|
|
325
|
+
children: i
|
|
225
326
|
}
|
|
226
327
|
);
|
|
227
328
|
}
|
|
228
329
|
export {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
330
|
+
re as HeaderMenu,
|
|
331
|
+
oe as HeaderToolGroup,
|
|
332
|
+
te as HeaderTools,
|
|
333
|
+
z as menuRight,
|
|
334
|
+
J as openedLayerIn,
|
|
335
|
+
O as titleChipDeficit,
|
|
336
|
+
G as useCloseWhenRowOpensLayer,
|
|
337
|
+
ne as useHeaderFold
|
|
234
338
|
};
|