@fayz-ai/plugin-conversations 0.27.0 → 0.27.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/index.js CHANGED
@@ -914,7 +914,7 @@ function createConversationsStore(provider) {
914
914
  leadOwnerId: get().leadOwnerFilter,
915
915
  search: get().search || void 0
916
916
  });
917
- const selectedId = get().selectedId ?? (opts?.autoSelect === false ? null : conversations[0]?.id ?? null);
917
+ const selectedId = get().selectedId ?? (opts?.autoSelect === false ? null : (conversations.find((c) => c.status !== "closed") ?? conversations[0])?.id ?? null);
918
918
  set({ conversations, loading: false, selectedId });
919
919
  if (selectedId) await get().select(selectedId);
920
920
  },
@@ -1044,7 +1044,9 @@ function createConversationsStore(provider) {
1044
1044
  if (!id) return;
1045
1045
  const updated = await provider.setStatus(id, status);
1046
1046
  set((s) => ({
1047
- conversations: s.conversations.map((c) => c.id === id ? updated : c)
1047
+ conversations: s.conversations.map((c) => c.id === id ? updated : c),
1048
+ // An archived conversation leaves the inbox, so it stops being the open one.
1049
+ ...status === "closed" ? { selectedId: null } : {}
1048
1050
  }));
1049
1051
  }
1050
1052
  }));
@@ -1092,7 +1094,7 @@ var en = {
1092
1094
  "conversations.thread.back": "Back to conversations",
1093
1095
  "conversations.thread.snooze": "Snooze",
1094
1096
  "conversations.thread.close": "Close",
1095
- "conversations.thread.details": "Toggle contact details",
1097
+ "conversations.thread.details": "Open contact details",
1096
1098
  "conversations.thread.empty": "No messages yet",
1097
1099
  "conversations.thread.reply": "Reply via {{channel}}\u2026",
1098
1100
  "conversations.thread.send": "Send",
@@ -1158,7 +1160,51 @@ var en = {
1158
1160
  "conversations.settings.status.verifying": "Verifying",
1159
1161
  "conversations.settings.status.failed": "Failed",
1160
1162
  "conversations.settings.status.released": "Released",
1161
- "conversations.settings.status.disconnected": "Disconnected"
1163
+ "conversations.settings.status.disconnected": "Disconnected",
1164
+ "conversations.thread.more": "More actions",
1165
+ "conversations.thread.archive": "Archive conversation",
1166
+ "conversations.profile.loading": "Loading the contact\u2026",
1167
+ "conversations.profile.notInCrm": "This contact is not in the CRM yet.",
1168
+ "conversations.profile.conversation": "Conversation",
1169
+ "conversations.profile.lead": "Lead",
1170
+ "conversations.profile.openLead": "Open lead",
1171
+ "conversations.profile.status": "Status",
1172
+ "conversations.profile.temperature": "Temperature",
1173
+ "conversations.profile.source": "Source",
1174
+ "conversations.profile.company": "Company",
1175
+ "conversations.profile.openCompany": "Open company",
1176
+ "conversations.profile.declared": "Declared on the form",
1177
+ "conversations.profile.tradeName": "Trade name",
1178
+ "conversations.profile.legalName": "Legal name",
1179
+ "conversations.profile.cnpj": "CNPJ",
1180
+ "conversations.profile.cpf": "CPF",
1181
+ "conversations.profile.size": "Size",
1182
+ "conversations.profile.since": "Open since",
1183
+ "conversations.profile.phone": "Phone",
1184
+ "conversations.profile.email": "Email",
1185
+ "conversations.profile.website": "Website",
1186
+ "conversations.profile.address": "Address",
1187
+ "conversations.profile.person": "Contact",
1188
+ "conversations.profile.city": "City",
1189
+ "conversations.profile.role": "Role",
1190
+ "conversations.profile.buyingRole": "Buying role",
1191
+ "conversations.profile.venueType": "Venue type",
1192
+ "conversations.profile.revenue": "Annual revenue",
1193
+ "conversations.profile.challenges": "Challenges",
1194
+ "conversations.profile.goals": "Goals",
1195
+ "conversations.profile.history": "History",
1196
+ "conversations.leadStatus.new": "New",
1197
+ "conversations.leadStatus.contacted": "Contacted",
1198
+ "conversations.leadStatus.qualified": "Qualified",
1199
+ "conversations.leadStatus.unqualified": "Unqualified",
1200
+ "conversations.leadStatus.converted": "Converted",
1201
+ "conversations.leadStatus.lost": "Lost",
1202
+ "conversations.temperature.hot": "Hot",
1203
+ "conversations.temperature.warm": "Warm",
1204
+ "conversations.temperature.cold": "Cold",
1205
+ "conversations.thread.unarchive": "Unarchive",
1206
+ "conversations.filter.archived": "Archived",
1207
+ "conversations.list.emptyArchived": "No archived conversations."
1162
1208
  };
1163
1209
 
1164
1210
  // src/locales/pt-BR.ts
@@ -1203,7 +1249,7 @@ var ptBR = {
1203
1249
  "conversations.thread.back": "Voltar \xE0s conversas",
1204
1250
  "conversations.thread.snooze": "Adiar",
1205
1251
  "conversations.thread.close": "Encerrar",
1206
- "conversations.thread.details": "Alternar detalhes do contato",
1252
+ "conversations.thread.details": "Abrir detalhes do contato",
1207
1253
  "conversations.thread.empty": "Nenhuma mensagem ainda",
1208
1254
  "conversations.thread.reply": "Responder via {{channel}}\u2026",
1209
1255
  "conversations.thread.send": "Enviar",
@@ -1269,7 +1315,51 @@ var ptBR = {
1269
1315
  "conversations.settings.status.verifying": "Verificando",
1270
1316
  "conversations.settings.status.failed": "Falhou",
1271
1317
  "conversations.settings.status.released": "Devolvido",
1272
- "conversations.settings.status.disconnected": "Desconectado"
1318
+ "conversations.settings.status.disconnected": "Desconectado",
1319
+ "conversations.thread.more": "Mais a\xE7\xF5es",
1320
+ "conversations.thread.archive": "Arquivar conversa",
1321
+ "conversations.profile.loading": "Carregando o contato\u2026",
1322
+ "conversations.profile.notInCrm": "Este contato ainda n\xE3o est\xE1 no CRM.",
1323
+ "conversations.profile.conversation": "Conversa",
1324
+ "conversations.profile.lead": "Lead",
1325
+ "conversations.profile.openLead": "Abrir lead",
1326
+ "conversations.profile.status": "Situa\xE7\xE3o",
1327
+ "conversations.profile.temperature": "Temperatura",
1328
+ "conversations.profile.source": "Origem",
1329
+ "conversations.profile.company": "Empresa",
1330
+ "conversations.profile.openCompany": "Abrir empresa",
1331
+ "conversations.profile.declared": "Declarada no formul\xE1rio",
1332
+ "conversations.profile.tradeName": "Nome fantasia",
1333
+ "conversations.profile.legalName": "Raz\xE3o social",
1334
+ "conversations.profile.cnpj": "CNPJ",
1335
+ "conversations.profile.cpf": "CPF",
1336
+ "conversations.profile.size": "Porte",
1337
+ "conversations.profile.since": "Aberta em",
1338
+ "conversations.profile.phone": "Telefone",
1339
+ "conversations.profile.email": "E-mail",
1340
+ "conversations.profile.website": "Site",
1341
+ "conversations.profile.address": "Endere\xE7o",
1342
+ "conversations.profile.person": "Contato",
1343
+ "conversations.profile.city": "Cidade",
1344
+ "conversations.profile.role": "Cargo",
1345
+ "conversations.profile.buyingRole": "Papel na compra",
1346
+ "conversations.profile.venueType": "Tipo de estabelecimento",
1347
+ "conversations.profile.revenue": "Faturamento anual",
1348
+ "conversations.profile.challenges": "Maiores desafios",
1349
+ "conversations.profile.goals": "Objetivos",
1350
+ "conversations.profile.history": "Hist\xF3rico",
1351
+ "conversations.leadStatus.new": "Novo",
1352
+ "conversations.leadStatus.contacted": "Contatado",
1353
+ "conversations.leadStatus.qualified": "Qualificado",
1354
+ "conversations.leadStatus.unqualified": "Desqualificado",
1355
+ "conversations.leadStatus.converted": "Convertido",
1356
+ "conversations.leadStatus.lost": "Perdido",
1357
+ "conversations.temperature.hot": "Quente",
1358
+ "conversations.temperature.warm": "Morno",
1359
+ "conversations.temperature.cold": "Frio",
1360
+ "conversations.thread.unarchive": "Desarquivar",
1361
+ "conversations.filter.archived": "Arquivadas",
1362
+ "conversations.list.emptyArchived": "Nenhuma conversa arquivada."
1273
1363
  };
1274
1364
 
1275
1365
  // src/locales/index.ts
@@ -2285,7 +2375,7 @@ function createConversationsPlugin(options) {
2285
2375
  locales: conversationsLocales
2286
2376
  };
2287
2377
  }
2288
- var ConversationsPage = React__default.lazy(() => import('./ConversationsPage-6WOZYAD4.js').then((m) => ({ default: m.ConversationsPage })));
2378
+ var ConversationsPage = React__default.lazy(() => import('./ConversationsPage-RYEND3MG.js').then((m) => ({ default: m.ConversationsPage })));
2289
2379
  var AtendeAIPage = React__default.lazy(() => import('./AtendeAIPage-PBBMWIDW.js').then((m) => ({ default: m.AtendeAIPage })));
2290
2380
  var ConversationsSettingsTab = lazyComponent(() => import('./ConversationsSettings-GORCWUHD.js').then((m) => m.ConversationsSettingsTab));
2291
2381
  var CampaignsSurface = React__default.lazy(() => import('./CampaignsSurface-75POQIRI.js').then((m) => ({ default: m.CampaignsSurface })));