callix-dialer-widget 1.3.2 → 1.3.4
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(() => {
|
|
@@ -54303,7 +54303,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54303
54303
|
const SpeakerIcon = outputMuted ? FiVolumeX : normalizedVolume > 0.65 ? FiVolume2 : FiVolume1;
|
|
54304
54304
|
const MicIcon = inputMuted ? FiMicOff : FiMic;
|
|
54305
54305
|
const statusVisual = getStatusVisual(callState);
|
|
54306
|
-
if (callState === "afterCall") {
|
|
54306
|
+
if (callState === "afterCall" && !isMiniMode) {
|
|
54307
54307
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54308
54308
|
AfterCallPanel,
|
|
54309
54309
|
{
|
|
@@ -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,18 @@ 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 rounded-xl border border-slate-200 bg-white/95 p-1.5 shadow-sm text-slate-800 overflow-hidden`].join(" "),
|
|
54406
54406
|
"data-callix-variant": "min",
|
|
54407
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-
|
|
54408
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
54409
|
-
|
|
54410
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[9px] text-slate-500`, children: "Esta etapa e obrigatoria." })
|
|
54411
|
-
] }),
|
|
54412
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`grid grid-cols-2 gap-1.5`, children: [
|
|
54407
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-1 rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 overflow-hidden`, children: [
|
|
54408
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`text-center`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[9px] font-semibold text-slate-700`, children: "Qualifique a chamada" }) }),
|
|
54409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`grid grid-cols-2 gap-0.5`, children: [
|
|
54413
54410
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54414
54411
|
"button",
|
|
54415
54412
|
{
|
|
54416
54413
|
type: "button",
|
|
54417
54414
|
onClick: () => setAfterCallResult("success"),
|
|
54418
|
-
className: tw`${afterCallResult === "success" ? "bg-
|
|
54419
|
-
children: "
|
|
54415
|
+
className: tw`${afterCallResult === "success" ? "bg-green-500 text-white" : "bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,
|
|
54416
|
+
children: "✓ Concluído"
|
|
54420
54417
|
}
|
|
54421
54418
|
),
|
|
54422
54419
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -54424,38 +54421,38 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54424
54421
|
{
|
|
54425
54422
|
type: "button",
|
|
54426
54423
|
onClick: () => setAfterCallResult("failure"),
|
|
54427
|
-
className: tw`${afterCallResult === "failure" ? "bg-rose-500 text-white
|
|
54428
|
-
children: "
|
|
54424
|
+
className: tw`${afterCallResult === "failure" ? "bg-rose-500 text-white" : "bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,
|
|
54425
|
+
children: "✗ Descartado"
|
|
54429
54426
|
}
|
|
54430
54427
|
)
|
|
54431
54428
|
] }),
|
|
54432
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-
|
|
54433
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54434
|
-
hasOptions ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`max-h-
|
|
54429
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-0.5`, children: [
|
|
54430
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[7px] font-medium text-slate-700 text-center`, children: "Selecione qualificação" }),
|
|
54431
|
+
hasOptions ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`max-h-16 space-y-0.5 overflow-y-auto`, children: options.map((qualification) => {
|
|
54435
54432
|
const isSelected = selectedQualificationId === qualification.id;
|
|
54436
54433
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54437
54434
|
"button",
|
|
54438
54435
|
{
|
|
54439
54436
|
type: "button",
|
|
54440
54437
|
onClick: () => setSelectedQualificationId(qualification.id),
|
|
54441
|
-
className: tw`${isSelected ? "
|
|
54442
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54438
|
+
className: tw`${isSelected ? "bg-blue-100 border-blue-300 text-blue-800" : "border-slate-200 bg-white text-slate-700"} w-full rounded border px-1 py-0.5 text-left transition`,
|
|
54439
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[7px] font-medium leading-tight truncate`, children: qualification.name })
|
|
54443
54440
|
},
|
|
54444
54441
|
qualification.id
|
|
54445
54442
|
);
|
|
54446
|
-
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded
|
|
54443
|
+
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded border border-amber-200 bg-amber-50 px-1 py-0.5 text-[7px] text-amber-700 text-center`, children: "Nenhuma qualificação" })
|
|
54447
54444
|
] }),
|
|
54448
|
-
afterCallError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[
|
|
54445
|
+
afterCallError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[7px] text-red-500 text-center`, children: afterCallError }),
|
|
54449
54446
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
54450
54447
|
"button",
|
|
54451
54448
|
{
|
|
54452
54449
|
type: "button",
|
|
54453
54450
|
onClick: handleFinishAfterCall,
|
|
54454
54451
|
disabled: !hasOptions || !selectedQualificationId || isSubmittingAfterCall,
|
|
54455
|
-
className: tw`flex w-full items-center justify-center gap-1
|
|
54452
|
+
className: tw`flex w-full items-center justify-center gap-1 rounded bg-blue-500 px-1.5 py-1 text-[7px] font-bold text-white transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-60`,
|
|
54456
54453
|
children: [
|
|
54457
|
-
isSubmittingAfterCall && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-flex h-
|
|
54458
|
-
"Finalizar
|
|
54454
|
+
isSubmittingAfterCall && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-flex h-2 w-2 animate-spin rounded-full border border-white/50 border-t-white` }),
|
|
54455
|
+
"Finalizar"
|
|
54459
54456
|
]
|
|
54460
54457
|
}
|
|
54461
54458
|
)
|
|
@@ -54463,7 +54460,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54463
54460
|
}
|
|
54464
54461
|
);
|
|
54465
54462
|
}
|
|
54466
|
-
console.log("[FloatingDialer Mini]
|
|
54463
|
+
console.log("[FloatingDialer Mini] ?? Estado da Chamada:", {
|
|
54467
54464
|
isCallActive,
|
|
54468
54465
|
callState,
|
|
54469
54466
|
statusLabel,
|
|
@@ -54472,7 +54469,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54472
54469
|
isRinging,
|
|
54473
54470
|
callDurationSeconds,
|
|
54474
54471
|
callTarget,
|
|
54475
|
-
statusVisualUsed: isCallActive ? "GREEN (
|
|
54472
|
+
statusVisualUsed: isCallActive ? "GREEN (green)" : "statusVisual",
|
|
54476
54473
|
timerVisible: isCallActive && callDurationSeconds > 0
|
|
54477
54474
|
});
|
|
54478
54475
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -54482,7 +54479,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54482
54479
|
"data-callix-variant": "min",
|
|
54483
54480
|
children: [
|
|
54484
54481
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center justify-between gap-2`, children: [
|
|
54485
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`${isCallActive ? "border-
|
|
54482
|
+
/* @__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
54483
|
/* @__PURE__ */ jsxRuntimeExports.jsx(statusVisual.Icon, { className: tw`text-xs` }),
|
|
54487
54484
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: statusLabel })
|
|
54488
54485
|
] }),
|
|
@@ -54491,7 +54488,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54491
54488
|
{
|
|
54492
54489
|
type: "button",
|
|
54493
54490
|
onClick: () => handleGoOffBreak(),
|
|
54494
|
-
className: tw`inline-flex items-center gap-1 rounded-full border border-
|
|
54491
|
+
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
54492
|
children: [
|
|
54496
54493
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: tw`text-xs` }),
|
|
54497
54494
|
"Voltar"
|
|
@@ -54510,13 +54507,13 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54510
54507
|
}
|
|
54511
54508
|
)
|
|
54512
54509
|
] }),
|
|
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-
|
|
54510
|
+
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: [
|
|
54511
|
+
/* @__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
54512
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex min-w-0 flex-1 flex-col gap-0.5`, children: [
|
|
54516
54513
|
/* @__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-
|
|
54514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium uppercase tracking-wider text-green-600`, children: statusLabel })
|
|
54518
54515
|
] }),
|
|
54519
|
-
callDurationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex shrink-0 items-center gap-1 rounded-lg bg-
|
|
54516
|
+
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
54517
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiClock, { className: tw`text-[10px] text-white` }),
|
|
54521
54518
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`tabular-nums text-xs font-bold text-white`, children: formatDuration(callDurationSeconds) })
|
|
54522
54519
|
] })
|
|
@@ -54574,7 +54571,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54574
54571
|
}
|
|
54575
54572
|
},
|
|
54576
54573
|
disabled: callButtonDisabled,
|
|
54577
|
-
className: tw`${isCallActive ? "bg-rose-500 hover:bg-rose-600" : "bg-
|
|
54574
|
+
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
54575
|
children: [
|
|
54579
54576
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhone, { className: tw`text-base` }),
|
|
54580
54577
|
isCallActive ? "Encerrar" : "Ligar"
|
|
@@ -54629,7 +54626,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54629
54626
|
{
|
|
54630
54627
|
type: "button",
|
|
54631
54628
|
onClick: handleGoOffBreak,
|
|
54632
|
-
className: tw`inline-flex items-center gap-1 rounded-lg border border-
|
|
54629
|
+
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
54630
|
"aria-label": "Sair da pausa",
|
|
54634
54631
|
children: [
|
|
54635
54632
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: tw`text-xs` }),
|
|
@@ -54688,14 +54685,14 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54688
54685
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center justify-between mb-2`, children: [
|
|
54689
54686
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-1.5`, children: [
|
|
54690
54687
|
/* @__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: "
|
|
54688
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[10px] uppercase tracking-wider text-slate-500 font-semibold`, children: "N�mero" })
|
|
54692
54689
|
] }),
|
|
54693
54690
|
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
54691
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-block h-1.5 w-1.5 rounded-full bg-primary animate-pulse` }),
|
|
54695
54692
|
"Ativo"
|
|
54696
54693
|
] })
|
|
54697
54694
|
] }),
|
|
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
|
|
54695
|
+
/* @__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
54696
|
]
|
|
54700
54697
|
}
|
|
54701
54698
|
),
|
|
@@ -54721,7 +54718,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54721
54718
|
type: "button",
|
|
54722
54719
|
onClick: handleCall,
|
|
54723
54720
|
disabled: !isNumberValid,
|
|
54724
|
-
className: tw`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-
|
|
54721
|
+
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
54722
|
children: [
|
|
54726
54723
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhone, { className: tw`text-base` }),
|
|
54727
54724
|
"Ligar"
|
|
@@ -54745,7 +54742,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54745
54742
|
{
|
|
54746
54743
|
type: "button",
|
|
54747
54744
|
onClick: handleAnswer,
|
|
54748
|
-
className: tw`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-
|
|
54745
|
+
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
54746
|
children: [
|
|
54750
54747
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiPhoneIncoming, { className: tw`text-sm` }),
|
|
54751
54748
|
"Atender"
|
|
@@ -54814,7 +54811,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54814
54811
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
54815
54812
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[10px] uppercase tracking-wide text-slate-500`, children: "Volume" }),
|
|
54816
54813
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: tw`text-sm font-semibold text-slate-800`, children: [
|
|
54817
|
-
"
|
|
54814
|
+
"Sa�da ",
|
|
54818
54815
|
volumePercent,
|
|
54819
54816
|
"%"
|
|
54820
54817
|
] })
|
|
@@ -54890,8 +54887,8 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54890
54887
|
value: selectedInputId ?? "",
|
|
54891
54888
|
onChange: handleSelectInputDevice,
|
|
54892
54889
|
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 || "
|
|
54890
|
+
audioDevices.inputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Padr�o" }),
|
|
54891
|
+
audioDevices.inputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "Padr�o" }, device.deviceId || device.label))
|
|
54895
54892
|
]
|
|
54896
54893
|
}
|
|
54897
54894
|
)
|
|
@@ -54899,7 +54896,7 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54899
54896
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: tw`space-y-1 text-xs text-slate-700`, children: [
|
|
54900
54897
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: tw`flex items-center gap-1.5 font-semibold`, children: [
|
|
54901
54898
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiHeadphones, { className: tw`text-sm text-primary` }),
|
|
54902
|
-
"
|
|
54899
|
+
"Sa�da"
|
|
54903
54900
|
] }),
|
|
54904
54901
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
54905
54902
|
"select",
|
|
@@ -54908,8 +54905,8 @@ function AuthenticatedDialer({ username, dialValue, setDialValue, onLogout, vari
|
|
|
54908
54905
|
value: selectedOutputId ?? "",
|
|
54909
54906
|
onChange: handleSelectOutputDevice,
|
|
54910
54907
|
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 || "
|
|
54908
|
+
audioDevices.outputs.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", children: "Padr�o" }),
|
|
54909
|
+
audioDevices.outputs.map((device) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: device.deviceId, children: device.label || "Padr�o" }, device.deviceId || device.label))
|
|
54913
54910
|
]
|
|
54914
54911
|
}
|
|
54915
54912
|
)
|
|
@@ -55096,8 +55093,8 @@ function getStatusVisual(state) {
|
|
|
55096
55093
|
case "idle":
|
|
55097
55094
|
return {
|
|
55098
55095
|
Icon: FiCheckCircle,
|
|
55099
|
-
badgeClass: tw`border-
|
|
55100
|
-
dotClass: tw`bg-
|
|
55096
|
+
badgeClass: tw`border-green-200 bg-green-50 text-green-700`,
|
|
55097
|
+
dotClass: tw`bg-green-500`
|
|
55101
55098
|
};
|
|
55102
55099
|
case "callInProgress":
|
|
55103
55100
|
case "manualCallSetup":
|
|
@@ -55143,7 +55140,7 @@ function getStatusLabel(state) {
|
|
|
55143
55140
|
case "starting":
|
|
55144
55141
|
return "Conectando";
|
|
55145
55142
|
case "idle":
|
|
55146
|
-
return "
|
|
55143
|
+
return "Dispon�vel";
|
|
55147
55144
|
case "manualCallSetup":
|
|
55148
55145
|
return "Preparando";
|
|
55149
55146
|
case "manualCallRinging":
|
|
@@ -55201,7 +55198,7 @@ function AfterCallPanel({
|
|
|
55201
55198
|
{
|
|
55202
55199
|
type: "button",
|
|
55203
55200
|
onClick: () => onChangeResult("success"),
|
|
55204
|
-
className: tw`${result2 === "success" ? "bg-
|
|
55201
|
+
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
55202
|
children: "Atendimento concluido"
|
|
55206
55203
|
}
|
|
55207
55204
|
),
|
|
@@ -55267,15 +55264,15 @@ function ActiveCallSummary({
|
|
|
55267
55264
|
}) {
|
|
55268
55265
|
const durationLabel = durationSeconds > 0 ? formatDuration(durationSeconds) : "00:00";
|
|
55269
55266
|
const cleanNumber = (callTarget == null ? void 0 : callTarget.replace(/^\+55/, "")) || "Conectando...";
|
|
55270
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`rounded-lg border border-
|
|
55267
|
+
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
55268
|
/* @__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-
|
|
55269
|
+
/* @__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
55270
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex flex-col gap-0.5 min-w-0 flex-1`, children: [
|
|
55274
55271
|
/* @__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-
|
|
55272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-[9px] font-medium text-green-600 uppercase tracking-wider`, children: statusLabel })
|
|
55276
55273
|
] })
|
|
55277
55274
|
] }),
|
|
55278
|
-
durationSeconds > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-1.5 bg-
|
|
55275
|
+
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
55276
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FiClock, { className: tw`text-xs text-white` }),
|
|
55280
55277
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`text-sm font-bold tabular-nums text-white`, children: durationLabel })
|
|
55281
55278
|
] })
|