@fayz-ai/plugin-conversations 0.23.5 → 0.23.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"InboxWatcher.d.ts","sourceRoot":"","sources":["../../src/components/InboxWatcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAyGpD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAwB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACzF;;yEAEqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;+CAC2C;IAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;IACtC,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,qBA0HA"}
1
+ {"version":3,"file":"InboxWatcher.d.ts","sourceRoot":"","sources":["../../src/components/InboxWatcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAsDpD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAwB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACzF;;yEAEqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;+CAC2C;IAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;IACtC,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,qBA0HA"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import * as React14 from 'react';
2
2
  import React14__default, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
3
3
  import { Loader2, Check, ShieldCheck, ShieldAlert, RefreshCw, QrCode, Zap, ExternalLink, Bot, Sparkles, Settings2, MessageCircle, SquarePen, MessageSquare, Globe, Mail, Instagram, Phone, Search, User, Inbox, CheckCheck, ChevronLeft, Archive, PanelRight, Send, X, MapPin, Tag, StickyNote, Link2, CheckCircle2, MoreVertical, AlertTriangle, Clock, Snowflake, Sun, Flame, Building2, UserRound, Copy, FileText, Download } from 'lucide-react';
4
4
  import { createConnectionStore, connectionRuns, connectionStatus, tl, getActiveTenantId, getSupabaseClientOptional, useActiveTenantId, registerTranslations, describeError, useTranslation, usePluginRuntimeOptional, countByTenant, CONNECTOR_RUNTIME_TOKEN_HEADER, connectorRuntimeToken, formatCurrency, errorMessage } from '@fayz-ai/core';
5
- import { defineSettingsTab, SettingsGroup, PluginSettingsPanel, PRICE_BOOK, useRightRailStore, useAdminPath, useRightRailPanel, useWidgetSurface, adminNavigateTo, useConnectors, useConnectorsPanelAvailable, ConnectorMark, StateChip, openConnectorsPanel, ConnectorDetail, PageActions, useLimitGuard, ContactPicker, useRightRailMenu, invalidateLimit } from '@fayz-ai/admin';
5
+ import { defineSettingsTab, SettingsGroup, PluginSettingsPanel, PRICE_BOOK, useRightRailStore, useAdminPath, useRightRailPanel, useWidgetSurface, adminNavigateTo, useConnectors, useConnectorsPanelAvailable, ConnectorMark, StateChip, openConnectorsPanel, ConnectorDetail, PageActions, useLimitGuard, ContactPicker, useRightRailMenu, requestNotificationPermission, invalidateLimit, playChime, notifySystem } from '@fayz-ai/admin';
6
6
  import { Input, Button, toast, defineKpiWidget, defineTableWidget, Card, Badge, ComingSoon, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetBody, PageHeaderActions, cn, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, Textarea, ModalFooter, FilterChip, Skeleton, KpiCard, TableWidget } from '@fayz-ai/ui';
7
7
  import { useStore } from 'zustand';
8
8
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1409,55 +1409,9 @@ var T = {
1409
1409
  messages: "plg_conversation_messages",
1410
1410
  channels: "plg_conversations_channels"
1411
1411
  };
1412
- function tocar() {
1413
- try {
1414
- const Ctx = window.AudioContext ?? window.webkitAudioContext;
1415
- if (!Ctx) return;
1416
- const ctx = new Ctx();
1417
- const agora = ctx.currentTime;
1418
- for (const [freq, atraso] of [[880, 0], [1320, 0.09]]) {
1419
- const osc = ctx.createOscillator();
1420
- const vol = ctx.createGain();
1421
- osc.type = "sine";
1422
- osc.frequency.value = freq;
1423
- vol.gain.setValueAtTime(1e-4, agora + atraso);
1424
- vol.gain.exponentialRampToValueAtTime(0.18, agora + atraso + 0.02);
1425
- vol.gain.exponentialRampToValueAtTime(1e-4, agora + atraso + 0.28);
1426
- osc.connect(vol);
1427
- vol.connect(ctx.destination);
1428
- osc.start(agora + atraso);
1429
- osc.stop(agora + atraso + 0.3);
1430
- }
1431
- setTimeout(() => void ctx.close().catch(() => {
1432
- }), 900);
1433
- } catch {
1434
- }
1435
- }
1436
- async function pedirPermissao() {
1437
- if (typeof Notification === "undefined") return false;
1438
- if (Notification.permission === "granted") return true;
1439
- if (Notification.permission === "denied") return false;
1440
- try {
1441
- return await Notification.requestPermission() === "granted";
1442
- } catch {
1443
- return false;
1444
- }
1445
- }
1446
- function avisarNoSistema(titulo, corpo, tag) {
1447
- try {
1448
- if (typeof Notification === "undefined" || Notification.permission !== "granted") return;
1449
- if (typeof document !== "undefined" && document.visibilityState === "visible") return;
1450
- const n = new Notification(titulo, { body: corpo, tag, renotify: true });
1451
- n.onclick = () => {
1452
- try {
1453
- window.focus();
1454
- n.close();
1455
- } catch {
1456
- }
1457
- };
1458
- } catch {
1459
- }
1460
- }
1412
+ var tocar = playChime;
1413
+ var pedirPermissao = requestNotificationPermission;
1414
+ var avisarNoSistema = (titulo, corpo, tag) => notifySystem(titulo, corpo, tag);
1461
1415
  var RAIL_ID = "conversations";
1462
1416
  function InboxWatcher({ label, route = "/conversations", store: store2, config, inHeader }) {
1463
1417
  const Panel = React14.useMemo(() => {