@fayz-ai/plugin-conversations 0.22.9 → 0.22.10

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;AA0G9B,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAwB,EAAE,EAAE;IAChE;;yEAEqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,qBAmGA"}
1
+ {"version":3,"file":"InboxWatcher.d.ts","sourceRoot":"","sources":["../../src/components/InboxWatcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA0G9B,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAwB,EAAE,EAAE;IAChE;;yEAEqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,qBAsGA"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import * as React10 from 'react';
2
2
  import React10__default, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
3
3
  import { Loader2, Check, ShieldCheck, ShieldAlert, RefreshCw, QrCode, Zap, ExternalLink, MessageCircle, SquarePen, MessageSquare, Globe, Mail, Instagram, Phone, Search, User, Inbox, CheckCheck, ChevronLeft, Archive, PanelRight, Send, X, MapPin, Tag, StickyNote, Link2, MoreVertical, AlertTriangle, Clock, Snowflake, Sun, Flame, Building2, UserRound, Copy, FileText, Download } from 'lucide-react';
4
4
  import { createConnectionStore, connectionRuns, connectionStatus, getActiveTenantId, getSupabaseClientOptional, useActiveTenantId, registerTranslations, describeError, useTranslation, countByTenant, CONNECTOR_RUNTIME_TOKEN_HEADER, connectorRuntimeToken, errorMessage } from '@fayz-ai/core';
5
- import { SettingsGroup, PluginSettingsPanel, useAdminPath, adminNavigateTo, useRightRailStore, PageActions, useLimitGuard, ContactPicker, invalidateLimit } from '@fayz-ai/admin';
5
+ import { SettingsGroup, PluginSettingsPanel, useAdminPath, useWidgetSurface, adminNavigateTo, useRightRailStore, PageActions, useLimitGuard, ContactPicker, invalidateLimit } from '@fayz-ai/admin';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
  import { useStore } from 'zustand';
8
8
  import { Input, Button, toast, defineKpiWidget, defineTableWidget, PageHeaderActions, cn, Badge, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, ModalFooter, FilterChip, Skeleton, KpiCard, TableWidget } from '@fayz-ai/ui';
@@ -165,6 +165,7 @@ function InboxWatcher({ label, route = "/conversations" }) {
165
165
  });
166
166
  }, [contar, tenantId, label]);
167
167
  const aberta = path === route || path.startsWith(`${route}/`);
168
+ const named = useWidgetSurface() === "rail";
168
169
  return /* @__PURE__ */ jsxs(
169
170
  "button",
170
171
  {
@@ -173,9 +174,10 @@ function InboxWatcher({ label, route = "/conversations" }) {
173
174
  "aria-label": naoLidas > 0 ? `${label} (${naoLidas})` : label,
174
175
  title: label,
175
176
  "aria-current": aberta ? "page" : void 0,
176
- className: `fz-tap relative inline-flex shrink-0 items-center justify-center rounded-button p-2 transition-colors hover:bg-accent ${aberta ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`,
177
+ className: `fz-tap relative inline-flex shrink-0 items-center rounded-button transition-colors hover:bg-accent ${named ? "w-full gap-3 px-2.5 py-2.5" : "justify-center p-2"} ${aberta ? "text-foreground" : "text-muted-foreground hover:text-foreground"}`,
177
178
  children: [
178
- /* @__PURE__ */ jsx(MessageCircle, { className: "h-4 w-4" }),
179
+ /* @__PURE__ */ jsx(MessageCircle, { className: "h-4 w-4 shrink-0" }),
180
+ named && /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-left", children: label }),
179
181
  naoLidas > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -right-0.5 -top-0.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-medium leading-none text-destructive-foreground tabular-nums", children: naoLidas > 9 ? "9+" : naoLidas })
180
182
  ]
181
183
  }