callix-dialer-widget 1.3.2 → 1.3.3
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.
|
@@ -53617,7 +53617,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53617
53617
|
});
|
|
53618
53618
|
}, [operatorState, currentCall]);
|
|
53619
53619
|
useEffect(() => {
|
|
53620
|
-
console.log("[FloatingDialer]
|
|
53620
|
+
console.log("[FloatingDialer] Qualifica��es:", {
|
|
53621
53621
|
success: successQualifications,
|
|
53622
53622
|
discard: discardQualifications,
|
|
53623
53623
|
callState: operatorState == null ? void 0 : operatorState.state
|
|
@@ -53625,7 +53625,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53625
53625
|
}, [successQualifications, discardQualifications, operatorState == null ? void 0 : operatorState.state]);
|
|
53626
53626
|
useEffect(() => {
|
|
53627
53627
|
if ((currentCall == null ? void 0 : currentCall.direction) === "incoming") {
|
|
53628
|
-
console.log("[FloatingDialer]
|
|
53628
|
+
console.log("[FloatingDialer] ?? CHAMADA RECEBIDA:", {
|
|
53629
53629
|
call: currentCall,
|
|
53630
53630
|
direction: currentCall.direction,
|
|
53631
53631
|
state: operatorState == null ? void 0 : operatorState.state,
|
|
@@ -53717,7 +53717,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53717
53717
|
if (callState === "afterCall") {
|
|
53718
53718
|
const shouldSkipQualification = (currentCallInfo == null ? void 0 : currentCallInfo.type) === "campaign" && currentCallInfo.info.campaign.skipCallQualification === true;
|
|
53719
53719
|
if (shouldSkipQualification) {
|
|
53720
|
-
console.log("[FloatingDialer]
|
|
53720
|
+
console.log("[FloatingDialer] ?? skipCallQualification ativado - finalizando automaticamente");
|
|
53721
53721
|
if (typeof finishAfterCall === "function") {
|
|
53722
53722
|
void Promise.resolve(
|
|
53723
53723
|
finishAfterCall({
|
|
@@ -53814,7 +53814,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53814
53814
|
useEffect(() => {
|
|
53815
53815
|
if (!currentCall || callState !== "callInProgress") {
|
|
53816
53816
|
if (callDurationSeconds > 0) {
|
|
53817
|
-
console.log("[FloatingDialer]
|
|
53817
|
+
console.log("[FloatingDialer] ?? Timer resetado (chamada n�o est� em progresso)");
|
|
53818
53818
|
}
|
|
53819
53819
|
setCallDurationSeconds(0);
|
|
53820
53820
|
setNetworkMetric(INITIAL_NETWORK_METRIC);
|
|
@@ -53823,7 +53823,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53823
53823
|
}
|
|
53824
53824
|
const initialDuration = Math.floor(currentCall.currentDurationSeconds ?? 0);
|
|
53825
53825
|
setCallDurationSeconds(initialDuration);
|
|
53826
|
-
console.log("[FloatingDialer]
|
|
53826
|
+
console.log("[FloatingDialer] ?? Timer iniciado:", {
|
|
53827
53827
|
initialDuration,
|
|
53828
53828
|
currentDurationSeconds: currentCall.currentDurationSeconds,
|
|
53829
53829
|
callState
|
|
@@ -53832,11 +53832,11 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
53832
53832
|
const duration = Math.floor(currentCall.currentDurationSeconds ?? 0);
|
|
53833
53833
|
setCallDurationSeconds(duration);
|
|
53834
53834
|
if (duration % 5 === 0 && duration > 0) {
|
|
53835
|
-
console.log("[FloatingDialer]
|
|
53835
|
+
console.log("[FloatingDialer] ?? Timer atualizado:", duration, "segundos");
|
|
53836
53836
|
}
|
|
53837
53837
|
}, 1e3);
|
|
53838
53838
|
return () => {
|
|
53839
|
-
console.log("[FloatingDialer]
|
|
53839
|
+
console.log("[FloatingDialer] ?? Timer parado");
|
|
53840
53840
|
window.clearInterval(timer);
|
|
53841
53841
|
};
|
|
53842
53842
|
}, [currentCall, callState]);
|
|
@@ -54139,7 +54139,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54139
54139
|
console.log("[FloatingDialer] Entrou em pausa com sucesso:", breakId);
|
|
54140
54140
|
} catch (error2) {
|
|
54141
54141
|
console.error("[FloatingDialer] Erro ao entrar em pausa:", error2);
|
|
54142
|
-
setBreakError(error2 instanceof Error ? error2.message : "
|
|
54142
|
+
setBreakError(error2 instanceof Error ? error2.message : "N�o foi poss�vel entrar em pausa.");
|
|
54143
54143
|
}
|
|
54144
54144
|
}, [goOnBreak]);
|
|
54145
54145
|
const handleGoOffBreak = useCallback(async () => {
|
|
@@ -54148,7 +54148,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54148
54148
|
console.log("[FloatingDialer] Saiu da pausa com sucesso");
|
|
54149
54149
|
} catch (error2) {
|
|
54150
54150
|
console.error("[FloatingDialer] Erro ao sair da pausa:", error2);
|
|
54151
|
-
setAvailabilityError("
|
|
54151
|
+
setAvailabilityError("N�o foi poss�vel sair da pausa.");
|
|
54152
54152
|
}
|
|
54153
54153
|
}, [goOffBreak]);
|
|
54154
54154
|
useEffect(() => {
|
|
@@ -54391,7 +54391,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54391
54391
|
if (callState === "afterCall") {
|
|
54392
54392
|
const options = afterCallResult === "success" ? successQualifications : discardQualifications;
|
|
54393
54393
|
const hasOptions = options.length > 0;
|
|
54394
|
-
console.log("[FloatingDialer Mini]
|
|
54394
|
+
console.log("[FloatingDialer Mini] ?? TELA DE QUALIFICA��O:", {
|
|
54395
54395
|
callState,
|
|
54396
54396
|
afterCallResult,
|
|
54397
54397
|
successQualifications: successQualifications.length,
|
|
@@ -54402,21 +54402,21 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54402
54402
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54403
54403
|
"div",
|
|
54404
54404
|
{
|
|
54405
|
-
className: ["callix", "mode", "min", tw`flex w-full max-w-full flex-col gap-
|
|
54405
|
+
className: ["callix", "mode", "min", tw`flex w-full max-w-full flex-col gap-1.5 rounded-2xl border border-slate-200 bg-white/95 p-2 shadow-sm text-slate-800 overflow-hidden`].join(" "),
|
|
54406
54406
|
"data-callix-variant": "min",
|
|
54407
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-
|
|
54407
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-1.5 rounded-xl border border-slate-200 bg-slate-50 px-2 py-1.5 overflow-hidden`, children: [
|
|
54408
54408
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
54409
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54410
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[10px] font-semibold text-slate-700`, children: "Qualifique a chamada" }),
|
|
54410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[8px] text-slate-500`, children: "Esta etapa e obrigatoria." })
|
|
54411
54411
|
] }),
|
|
54412
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`grid grid-cols-2 gap-1
|
|
54412
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`grid grid-cols-2 gap-1`, children: [
|
|
54413
54413
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54414
54414
|
"button",
|
|
54415
54415
|
{
|
|
54416
54416
|
type: "button",
|
|
54417
54417
|
onClick: () => setAfterCallResult("success"),
|
|
54418
|
-
className: tw`${afterCallResult === "success" ? "bg-
|
|
54419
|
-
children: "
|
|
54418
|
+
className: tw`${afterCallResult === "success" ? "bg-green-500 text-white shadow-md" : "bg-white text-slate-600"} rounded-md border border-slate-200 px-1.5 py-0.5 text-[8px] font-semibold transition`,
|
|
54419
|
+
children: "Concluido"
|
|
54420
54420
|
}
|
|
54421
54421
|
),
|
|
54422
54422
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -54424,38 +54424,38 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54424
54424
|
{
|
|
54425
54425
|
type: "button",
|
|
54426
54426
|
onClick: () => setAfterCallResult("failure"),
|
|
54427
|
-
className: tw`${afterCallResult === "failure" ? "bg-rose-500 text-white shadow-md" : "bg-white text-slate-600"} rounded-
|
|
54428
|
-
children: "
|
|
54427
|
+
className: tw`${afterCallResult === "failure" ? "bg-rose-500 text-white shadow-md" : "bg-white text-slate-600"} rounded-md border border-slate-200 px-1.5 py-0.5 text-[8px] font-semibold transition`,
|
|
54428
|
+
children: "Descartado"
|
|
54429
54429
|
}
|
|
54430
54430
|
)
|
|
54431
54431
|
] }),
|
|
54432
54432
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-1`, children: [
|
|
54433
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54434
|
-
hasOptions ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`max-h-
|
|
54433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[8px] font-medium text-slate-700`, children: "Selecione qualificacao" }),
|
|
54434
|
+
hasOptions ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`max-h-20 space-y-0.5 overflow-y-auto pr-0.5`, children: options.map((qualification) => {
|
|
54435
54435
|
const isSelected = selectedQualificationId === qualification.id;
|
|
54436
54436
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54437
54437
|
"button",
|
|
54438
54438
|
{
|
|
54439
54439
|
type: "button",
|
|
54440
54440
|
onClick: () => setSelectedQualificationId(qualification.id),
|
|
54441
|
-
className: tw`${isSelected ? "ring-1 ring-
|
|
54442
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54441
|
+
className: tw`${isSelected ? "ring-1 ring-blue-400 bg-blue-50 border-blue-300" : "border-slate-200 bg-white"} w-full rounded-md border px-1.5 py-0.5 text-left transition`,
|
|
54442
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[8px] font-semibold text-slate-800 leading-tight truncate`, children: qualification.name })
|
|
54443
54443
|
},
|
|
54444
54444
|
qualification.id
|
|
54445
54445
|
);
|
|
54446
|
-
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-
|
|
54446
|
+
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-md border border-amber-200 bg-amber-50 px-1.5 py-0.5 text-[8px] text-amber-700`, children: "Nenhuma qualificacao disponivel." })
|
|
54447
54447
|
] }),
|
|
54448
|
-
afterCallError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54448
|
+
afterCallError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[8px] text-red-500`, children: afterCallError }),
|
|
54449
54449
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
54450
54450
|
"button",
|
|
54451
54451
|
{
|
|
54452
54452
|
type: "button",
|
|
54453
54453
|
onClick: handleFinishAfterCall,
|
|
54454
54454
|
disabled: !hasOptions || !selectedQualificationId || isSubmittingAfterCall,
|
|
54455
|
-
className: tw`flex w-full items-center justify-center gap-1
|
|
54455
|
+
className: tw`flex w-full items-center justify-center gap-1 rounded-md bg-blue-500 px-2 py-1 text-[8px] font-bold text-white shadow-md transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-60`,
|
|
54456
54456
|
children: [
|
|
54457
|
-
isSubmittingAfterCall && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-flex h-
|
|
54458
|
-
"Finalizar
|
|
54457
|
+
isSubmittingAfterCall && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-flex h-2.5 w-2.5 animate-spin rounded-full border border-white/40 border-t-white` }),
|
|
54458
|
+
"Finalizar"
|
|
54459
54459
|
]
|
|
54460
54460
|
}
|
|
54461
54461
|
)
|
|
@@ -54463,7 +54463,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54463
54463
|
}
|
|
54464
54464
|
);
|
|
54465
54465
|
}
|
|
54466
|
-
console.log("[FloatingDialer Mini]
|
|
54466
|
+
console.log("[FloatingDialer Mini] ?? Estado da Chamada:", {
|
|
54467
54467
|
isCallActive,
|
|
54468
54468
|
callState,
|
|
54469
54469
|
statusLabel,
|
|
@@ -54472,7 +54472,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54472
54472
|
isRinging,
|
|
54473
54473
|
callDurationSeconds,
|
|
54474
54474
|
callTarget,
|
|
54475
|
-
statusVisualUsed: isCallActive ? "GREEN (
|
|
54475
|
+
statusVisualUsed: isCallActive ? "GREEN (green)" : "statusVisual",
|
|
54476
54476
|
timerVisible: isCallActive && callDurationSeconds > 0
|
|
54477
54477
|
});
|
|
54478
54478
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -54482,7 +54482,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54482
54482
|
"data-callix-variant": "min",
|
|
54483
54483
|
children: [
|
|
54484
54484
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center justify-between gap-2`, children: [
|
|
54485
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`${isCallActive ? "border-
|
|
54485
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`${isCallActive ? "border-green-200 bg-green-50 text-green-700" : statusVisual.badgeClass} flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase leading-tight`, children: [
|
|
54486
54486
|
/* @__PURE__ */ jsxRuntimeExports.jsx(statusVisual.Icon, { className: tw`text-xs` }),
|
|
54487
54487
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: statusLabel })
|
|
54488
54488
|
] }),
|
|
@@ -54491,7 +54491,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54491
54491
|
{
|
|
54492
54492
|
type: "button",
|
|
54493
54493
|
onClick: () => handleGoOffBreak(),
|
|
54494
|
-
className: tw`inline-flex items-center gap-1 rounded-full border border-
|
|
54494
|
+
className: tw`inline-flex items-center gap-1 rounded-full border border-green-400 bg-green-50 px-2.5 py-1 text-[10px] font-semibold text-green-700 transition hover:bg-green-100`,
|
|
54495
54495
|
children: [
|
|
54496
54496
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: tw`text-xs` }),
|
|
54497
54497
|
"Voltar"
|
|
@@ -54510,16 +54510,17 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54510
54510
|
}
|
|
54511
54511
|
)
|
|
54512
54512
|
] }),
|
|
54513
|
-
isCallActive ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-xl border border-
|
|
54514
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-
|
|
54513
|
+
isCallActive ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-xl border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-2`, children: [
|
|
54514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-green-500 ${callDurationSeconds > 0 ? "animate-pulse" : ""}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiPhoneCall, { className: tw`text-xs text-white` }) }),
|
|
54515
54515
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex min-w-0 flex-1 flex-col gap-0.5`, children: [
|
|
54516
54516
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`truncate font-mono text-sm font-bold text-slate-800`, children: (callTarget == null ? void 0 : callTarget.replace(/^\+55/, "")) || "Conectando..." }),
|
|
54517
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium uppercase tracking-wider text-
|
|
54517
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium uppercase tracking-wider text-green-600`, children: statusLabel })
|
|
54518
54518
|
] }),
|
|
54519
|
-
callDurationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex shrink-0 items-center gap-1 rounded-lg bg-
|
|
54519
|
+
callDurationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex shrink-0 items-center gap-1 rounded-lg bg-green-500 px-2 py-1`, children: [
|
|
54520
54520
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiClock, { className: tw`text-[10px] text-white` }),
|
|
54521
54521
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`tabular-nums text-xs font-bold text-white`, children: formatDuration(callDurationSeconds) })
|
|
54522
|
-
] })
|
|
54522
|
+
] }),
|
|
54523
|
+
console.log("[FloatingDialer Mini] 🕐 Timer Debug:", { callDurationSeconds, shouldShowTimer: callDurationSeconds > 0, formattedDuration: formatDuration(callDurationSeconds), isCallActive })
|
|
54523
54524
|
] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-1 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2`, children: [
|
|
54524
54525
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[10px] font-semibold uppercase tracking-wide text-slate-500`, children: "Numero" }),
|
|
54525
54526
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-2`, children: [
|
|
@@ -54574,7 +54575,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54574
54575
|
}
|
|
54575
54576
|
},
|
|
54576
54577
|
disabled: callButtonDisabled,
|
|
54577
|
-
className: tw`${isCallActive ? "bg-rose-500 hover:bg-rose-600" : "bg-
|
|
54578
|
+
className: tw`${isCallActive ? "bg-rose-500 hover:bg-rose-600" : "bg-green-500 hover:bg-green-600"} flex h-11 w-full items-center justify-center gap-2 rounded-xl text-sm font-bold text-white shadow-md transition disabled:cursor-not-allowed disabled:opacity-60`,
|
|
54578
54579
|
children: [
|
|
54579
54580
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhone, { className: tw`text-base` }),
|
|
54580
54581
|
isCallActive ? "Encerrar" : "Ligar"
|
|
@@ -54629,7 +54630,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54629
54630
|
{
|
|
54630
54631
|
type: "button",
|
|
54631
54632
|
onClick: handleGoOffBreak,
|
|
54632
|
-
className: tw`inline-flex items-center gap-1 rounded-lg border border-
|
|
54633
|
+
className: tw`inline-flex items-center gap-1 rounded-lg border border-green-300 bg-green-50 px-2 py-1 text-[10px] font-bold text-green-700 transition-all hover:bg-green-100 hover:shadow-sm`,
|
|
54633
54634
|
"aria-label": "Sair da pausa",
|
|
54634
54635
|
children: [
|
|
54635
54636
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: tw`text-xs` }),
|
|
@@ -54688,14 +54689,14 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54688
54689
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center justify-between mb-2`, children: [
|
|
54689
54690
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-1.5`, children: [
|
|
54690
54691
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhone, { className: tw`text-sm text-primary` }),
|
|
54691
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[10px] uppercase tracking-wider text-slate-500 font-semibold`, children: "
|
|
54692
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[10px] uppercase tracking-wider text-slate-500 font-semibold`, children: "N�mero" })
|
|
54692
54693
|
] }),
|
|
54693
54694
|
isDialerFocused && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: tw`inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[9px] font-semibold text-primary`, children: [
|
|
54694
54695
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-block h-1.5 w-1.5 rounded-full bg-primary animate-pulse` }),
|
|
54695
54696
|
"Ativo"
|
|
54696
54697
|
] })
|
|
54697
54698
|
] }),
|
|
54698
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`min-h-[2.5rem] flex items-center`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-2xl font-semibold tabular-nums tracking-tight text-slate-800 flex-1 truncate`, children: dialDisplayText || /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-slate-400 text-lg font-normal`, children: "Digite um
|
|
54699
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`min-h-[2.5rem] flex items-center`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-2xl font-semibold tabular-nums tracking-tight text-slate-800 flex-1 truncate`, children: dialDisplayText || /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-slate-400 text-lg font-normal`, children: "Digite um n�mero" }) }) })
|
|
54699
54700
|
]
|
|
54700
54701
|
}
|
|
54701
54702
|
),
|
|
@@ -54721,7 +54722,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54721
54722
|
type: "button",
|
|
54722
54723
|
onClick: handleCall,
|
|
54723
54724
|
disabled: !isNumberValid,
|
|
54724
|
-
className: tw`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-
|
|
54725
|
+
className: tw`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-green-500 px-4 py-2.5 text-sm font-bold text-white shadow-lg transition-all hover:bg-green-600 hover:shadow-xl disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-lg`,
|
|
54725
54726
|
children: [
|
|
54726
54727
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhone, { className: tw`text-base` }),
|
|
54727
54728
|
"Ligar"
|
|
@@ -54745,7 +54746,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54745
54746
|
{
|
|
54746
54747
|
type: "button",
|
|
54747
54748
|
onClick: handleAnswer,
|
|
54748
|
-
className: tw`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-
|
|
54749
|
+
className: tw`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-green-500 px-3 py-2 text-xs font-bold text-white shadow-md transition-all hover:bg-green-600 hover:shadow-lg`,
|
|
54749
54750
|
children: [
|
|
54750
54751
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhoneIncoming, { className: tw`text-sm` }),
|
|
54751
54752
|
"Atender"
|
|
@@ -54814,7 +54815,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54814
54815
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
54815
54816
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[10px] uppercase tracking-wide text-slate-500`, children: "Volume" }),
|
|
54816
54817
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: tw`text-sm font-semibold text-slate-800`, children: [
|
|
54817
|
-
"
|
|
54818
|
+
"Sa�da ",
|
|
54818
54819
|
volumePercent,
|
|
54819
54820
|
"%"
|
|
54820
54821
|
] })
|
|
@@ -54890,8 +54891,8 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54890
54891
|
value: selectedInputId ?? "",
|
|
54891
54892
|
onChange: handleSelectInputDevice,
|
|
54892
54893
|
children: [
|
|
54893
|
-
audioDevices.inputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "
|
|
54894
|
-
audioDevices.inputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "
|
|
54894
|
+
audioDevices.inputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Padr�o" }),
|
|
54895
|
+
audioDevices.inputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "Padr�o" }, device.deviceId || device.label))
|
|
54895
54896
|
]
|
|
54896
54897
|
}
|
|
54897
54898
|
)
|
|
@@ -54899,7 +54900,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54899
54900
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: tw`space-y-1 text-xs text-slate-700`, children: [
|
|
54900
54901
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: tw`flex items-center gap-1.5 font-semibold`, children: [
|
|
54901
54902
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiHeadphones, { className: tw`text-sm text-primary` }),
|
|
54902
|
-
"
|
|
54903
|
+
"Sa�da"
|
|
54903
54904
|
] }),
|
|
54904
54905
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
54905
54906
|
"select",
|
|
@@ -54908,8 +54909,8 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54908
54909
|
value: selectedOutputId ?? "",
|
|
54909
54910
|
onChange: handleSelectOutputDevice,
|
|
54910
54911
|
children: [
|
|
54911
|
-
audioDevices.outputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "
|
|
54912
|
-
audioDevices.outputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "
|
|
54912
|
+
audioDevices.outputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Padr�o" }),
|
|
54913
|
+
audioDevices.outputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "Padr�o" }, device.deviceId || device.label))
|
|
54913
54914
|
]
|
|
54914
54915
|
}
|
|
54915
54916
|
)
|
|
@@ -55096,8 +55097,8 @@ function getStatusVisual(state) {
|
|
|
55096
55097
|
case "idle":
|
|
55097
55098
|
return {
|
|
55098
55099
|
Icon: FiCheckCircle,
|
|
55099
|
-
badgeClass: tw`border-
|
|
55100
|
-
dotClass: tw`bg-
|
|
55100
|
+
badgeClass: tw`border-green-200 bg-green-50 text-green-700`,
|
|
55101
|
+
dotClass: tw`bg-green-500`
|
|
55101
55102
|
};
|
|
55102
55103
|
case "callInProgress":
|
|
55103
55104
|
case "manualCallSetup":
|
|
@@ -55143,7 +55144,7 @@ function getStatusLabel(state) {
|
|
|
55143
55144
|
case "starting":
|
|
55144
55145
|
return "Conectando";
|
|
55145
55146
|
case "idle":
|
|
55146
|
-
return "
|
|
55147
|
+
return "Dispon�vel";
|
|
55147
55148
|
case "manualCallSetup":
|
|
55148
55149
|
return "Preparando";
|
|
55149
55150
|
case "manualCallRinging":
|
|
@@ -55201,7 +55202,7 @@ function AfterCallPanel({
|
|
|
55201
55202
|
{
|
|
55202
55203
|
type: "button",
|
|
55203
55204
|
onClick: () => onChangeResult("success"),
|
|
55204
|
-
className: tw`${result2 === "success" ? "bg-
|
|
55205
|
+
className: tw`${result2 === "success" ? "bg-green-500 text-white shadow-lg" : "bg-white text-slate-600"} rounded-xl border border-slate-200 px-3 py-2 text-sm font-semibold transition hover:border-green-400`,
|
|
55205
55206
|
children: "Atendimento concluido"
|
|
55206
55207
|
}
|
|
55207
55208
|
),
|
|
@@ -55267,15 +55268,15 @@ function ActiveCallSummary({
|
|
|
55267
55268
|
}) {
|
|
55268
55269
|
const durationLabel = durationSeconds > 0 ? formatDuration(durationSeconds) : "00:00";
|
|
55269
55270
|
const cleanNumber = (callTarget == null ? void 0 : callTarget.replace(/^\+55/, "")) || "Conectando...";
|
|
55270
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-lg border border-
|
|
55271
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-lg border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center justify-between gap-3`, children: [
|
|
55271
55272
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-2.5 min-w-0 flex-1`, children: [
|
|
55272
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex items-center justify-center w-8 h-8 rounded-full bg-
|
|
55273
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex items-center justify-center w-8 h-8 rounded-full bg-green-500 shrink-0 ${durationSeconds > 0 ? "animate-pulse" : ""}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiPhoneCall, { className: tw`text-sm text-white` }) }),
|
|
55273
55274
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex flex-col gap-0.5 min-w-0 flex-1`, children: [
|
|
55274
55275
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-base font-bold text-slate-800 truncate font-mono`, children: cleanNumber }),
|
|
55275
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium text-
|
|
55276
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium text-green-600 uppercase tracking-wider`, children: statusLabel })
|
|
55276
55277
|
] })
|
|
55277
55278
|
] }),
|
|
55278
|
-
durationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-1.5 bg-
|
|
55279
|
+
durationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-1.5 bg-green-500 rounded-lg px-2.5 py-1.5 shrink-0`, children: [
|
|
55279
55280
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiClock, { className: tw`text-xs text-white` }),
|
|
55280
55281
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-sm font-bold tabular-nums text-white`, children: durationLabel })
|
|
55281
55282
|
] })
|