@fayz-ai/plugin-crm 0.16.0 → 0.17.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogActivityButton.d.ts","sourceRoot":"","sources":["../../src/components/LogActivityButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAA;AAU3D,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,UAAU,CAAA;AAczD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACtD,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;CACxC,
|
|
1
|
+
{"version":3,"file":"LogActivityButton.d.ts","sourceRoot":"","sources":["../../src/components/LogActivityButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAA;AAU3D,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,UAAU,CAAA;AAczD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACtD,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;CACxC,qBA8JA"}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useMemo, useCallback, useRef } from 'react'
|
|
|
2
2
|
import { tl, useTranslation, getSupabaseClientOptional, registerTranslations, registerMessageDefaults, createSafeDataProvider, getActiveTenantId, countByTenant, usePluginRuntimeOptional, useActiveTenantId, exportCSV, loadMessageOverrides, resolveMessages, useActiveUnitId } from '@fayz-ai/core';
|
|
3
3
|
import { createPluginContext, useUnitBootstrap, useUnitStore, createCrudPage, PluginSettingsPanel, registerTimelineSource, dedup, useModuleNavigation, createViewRouter, ModuleActionBar, usePermissionOptional, PageActions, useTenantPluginSettings, SettingsGroup, ToggleRow, adminNavigateTo, useLimitGuard, OrderFormSkeleton, OrderFormBlock, OrderFormView, OrderFormItemsCard, OrderFormItemRow, OrderFormAddItemStep, formatCurrency, OrderDetailSkeleton, OrderDetailBlock, OrderDetailView, PersonLink, RightRailPage, KanbanBoard, invalidateLimit, useAccessOptional, useOrganizationStore, getRailPage, ContactPicker } from '@fayz-ai/admin';
|
|
4
4
|
import { Archive, FileX2, FileCheck2, Send, FilePlus2, XCircle, Trophy, PhoneCall, MoveRight, Target, ArrowRightLeft, UserPlus, MapPin, MessageCircle, CheckSquare, FileText, Users, Mail, Phone, ArrowUp, ArrowDown, X, Plus, Filter, Lock, Pencil, Trash2, Globe, Check, ChevronRight, Settings, Tag, User, Building2, Download, Inbox, Play, Clock, Sparkles, Calendar, ArrowRight, ChevronDown, Printer, CircleCheckBig, Ban, Receipt, Package, CalendarClock, Loader2, Network, Link2, Star, MessageSquareQuote, Search, SignalHigh, CalendarRange, ChevronLeft, TrendingDown, ThumbsDown, UserCheck, AlertTriangle, Settings2, Repeat, Zap, Snowflake, Sun, Flame, Merge, Fingerprint, Paperclip, ImageOff, CircleAlert, CircleDashed, CheckCircle2, Clipboard, DollarSign, ThumbsUp } from 'lucide-react';
|
|
5
|
-
import { Badge, Checkbox, toast, defineKpiWidget, defineChartWidget, defineCustomWidget, defineTableWidget, PageTransition, ModulePage, SubpageHeader, Button, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Switch, ConfirmDialog, useIsWide, SegmentedControl, PageHeaderActions, FilterChip, MultiSelect, ListView, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, ModalFooter, useSaveBar, SearchSelect, DatePicker, DataTable, Breadcrumb, PhoneLink, SheetBody, SheetFooter, DashboardCanvas, ModalDescription, Card, CurrencyInput, HeaderTabs, Dropdown, DropdownTrigger, DropdownContent, DropdownLabel, DropdownSeparator, DropdownItem, PageToolbar, ToolbarButton, RangeControl, Popover, PopoverTrigger, PopoverContent, getLucideIcon, normalizePhone, KpiCard, ChartWidget, CardHeader, CardTitle, CardContent, TableWidget } from '@fayz-ai/ui';
|
|
5
|
+
import { Badge, Checkbox, toast, defineKpiWidget, defineChartWidget, defineCustomWidget, defineTableWidget, PageTransition, ModulePage, SubpageHeader, Button, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Switch, ConfirmDialog, useIsWide, SegmentedControl, PageHeaderActions, FilterChip, MultiSelect, ListView, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, ModalFooter, useSaveBar, SearchSelect, DatePicker, DataTable, Breadcrumb, PhoneLink, SheetBody, SheetFooter, DashboardCanvas, ModalDescription, Card, CurrencyInput, HeaderTabs, Dropdown, DropdownTrigger, DropdownContent, DropdownLabel, DropdownSeparator, DropdownItem, PageToolbar, ToolbarButton, RangeControl, Popover, PopoverTrigger, PopoverContent, getLucideIcon, DictateButton, normalizePhone, KpiCard, ChartWidget, CardHeader, CardTitle, CardContent, TableWidget } from '@fayz-ai/ui';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
8
|
import { createStore as createStore$1 } from 'zustand/vanilla';
|
|
@@ -3062,6 +3062,7 @@ function LogActivityButton({ target, onLogged }) {
|
|
|
3062
3062
|
const [types, setTypes] = useState(() => DEFAULT_ACTIVITY_TYPES);
|
|
3063
3063
|
const [type, setType] = useState("whatsapp");
|
|
3064
3064
|
const [note, setNote] = useState("");
|
|
3065
|
+
const [noteBase, setNoteBase] = useState("");
|
|
3065
3066
|
const [outcome, setOutcome] = useState("connected");
|
|
3066
3067
|
const [nextDate, setNextDate] = useState("");
|
|
3067
3068
|
const [saving, setSaving] = useState(false);
|
|
@@ -3110,6 +3111,7 @@ function LogActivityButton({ target, onLogged }) {
|
|
|
3110
3111
|
});
|
|
3111
3112
|
}
|
|
3112
3113
|
setNote("");
|
|
3114
|
+
setNoteBase("");
|
|
3113
3115
|
setNextDate("");
|
|
3114
3116
|
setOutcome("connected");
|
|
3115
3117
|
setOpen(false);
|
|
@@ -3141,23 +3143,40 @@ function LogActivityButton({ target, onLogged }) {
|
|
|
3141
3143
|
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-9 text-sm", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
3142
3144
|
/* @__PURE__ */ jsx(SelectContent, { children: OUTCOMES.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: o, children: t2(`crm.outcome.${o}`) }, o)) })
|
|
3143
3145
|
] }),
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
e.
|
|
3154
|
-
|
|
3146
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3147
|
+
/* @__PURE__ */ jsx(
|
|
3148
|
+
"textarea",
|
|
3149
|
+
{
|
|
3150
|
+
autoFocus: true,
|
|
3151
|
+
rows: 3,
|
|
3152
|
+
value: note,
|
|
3153
|
+
onChange: (e) => {
|
|
3154
|
+
setNote(e.target.value);
|
|
3155
|
+
setNoteBase(e.target.value);
|
|
3156
|
+
},
|
|
3157
|
+
onKeyDown: (e) => {
|
|
3158
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
3159
|
+
e.preventDefault();
|
|
3160
|
+
void submit();
|
|
3161
|
+
}
|
|
3162
|
+
},
|
|
3163
|
+
placeholder: t2("crm.followUp.placeholder"),
|
|
3164
|
+
className: "w-full resize-none rounded-lg border bg-background px-3 py-2 pr-10 text-sm outline-none placeholder:text-muted-foreground/70 focus:ring-2 focus:ring-ring"
|
|
3165
|
+
}
|
|
3166
|
+
),
|
|
3167
|
+
/* @__PURE__ */ jsx(
|
|
3168
|
+
DictateButton,
|
|
3169
|
+
{
|
|
3170
|
+
className: "absolute right-1.5 top-1.5",
|
|
3171
|
+
startLabel: t2("crm.followUp.dictate"),
|
|
3172
|
+
stopLabel: t2("crm.followUp.dictateStop"),
|
|
3173
|
+
onTranscript: (texto) => {
|
|
3174
|
+
const base = noteBase.trimEnd();
|
|
3175
|
+
setNote(base ? `${base} ${texto}` : texto);
|
|
3155
3176
|
}
|
|
3156
|
-
}
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
}
|
|
3160
|
-
),
|
|
3177
|
+
}
|
|
3178
|
+
)
|
|
3179
|
+
] }),
|
|
3161
3180
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3162
3181
|
/* @__PURE__ */ jsx(CalendarClock, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3163
3182
|
/* @__PURE__ */ jsx(DatePicker, { value: nextDate, onChange: setNextDate }),
|
|
@@ -25332,6 +25351,8 @@ var en = {
|
|
|
25332
25351
|
"crm.funnelView.fromTop": "{{pct}}% of the top",
|
|
25333
25352
|
"crm.funnelView.fromPrev": "{{pct}}% of the previous stage",
|
|
25334
25353
|
"crm.funnelView.dropped": "{{count}} dropped off",
|
|
25354
|
+
"crm.followUp.dictate": "Dictate the note",
|
|
25355
|
+
"crm.followUp.dictateStop": "Stop dictating",
|
|
25335
25356
|
"crm.followUp.placeholder": "What happened on this touch?",
|
|
25336
25357
|
"crm.followUp.save": "Log it",
|
|
25337
25358
|
"crm.followUp.failed": "Could not log the follow-up",
|
|
@@ -26110,6 +26131,8 @@ var ptBR = {
|
|
|
26110
26131
|
"crm.funnelView.fromTop": "{{pct}}% do topo",
|
|
26111
26132
|
"crm.funnelView.fromPrev": "{{pct}}% da etapa anterior",
|
|
26112
26133
|
"crm.funnelView.dropped": "{{count}} ficaram para tr\xE1s",
|
|
26134
|
+
"crm.followUp.dictate": "Ditar a nota",
|
|
26135
|
+
"crm.followUp.dictateStop": "Parar de ditar",
|
|
26113
26136
|
"crm.followUp.placeholder": "O que aconteceu nesse contato?",
|
|
26114
26137
|
"crm.followUp.save": "Registrar",
|
|
26115
26138
|
"crm.followUp.failed": "N\xE3o foi poss\xEDvel registrar o follow-up",
|