callix-dialer-widget 1.3.11 → 1.3.13
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.
|
@@ -55404,6 +55404,7 @@ function formatDuration(seconds) {
|
|
|
55404
55404
|
const API_BASE_URL = typeof window !== "undefined" ? window.__CALLIX_API_BASE_URL__ || "https://callix-zeta.vercel.app" : "https://callix-zeta.vercel.app";
|
|
55405
55405
|
function getSessionToken() {
|
|
55406
55406
|
if (typeof window === "undefined") return null;
|
|
55407
|
+
console.log("[DraggableClientInfoModal] 🔍 Buscando token de sessão no localStorage...");
|
|
55407
55408
|
const possibleKeys = [
|
|
55408
55409
|
"callix_dialer_session_token",
|
|
55409
55410
|
"callix_session_token",
|
|
@@ -55411,15 +55412,27 @@ function getSessionToken() {
|
|
|
55411
55412
|
];
|
|
55412
55413
|
for (const key of possibleKeys) {
|
|
55413
55414
|
const value = localStorage.getItem(key);
|
|
55415
|
+
console.log(`[DraggableClientInfoModal] Verificando chave "${key}":`, value ? "✓ encontrado" : "✗ não encontrado");
|
|
55414
55416
|
if (value) {
|
|
55415
55417
|
try {
|
|
55416
55418
|
const parsed = JSON.parse(value);
|
|
55417
|
-
|
|
55419
|
+
console.log("[DraggableClientInfoModal] Valor parseado:", parsed);
|
|
55420
|
+
const token = parsed.token || parsed.sessionToken || value;
|
|
55421
|
+
console.log("[DraggableClientInfoModal] ✅ Token extraído:", (token == null ? void 0 : token.substring(0, 20)) + "...");
|
|
55422
|
+
return token;
|
|
55418
55423
|
} catch {
|
|
55424
|
+
console.log("[DraggableClientInfoModal] ✅ Token (string direto):", (value == null ? void 0 : value.substring(0, 20)) + "...");
|
|
55419
55425
|
return value;
|
|
55420
55426
|
}
|
|
55421
55427
|
}
|
|
55422
55428
|
}
|
|
55429
|
+
console.log("[DraggableClientInfoModal] ⚠️ Token não encontrado. Chaves disponíveis no localStorage:");
|
|
55430
|
+
for (let i2 = 0; i2 < localStorage.length; i2++) {
|
|
55431
|
+
const key = localStorage.key(i2);
|
|
55432
|
+
if (key) {
|
|
55433
|
+
console.log(` - ${key}`);
|
|
55434
|
+
}
|
|
55435
|
+
}
|
|
55423
55436
|
return null;
|
|
55424
55437
|
}
|
|
55425
55438
|
function getAuthHeaders() {
|
|
@@ -56012,12 +56025,15 @@ function DraggableQualificationModal({
|
|
|
56012
56025
|
}
|
|
56013
56026
|
function InlineDialer({ variant = "default", isAuthenticated, ...props }) {
|
|
56014
56027
|
const isMiniMode = variant === "min";
|
|
56015
|
-
|
|
56016
|
-
|
|
56017
|
-
|
|
56018
|
-
const
|
|
56019
|
-
const
|
|
56020
|
-
const
|
|
56028
|
+
if (!isAuthenticated || !isMiniMode) {
|
|
56029
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FloatingDialer, { variant, isAuthenticated, ...props });
|
|
56030
|
+
}
|
|
56031
|
+
const operatorState = clientSdkReactExports.useCallOperatorState();
|
|
56032
|
+
const currentCall = clientSdkReactExports.useCallOperatorCurrentCall();
|
|
56033
|
+
const currentCallInfo = clientSdkReactExports.useCallOperatorCurrentCallInfo();
|
|
56034
|
+
const successQualifications = clientSdkReactExports.useCallOperatorSuccessQualifications();
|
|
56035
|
+
const discardQualifications = clientSdkReactExports.useCallOperatorDiscardQualifications();
|
|
56036
|
+
const { finishAfterCall } = clientSdkReactExports.useCallOperatorControls();
|
|
56021
56037
|
const [isClientInfoModalOpen, setIsClientInfoModalOpen] = useState(false);
|
|
56022
56038
|
const [isQualificationModalOpen, setIsQualificationModalOpen] = useState(false);
|
|
56023
56039
|
const [callDurationSeconds, setCallDurationSeconds] = useState(0);
|