@nivaro/react 0.2.56 → 0.3.1
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/TasksSlot.js +31 -29
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +414 -1
- package/dist/index.js +767 -716
- package/dist/shared/components/ClientChaosToolbar.js +410 -0
- package/dist/shared/components/ItemEditForm.js +666 -658
- package/dist/shared/components/LoadErrorNote.js +49 -0
- package/dist/shared/components/MyWorkView.js +47 -37
- package/dist/shared/components/PretendDown.js +258 -0
- package/dist/shared/components/ProfileView.js +208 -184
- package/dist/shared/components/QueryErrorState.js +16 -0
- package/dist/shared/components/ReportView.js +1351 -1338
- package/dist/shared/components/WidgetSlot.js +438 -418
- package/dist/shared/components/ai/AiPlanCard.js +427 -0
- package/dist/shared/components/ai/AiPlanChanges.js +117 -0
- package/dist/shared/components/ai/TaskDo.js +1022 -0
- package/dist/shared/components/chaos/DeclareIncidentButton.js +72 -0
- package/dist/shared/components/chaos/DrillBanner.js +119 -0
- package/dist/shared/components/chaos/DrillTag.js +62 -0
- package/dist/shared/components/chaos/GameDayStrip.js +61 -0
- package/dist/shared/components/chat/ChatAnalyticsView.js +19 -17
- package/dist/shared/components/chat/ChatPanel.js +1356 -1317
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +198 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +78 -65
- package/dist/shared/components/chat/chat-core.js +273 -264
- package/dist/shared/components/chat/huddle/HuddleAudioUi.js +397 -0
- package/dist/shared/components/chat/huddle/HuddleCallBar.js +296 -0
- package/dist/shared/components/chat/huddle/HuddleCallLayer.js +180 -0
- package/dist/shared/components/chat/huddle/HuddleCamera.js +124 -0
- package/dist/shared/components/chat/huddle/HuddleCollab.js +320 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +82 -121
- package/dist/shared/components/chat/huddle/HuddleDraw.js +231 -0
- package/dist/shared/components/chat/huddle/HuddleLiveBadge.js +52 -0
- package/dist/shared/components/chat/huddle/HuddlePeoplePicker.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleScheduleCard.js +190 -0
- package/dist/shared/components/chat/huddle/HuddleScheduleForm.js +188 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +184 -89
- package/dist/shared/components/chat/huddle/HuddleStageTools.js +197 -0
- package/dist/shared/components/chat/huddle/huddle-audio-logic.js +156 -0
- package/dist/shared/components/chat/huddle/huddle-audio.js +69 -0
- package/dist/shared/components/chat/huddle/huddle-calls.js +129 -0
- package/dist/shared/components/chat/huddle/huddle-camera.js +143 -0
- package/dist/shared/components/chat/huddle/huddle-collab-store.js +391 -0
- package/dist/shared/components/chat/huddle/huddle-device-prefs.js +55 -0
- package/dist/shared/components/chat/huddle/huddle-devices.js +99 -0
- package/dist/shared/components/chat/huddle/huddle-draw.js +226 -0
- package/dist/shared/components/chat/huddle/huddle-follow-bus.js +96 -0
- package/dist/shared/components/chat/huddle/huddle-hold.js +62 -0
- package/dist/shared/components/chat/huddle/huddle-link-quality.js +159 -0
- package/dist/shared/components/chat/huddle/huddle-live.js +82 -0
- package/dist/shared/components/chat/huddle/huddle-pip.js +343 -0
- package/dist/shared/components/chat/huddle/huddle-quality.js +22 -0
- package/dist/shared/components/chat/huddle/huddle-reactions.js +71 -0
- package/dist/shared/components/chat/huddle/huddle-ring-refused.js +34 -0
- package/dist/shared/components/chat/huddle/huddle-schedule.js +102 -0
- package/dist/shared/components/chat/huddle/huddle-sfu.js +176 -0
- package/dist/shared/components/chat/huddle/huddle-shortcuts.js +91 -0
- package/dist/shared/components/chat/huddle/huddle-speaking.js +100 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +431 -157
- package/dist/shared/components/chat/huddle/useHuddle.js +46 -38
- package/dist/shared/components/chat/huddle/useHuddleAudio.js +35 -0
- package/dist/shared/components/client-chaos-gate.js +51 -0
- package/dist/shared/components/integrations/console/SignalCard.js +172 -167
- package/dist/shared/components/item-edit/GroupSection.js +1 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +68 -59
- package/dist/shared/components/item-edit/UserChip.js +145 -142
- package/dist/shared/components/layout-editor/EditorTopBar.js +108 -105
- package/dist/shared/components/layout-editor/LayoutEditor.js +514 -508
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +18 -10
- package/dist/shared/components/panels/TaskPanel.js +51 -49
- package/dist/shared/components/pipeline/PipelineEditorView.js +495 -479
- package/dist/shared/components/pipeline/TeamsView.js +184 -169
- package/dist/shared/components/support/TicketDetailSheet.js +57 -42
- package/dist/shared/lib/client-chaos.js +359 -0
- package/dist/shared/lib/load-error.js +26 -0
- package/dist/shared/lib/notification-sound.js +25 -16
- package/dist/shared/lib/socket-realtime.js +31 -30
- package/dist/shared/lib/worker-socket.js +108 -89
- package/package.json +2 -1
|
@@ -709,6 +709,7 @@ function Ln({
|
|
|
709
709
|
"div",
|
|
710
710
|
{
|
|
711
711
|
"data-loads-on-open": se ? "" : void 0,
|
|
712
|
+
"data-section-key": t.key,
|
|
712
713
|
className: W(
|
|
713
714
|
"nvr-section-enter rounded-xl border border-slate-200 bg-white dark:bg-card dark:border-border",
|
|
714
715
|
o && "bg-slate-50/60 dark:bg-slate-900/20",
|
|
@@ -1,115 +1,124 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { MessageSquare as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as $, useMutation as P } from "@tanstack/react-query";
|
|
3
|
+
import { MessageSquare as T, X as A, Send as H, ChevronDown as I } from "lucide-react";
|
|
4
|
+
import { useState as w, useRef as K, useEffect as M } from "react";
|
|
5
5
|
import { toast as q } from "sonner";
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as j, post as
|
|
8
|
-
import { useRecordRoomTypes as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import { useNivaroClient as W } from "../../context.js";
|
|
7
|
+
import { get as j, post as z } from "../../lib/commands.js";
|
|
8
|
+
import { useRecordRoomTypes as B, canOpenChatRoom as Q, openChatRoom as X } from "../chat/chat-core.js";
|
|
9
|
+
import { HuddleLiveBadge as _ } from "../chat/huddle/HuddleLiveBadge.js";
|
|
10
|
+
import { useHuddleLive as D } from "../chat/huddle/huddle-live.js";
|
|
11
|
+
import { SimpleSelect as G } from "../ui/SimpleSelect.js";
|
|
12
|
+
function ae({
|
|
13
|
+
collection: u,
|
|
14
|
+
itemDraft: h,
|
|
15
|
+
compact: s
|
|
14
16
|
}) {
|
|
15
|
-
const f =
|
|
16
|
-
queryKey: ["nvr-chat-record-room",
|
|
17
|
+
const f = W(), [c, l] = w(!1), [b, O] = w(""), [p, y] = w(""), N = K(null), x = B(), a = x == null ? void 0 : x.find((e) => e.collection === u), n = a ? String(h[a.match_field] ?? "").trim() : "", g = h.id == null ? "" : String(h.id), { data: r } = $({
|
|
18
|
+
queryKey: ["nvr-chat-record-room", u, g],
|
|
17
19
|
queryFn: async () => (await f.request(
|
|
18
20
|
j(
|
|
19
21
|
"/chat/record-room",
|
|
20
|
-
{ collection:
|
|
22
|
+
{ collection: u, item: g }
|
|
21
23
|
)
|
|
22
24
|
)).data ?? null,
|
|
23
|
-
enabled: !!
|
|
25
|
+
enabled: !!a && !!n && !!g,
|
|
24
26
|
staleTime: 3e4,
|
|
25
27
|
refetchInterval: 6e4
|
|
26
|
-
}),
|
|
28
|
+
}), o = (r == null ? void 0 : r.unread) ?? 0, k = D(), L = k.countFor(r == null ? void 0 : r.room) || k.countFor(a && n ? `${a.prefix}:${n}` : null), { data: F } = $({
|
|
27
29
|
queryKey: ["nvr-chat-share-rooms"],
|
|
28
30
|
queryFn: async () => ((await f.request(j("/chat/rooms"))).data ?? []).filter((m) => m.kind !== "entity"),
|
|
29
31
|
enabled: c,
|
|
30
32
|
staleTime: 3e4
|
|
31
|
-
}),
|
|
33
|
+
}), v = P({
|
|
32
34
|
mutationFn: () => f.request(
|
|
33
|
-
|
|
35
|
+
z("/chat/messages", {
|
|
34
36
|
room: b,
|
|
35
|
-
message: p.trim() ? `${p.trim()} ${
|
|
37
|
+
message: p.trim() ? `${p.trim()} ${n}` : n,
|
|
36
38
|
mentions: []
|
|
37
39
|
})
|
|
38
40
|
),
|
|
39
41
|
onSuccess: () => {
|
|
40
|
-
q.success("Shared to chat"),
|
|
42
|
+
q.success("Shared to chat"), l(!1), y("");
|
|
41
43
|
},
|
|
42
44
|
onError: () => q.error("Could not share to that room")
|
|
43
45
|
});
|
|
44
|
-
if (
|
|
46
|
+
if (M(() => {
|
|
45
47
|
if (!c) return;
|
|
46
48
|
const e = (m) => {
|
|
47
|
-
var
|
|
49
|
+
var S, R;
|
|
48
50
|
const d = m.target;
|
|
49
|
-
(
|
|
51
|
+
(S = d == null ? void 0 : d.closest) != null && S.call(d, '[data-radix-popper-content-wrapper], [role="listbox"]') || (R = N.current) != null && R.contains(m.target) || l(!1);
|
|
50
52
|
};
|
|
51
53
|
return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
|
|
52
|
-
}, [c]), !
|
|
53
|
-
const E = `${
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
54
|
+
}, [c]), !a || !n) return null;
|
|
55
|
+
const E = `${a.prefix}:${n}`, C = Q();
|
|
56
|
+
return /* @__PURE__ */ i("div", { ref: N, className: "relative", children: [
|
|
57
|
+
/* @__PURE__ */ i(
|
|
56
58
|
"div",
|
|
57
59
|
{
|
|
58
|
-
className:
|
|
60
|
+
className: s ? "inline-flex h-8 items-stretch text-sm font-medium" : "inline-flex h-9 items-stretch overflow-hidden rounded-md border border-input bg-background text-sm font-medium shadow-sm",
|
|
59
61
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ i(
|
|
61
63
|
"button",
|
|
62
64
|
{
|
|
63
65
|
type: "button",
|
|
64
66
|
onClick: () => {
|
|
65
|
-
|
|
67
|
+
C ? X(E, n) : l((e) => !e);
|
|
66
68
|
},
|
|
67
|
-
title:
|
|
68
|
-
"aria-label":
|
|
69
|
-
className:
|
|
69
|
+
title: o ? `${o} unread in this record's chat` : r != null && r.messages ? `Open this record's chat · ${r.messages} messages` : "Open this record's chat room",
|
|
70
|
+
"aria-label": o ? `Open this record's chat room, ${o} unread` : "Open this record's chat room",
|
|
71
|
+
className: s ? "relative inline-flex w-8 items-center justify-center transition-colors hover:bg-accent hover:text-accent-foreground" : "inline-flex items-center gap-1.5 px-3 transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
70
72
|
"data-record-chat": !0,
|
|
71
|
-
"data-record-chat-unread":
|
|
73
|
+
"data-record-chat-unread": o || void 0,
|
|
72
74
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
!
|
|
75
|
-
|
|
75
|
+
/* @__PURE__ */ t(T, { className: s ? "h-4 w-4" : "h-3.5 w-3.5", strokeWidth: 2 }),
|
|
76
|
+
!s && "Chat",
|
|
77
|
+
/* @__PURE__ */ t(
|
|
78
|
+
_,
|
|
79
|
+
{
|
|
80
|
+
count: L,
|
|
81
|
+
className: s ? "absolute -bottom-0.5 -right-0.5 bg-card px-1 py-0" : void 0
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
o > 0 && (s ? /* @__PURE__ */ t("span", { className: "absolute right-0.5 top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-red-500 px-0.5 text-[9px] font-bold leading-none text-white", children: o > 9 ? "9+" : o }) : /* @__PURE__ */ t("span", { className: "flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-bold text-white", children: o > 99 ? "99+" : o }))
|
|
76
85
|
]
|
|
77
86
|
}
|
|
78
87
|
),
|
|
79
|
-
|
|
88
|
+
C && /* @__PURE__ */ t(
|
|
80
89
|
"button",
|
|
81
90
|
{
|
|
82
91
|
type: "button",
|
|
83
|
-
onClick: () =>
|
|
92
|
+
onClick: () => l((e) => !e),
|
|
84
93
|
title: "Send this record to a room",
|
|
85
94
|
"aria-label": "Send this record to a room",
|
|
86
|
-
className:
|
|
95
|
+
className: s ? "inline-flex items-center px-1 transition-colors hover:bg-accent hover:text-accent-foreground" : "inline-flex items-center border-l border-input px-1.5 transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
87
96
|
"data-record-chat-more": !0,
|
|
88
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ t(I, { className: "h-3 w-3", strokeWidth: 2 })
|
|
89
98
|
}
|
|
90
99
|
)
|
|
91
100
|
]
|
|
92
101
|
}
|
|
93
102
|
),
|
|
94
|
-
c && /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
103
|
+
c && /* @__PURE__ */ i("div", { className: "absolute right-0 top-full z-30 mt-1 w-[260px] rounded-lg border border-slate-200 bg-white p-2.5 shadow-lg dark:border-border dark:bg-card", children: [
|
|
104
|
+
/* @__PURE__ */ i("div", { className: "mb-1.5 flex items-center justify-between", children: [
|
|
105
|
+
/* @__PURE__ */ i("p", { className: "text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: [
|
|
97
106
|
"Share ",
|
|
98
|
-
|
|
107
|
+
n
|
|
99
108
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ t(
|
|
101
110
|
"button",
|
|
102
111
|
{
|
|
103
112
|
type: "button",
|
|
104
|
-
onClick: () =>
|
|
113
|
+
onClick: () => l(!1),
|
|
105
114
|
className: "text-slate-400 hover:text-slate-600",
|
|
106
115
|
"aria-label": "Close",
|
|
107
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ t(A, { className: "h-3.5 w-3.5" })
|
|
108
117
|
}
|
|
109
118
|
)
|
|
110
119
|
] }),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
120
|
+
/* @__PURE__ */ t(
|
|
121
|
+
G,
|
|
113
122
|
{
|
|
114
123
|
value: b,
|
|
115
124
|
onChange: O,
|
|
@@ -117,11 +126,11 @@ function ee({
|
|
|
117
126
|
className: "mb-1.5 w-full",
|
|
118
127
|
options: [
|
|
119
128
|
{ value: "", label: "Pick a room…" },
|
|
120
|
-
...(
|
|
129
|
+
...(F ?? []).map((e) => ({ value: e.room, label: e.label ?? e.room }))
|
|
121
130
|
]
|
|
122
131
|
}
|
|
123
132
|
),
|
|
124
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ t(
|
|
125
134
|
"textarea",
|
|
126
135
|
{
|
|
127
136
|
value: p,
|
|
@@ -132,17 +141,17 @@ function ee({
|
|
|
132
141
|
"aria-label": "Note"
|
|
133
142
|
}
|
|
134
143
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ i(
|
|
136
145
|
"button",
|
|
137
146
|
{
|
|
138
147
|
type: "button",
|
|
139
|
-
disabled: !b ||
|
|
140
|
-
onClick: () =>
|
|
148
|
+
disabled: !b || v.isPending,
|
|
149
|
+
onClick: () => v.mutate(),
|
|
141
150
|
className: "flex h-8 w-full items-center justify-center gap-1.5 rounded-md bg-nvr-cyan text-[12px] font-medium text-white hover:brightness-110 disabled:opacity-40",
|
|
142
151
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ t(H, { className: "h-3.5 w-3.5" }),
|
|
144
153
|
" ",
|
|
145
|
-
|
|
154
|
+
v.isPending ? "Sending…" : "Send"
|
|
146
155
|
]
|
|
147
156
|
}
|
|
148
157
|
)
|
|
@@ -150,5 +159,5 @@ function ee({
|
|
|
150
159
|
] });
|
|
151
160
|
}
|
|
152
161
|
export {
|
|
153
|
-
|
|
162
|
+
ae as RecordChatActions
|
|
154
163
|
};
|