@fayz-ai/plugin-conversations 0.36.0 → 0.37.0
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/{ConversationsPage-AV34J5DY.js → ConversationsPage-KCKQMEVL.js} +21 -15
- package/dist/ConversationsPage-KCKQMEVL.js.map +1 -0
- package/dist/{chunk-NWH5AIUH.js → chunk-GYEAIN3O.js} +21 -4
- package/dist/chunk-GYEAIN3O.js.map +1 -0
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/supabase.d.ts.map +1 -1
- package/dist/data/types.d.ts +2 -0
- package/dist/data/types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/store.d.ts +7 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/views/MessageThread.d.ts.map +1 -1
- package/dist/views/useCaixaAoVivo.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/ConversationsPage-AV34J5DY.js.map +0 -1
- package/dist/chunk-NWH5AIUH.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConversationsContextProvider, useConversationsStore, assinarChegada, useConversationsConfig, CHANNEL_LABELS, currentUserId, isWaitingOnUs, MessagePreview, mediaPreviewKind } from './chunk-
|
|
1
|
+
import { ConversationsContextProvider, useConversationsStore, assinarChegada, useConversationsConfig, CHANNEL_LABELS, currentUserId, isWaitingOnUs, MessagePreview, mediaPreviewKind } from './chunk-GYEAIN3O.js';
|
|
2
2
|
import { providersApi } from './chunk-HMWUU5O7.js';
|
|
3
3
|
import * as React7 from 'react';
|
|
4
4
|
import React7__default from 'react';
|
|
5
|
-
import { SquarePen, MessageSquare, LifeBuoy, Globe, Mail, Instagram, Phone, Search, Inbox, User, Archive, CheckCheck, ChevronLeft, MoreHorizontal, ArchiveRestore, X, Building2, MoreVertical, Loader2, Forward, AlertTriangle, Check, Clock, ExternalLink, Reply, FileText, Trash2, Paperclip, Square, Mic, Send, Snowflake, Sun, Flame, Ban, BarChart3, MapPin, UserRound, Copy, Download } from 'lucide-react';
|
|
5
|
+
import { SquarePen, MessageSquare, LifeBuoy, Globe, Mail, Instagram, Phone, Search, Inbox, User, Archive, CheckCheck, ChevronLeft, MoreHorizontal, MailWarning, ArchiveRestore, X, Building2, MoreVertical, Loader2, Forward, AlertTriangle, Check, Clock, ExternalLink, Reply, FileText, Trash2, Paperclip, Square, Mic, Send, Snowflake, Sun, Flame, Ban, BarChart3, MapPin, UserRound, Copy, Download } from 'lucide-react';
|
|
6
6
|
import { PageHeaderActions, cn, Button, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, Textarea, ModalFooter, Input, FilterChip, Skeleton, Dropdown, DropdownTrigger, DropdownContent, DropdownItem, toast } from '@fayz-ai/ui';
|
|
7
7
|
import { useRightRailStore, PageActions, useLimitGuard, ContactPicker, invalidateLimit, useConnectors } from '@fayz-ai/admin';
|
|
8
8
|
import { currentAppPath, appHref, onAppPathChange, replaceApp, useTranslation, useActiveTenantId, errorMessage, getSupabaseClientOptional, getActiveTenantId } from '@fayz-ai/core';
|
|
@@ -1171,7 +1171,7 @@ function buildRows(messages) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
function MessageThread({ selected, onTogglePanel, panelOpen, onBack, backAlways, className }) {
|
|
1173
1173
|
const t = useTranslation();
|
|
1174
|
-
const { messages, sending, send, sendMedia, setStatus, refreshMessages } = useConversationsStore((s) => s);
|
|
1174
|
+
const { messages, sending, send, sendMedia, setStatus, refreshMessages, markUnread } = useConversationsStore((s) => s);
|
|
1175
1175
|
const win = useSendWindow(selected.id, selected.channel === "whatsapp" ? selected.contactHandle : void 0);
|
|
1176
1176
|
const canType = win.mode.kind === "free";
|
|
1177
1177
|
const threadRef = React7__default.useRef(null);
|
|
@@ -1254,15 +1254,21 @@ function MessageThread({ selected, onTogglePanel, panelOpen, onBack, backAlways,
|
|
|
1254
1254
|
] }),
|
|
1255
1255
|
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-1.5", onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs(Dropdown, { children: [
|
|
1256
1256
|
/* @__PURE__ */ jsx(DropdownTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", "aria-label": t("conversations.thread.more"), children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }),
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1257
|
+
/* @__PURE__ */ jsxs(DropdownContent, { align: "end", children: [
|
|
1258
|
+
/* @__PURE__ */ jsxs(DropdownItem, { onSelect: () => void markUnread(selected.id), children: [
|
|
1259
|
+
/* @__PURE__ */ jsx(MailWarning, { className: "mr-2 h-3.5 w-3.5" }),
|
|
1260
|
+
" Marcar como n\xE3o lida"
|
|
1261
|
+
] }),
|
|
1262
|
+
selected.status === "closed" ? /* @__PURE__ */ jsxs(DropdownItem, { onSelect: () => setStatus("open"), children: [
|
|
1263
|
+
/* @__PURE__ */ jsx(ArchiveRestore, { className: "mr-2 h-3.5 w-3.5" }),
|
|
1264
|
+
" ",
|
|
1265
|
+
t("conversations.thread.unarchive")
|
|
1266
|
+
] }) : /* @__PURE__ */ jsxs(DropdownItem, { onSelect: () => setStatus("closed"), children: [
|
|
1267
|
+
/* @__PURE__ */ jsx(Archive, { className: "mr-2 h-3.5 w-3.5" }),
|
|
1268
|
+
" ",
|
|
1269
|
+
t("conversations.thread.archive")
|
|
1270
|
+
] })
|
|
1271
|
+
] })
|
|
1266
1272
|
] }) })
|
|
1267
1273
|
]
|
|
1268
1274
|
}
|
|
@@ -1748,7 +1754,7 @@ function useCaixaAoVivo() {
|
|
|
1748
1754
|
React7.useEffect(() => {
|
|
1749
1755
|
if (!tenantId) return;
|
|
1750
1756
|
return assinarChegada(tenantId, ({ conversationId }) => {
|
|
1751
|
-
void load();
|
|
1757
|
+
void load({ autoSelect: false });
|
|
1752
1758
|
if (conversationId && conversationId === abertoRef.current) {
|
|
1753
1759
|
void refreshMessages();
|
|
1754
1760
|
}
|
|
@@ -1895,5 +1901,5 @@ function ConversationsPage({ store, config }) {
|
|
|
1895
1901
|
}
|
|
1896
1902
|
|
|
1897
1903
|
export { ConversationsPage, conversationIdFromPath };
|
|
1898
|
-
//# sourceMappingURL=ConversationsPage-
|
|
1899
|
-
//# sourceMappingURL=ConversationsPage-
|
|
1904
|
+
//# sourceMappingURL=ConversationsPage-KCKQMEVL.js.map
|
|
1905
|
+
//# sourceMappingURL=ConversationsPage-KCKQMEVL.js.map
|