@phonghq/go-chat 1.0.59 → 1.0.61
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.
|
@@ -113,6 +113,8 @@ function startTimer() {
|
|
|
113
113
|
const m = String(Math.floor(sec / 60)).padStart(2, '0');
|
|
114
114
|
const s = String(sec % 60).padStart(2, '0');
|
|
115
115
|
duration.value = `${m}:${s}`;
|
|
116
|
+
console.log(limitTime.value);
|
|
117
|
+
console.log(!limitTime.value || limitTime.value <= 0);
|
|
116
118
|
if (!limitTime.value || limitTime.value <= 0) {
|
|
117
119
|
handleTimeLimitError();
|
|
118
120
|
}
|
|
@@ -201,6 +203,7 @@ const startCall = async (data) => {
|
|
|
201
203
|
handleTimeLimitError();
|
|
202
204
|
return;
|
|
203
205
|
}
|
|
206
|
+
console.log('limitTime.value', limitTime.value);
|
|
204
207
|
callType = 'call';
|
|
205
208
|
await plivoCall(data.phone);
|
|
206
209
|
callStatus.value = PLIVO_CALL_STATUS.CALLING;
|
|
@@ -411,7 +414,7 @@ const { default: __VLS_8 } = __VLS_2.slots;
|
|
|
411
414
|
// @ts-ignore
|
|
412
415
|
[handleMute,];
|
|
413
416
|
} },
|
|
414
|
-
...{ class: "w-16 h-16 shadow-lg bg-white
|
|
417
|
+
...{ class: "w-16 h-16 shadow-lg bg-white text-black rounded-full flex items-center justify-center shadow-3xl transition" },
|
|
415
418
|
});
|
|
416
419
|
/** @type {[typeof IconMic, ]} */ ;
|
|
417
420
|
// @ts-ignore
|
|
@@ -435,7 +438,7 @@ const { default: __VLS_8 } = __VLS_2.slots;
|
|
|
435
438
|
// @ts-ignore
|
|
436
439
|
[endCall,];
|
|
437
440
|
} },
|
|
438
|
-
...{ class: "w-16 h-16 bg-white
|
|
441
|
+
...{ class: "w-16 h-16 bg-white text-white rounded-full flex items-center justify-center shadow-3xl transition" },
|
|
439
442
|
});
|
|
440
443
|
/** @type {[typeof IconClose, ]} */ ;
|
|
441
444
|
// @ts-ignore
|
|
@@ -542,7 +545,6 @@ __VLS_asFunctionalElement(__VLS_elements.audio, __VLS_elements.audio)({
|
|
|
542
545
|
/** @type {__VLS_StyleScopedClasses['h-16']} */ ;
|
|
543
546
|
/** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
|
|
544
547
|
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
545
|
-
/** @type {__VLS_StyleScopedClasses['hover:bg-green-600']} */ ;
|
|
546
548
|
/** @type {__VLS_StyleScopedClasses['text-black']} */ ;
|
|
547
549
|
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
|
|
548
550
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
@@ -553,7 +555,6 @@ __VLS_asFunctionalElement(__VLS_elements.audio, __VLS_elements.audio)({
|
|
|
553
555
|
/** @type {__VLS_StyleScopedClasses['w-16']} */ ;
|
|
554
556
|
/** @type {__VLS_StyleScopedClasses['h-16']} */ ;
|
|
555
557
|
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
556
|
-
/** @type {__VLS_StyleScopedClasses['hover:bg-green-600']} */ ;
|
|
557
558
|
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
558
559
|
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
|
|
559
560
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
@@ -71,6 +71,7 @@ export function usePlivo(callback) {
|
|
|
71
71
|
CallUuid = call?.callUUID;
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
74
|
+
console.log('e11111111111111', error);
|
|
74
75
|
callback(PLIVO_CALL_STATUS.CALL_END);
|
|
75
76
|
}
|
|
76
77
|
};
|
|
@@ -87,6 +88,7 @@ export function usePlivo(callback) {
|
|
|
87
88
|
};
|
|
88
89
|
const handleCallTerminated = (data, callInfo) => {
|
|
89
90
|
if (CallUuid === callInfo.callUUID) {
|
|
91
|
+
console.log('e22222222222222', data);
|
|
90
92
|
callback(PLIVO_CALL_STATUS.CALL_END, { message: data?.reason });
|
|
91
93
|
CallUuid = '';
|
|
92
94
|
}
|
|
@@ -150,12 +152,14 @@ export function usePlivo(callback) {
|
|
|
150
152
|
console.log('handleCallFailed', data);
|
|
151
153
|
if (custom_reject)
|
|
152
154
|
custom_reject?.(data);
|
|
155
|
+
console.log('e,3333333333333333333333333333', data);
|
|
153
156
|
callback(PLIVO_CALL_STATUS.CALL_END, { message: data });
|
|
154
157
|
if (data == 'User Denied Media Access') {
|
|
155
158
|
alert('Microphone access is blocked. Please enable the microphone permission to make a call.');
|
|
156
159
|
}
|
|
157
160
|
};
|
|
158
161
|
const handleIncomingCallCanceled = (callInfo) => {
|
|
162
|
+
console.log('e444444444444444', callInfo);
|
|
159
163
|
callback(PLIVO_CALL_STATUS.CALL_END, { reason: callInfo.reason ?? '' });
|
|
160
164
|
};
|
|
161
165
|
const handleMediaPermission = (e) => {
|
|
@@ -174,6 +178,7 @@ export function usePlivo(callback) {
|
|
|
174
178
|
tenant_id: dataProfile.value?.tenant_id ?? '',
|
|
175
179
|
phone: dataProfile.value?.phone ?? ''
|
|
176
180
|
});
|
|
181
|
+
console.log('res', res);
|
|
177
182
|
return res;
|
|
178
183
|
};
|
|
179
184
|
const sleep = () => {
|
package/dist/go-chat.es.js
CHANGED
|
@@ -36339,7 +36339,7 @@ const CH = (q, V, e) => {
|
|
|
36339
36339
|
}
|
|
36340
36340
|
}), YH = async (q) => {
|
|
36341
36341
|
const V = await Je.get("/api/v1/message/tenant/get-phone-time-limit", { params: q });
|
|
36342
|
-
return (V == null ? void 0 : V.remaining_seconds) ?? 0;
|
|
36342
|
+
return console.log("getPhoneTimeLimit", V), (V == null ? void 0 : V.remaining_seconds) ?? 0;
|
|
36343
36343
|
}, bH = async (q) => await Je.get("/api/v1/message/message/unread-count", { params: q }), GH = async (q) => await Je.post("/api/v1/general/storage/upload", q, {
|
|
36344
36344
|
headers: {
|
|
36345
36345
|
"Content-Type": "multipart/form-data"
|
|
@@ -71089,15 +71089,15 @@ function Miq(q) {
|
|
|
71089
71089
|
q(aV.CHECK_USER_OFFER, B);
|
|
71090
71090
|
const S = await E();
|
|
71091
71091
|
(I = e == null ? void 0 : e.client) == null || I.setRingTone(!0), q(aV.RINGING, { ...B, limit_time: S }), t = M == null ? void 0 : M.callUUID;
|
|
71092
|
-
} catch {
|
|
71093
|
-
q(aV.CALL_END);
|
|
71092
|
+
} catch (B) {
|
|
71093
|
+
console.log("e11111111111111", B), q(aV.CALL_END);
|
|
71094
71094
|
}
|
|
71095
71095
|
}, l = (M) => {
|
|
71096
71096
|
t = M.callUUID, q(aV.CALLING), i == null || i();
|
|
71097
71097
|
}, u = (M) => {
|
|
71098
71098
|
M.callUUID == t && (i == null || i(), q(aV.CALL_START));
|
|
71099
71099
|
}, c = (M, I) => {
|
|
71100
|
-
t === I.callUUID && (q(aV.CALL_END, { message: M == null ? void 0 : M.reason }), t = "");
|
|
71100
|
+
t === I.callUUID && (console.log("e22222222222222", M), q(aV.CALL_END, { message: M == null ? void 0 : M.reason }), t = "");
|
|
71101
71101
|
}, d = (M, I = "1") => {
|
|
71102
71102
|
let B = M.replace(/[^0-9]/g, "");
|
|
71103
71103
|
return B != null && B.startsWith(I) ? B.slice(I.toString().length) : B;
|
|
@@ -71127,9 +71127,9 @@ function Miq(q) {
|
|
|
71127
71127
|
var I, B, S, D, x;
|
|
71128
71128
|
M == aV.RINGING ? (B = (I = e == null ? void 0 : e.client) == null ? void 0 : I.reject) == null || B.call(I, t) : (M == aV.CALL_START || M == aV.CALLING) && ((D = (S = e == null ? void 0 : e.client) == null ? void 0 : S.hangup) == null || D.call(S)), (x = e == null ? void 0 : e.client) == null || x.setRingTone(!1);
|
|
71129
71129
|
}, v = (M, I) => {
|
|
71130
|
-
console.log("handleCallFailed", M), n && (n == null || n(M)), q(aV.CALL_END, { message: M }), M == "User Denied Media Access" && alert("Microphone access is blocked. Please enable the microphone permission to make a call.");
|
|
71130
|
+
console.log("handleCallFailed", M), n && (n == null || n(M)), console.log("e,3333333333333333333333333333", M), q(aV.CALL_END, { message: M }), M == "User Denied Media Access" && alert("Microphone access is blocked. Please enable the microphone permission to make a call.");
|
|
71131
71131
|
}, y = (M) => {
|
|
71132
|
-
q(aV.CALL_END, { reason: M.reason ?? "" });
|
|
71132
|
+
console.log("e444444444444444", M), q(aV.CALL_END, { reason: M.reason ?? "" });
|
|
71133
71133
|
}, _ = (M) => {
|
|
71134
71134
|
console.log("MediaPermission", M), (M == null ? void 0 : M.status) == "failure" && q(aV.MEDIA_PERMISSION_FAIL);
|
|
71135
71135
|
}, g = (M) => {
|
|
@@ -71137,10 +71137,11 @@ function Miq(q) {
|
|
|
71137
71137
|
alert(M), (S = (B = (I = e == null ? void 0 : e.client) == null ? void 0 : I.audio) == null ? void 0 : B.set) == null || S.call(B, M);
|
|
71138
71138
|
}, E = async () => {
|
|
71139
71139
|
var I, B;
|
|
71140
|
-
|
|
71140
|
+
const M = await YH({
|
|
71141
71141
|
tenant_id: ((I = dV.value) == null ? void 0 : I.tenant_id) ?? "",
|
|
71142
71142
|
phone: ((B = dV.value) == null ? void 0 : B.phone) ?? ""
|
|
71143
71143
|
});
|
|
71144
|
+
return console.log("res", M), M;
|
|
71144
71145
|
};
|
|
71145
71146
|
return {
|
|
71146
71147
|
plivoLogin: o,
|
|
@@ -71317,7 +71318,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
|
|
|
71317
71318
|
I = setInterval(() => {
|
|
71318
71319
|
F++, M.value = M.value - 1;
|
|
71319
71320
|
const U = String(Math.floor(F / 60)).padStart(2, "0"), tq = String(F % 60).padStart(2, "0");
|
|
71320
|
-
f.value = `${U}:${tq}`, (!M.value || M.value <= 0) && $();
|
|
71321
|
+
f.value = `${U}:${tq}`, console.log(M.value), console.log(!M.value || M.value <= 0), (!M.value || M.value <= 0) && $();
|
|
71321
71322
|
}, 1e3);
|
|
71322
71323
|
}
|
|
71323
71324
|
function Y(F) {
|
|
@@ -71359,7 +71360,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
|
|
|
71359
71360
|
$();
|
|
71360
71361
|
return;
|
|
71361
71362
|
}
|
|
71362
|
-
D = "call", await r(F.phone), a.value = aV.CALLING;
|
|
71363
|
+
console.log("limitTime.value", M.value), D = "call", await r(F.phone), a.value = aV.CALLING;
|
|
71363
71364
|
} catch (U) {
|
|
71364
71365
|
console.log("111111111111111111111111"), Y(), console.log(U), m.value = (U == null ? void 0 : U.message) || JSON.stringify(U), a.value = aV.CONNECT_FAILED;
|
|
71365
71366
|
}
|
|
@@ -71392,7 +71393,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
|
|
|
71392
71393
|
}, P = async () => {
|
|
71393
71394
|
liq(v.value);
|
|
71394
71395
|
}, Vq = () => {
|
|
71395
|
-
v.value = "";
|
|
71396
|
+
v.value = "", m.value = "";
|
|
71396
71397
|
};
|
|
71397
71398
|
return V({ startCall: J, endCall: Y, userRemoter: g, callStatus: a, answer: Q, label: p, closeModal: T }), (F, U) => (vq(), Cq(ne, null, [
|
|
71398
71399
|
qV(ZO, {
|
|
@@ -71446,14 +71447,14 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
|
|
|
71446
71447
|
a.value == fq(aV).CALL_START ? (vq(), Cq("button", {
|
|
71447
71448
|
key: 1,
|
|
71448
71449
|
onClick: U[0] || (U[0] = (H) => k()),
|
|
71449
|
-
class: "w-16 h-16 shadow-lg bg-white
|
|
71450
|
+
class: "w-16 h-16 shadow-lg bg-white text-black rounded-full flex items-center justify-center shadow-3xl transition"
|
|
71450
71451
|
}, [
|
|
71451
71452
|
qV(Iiq, { mute: E.value }, null, 8, ["mute"])
|
|
71452
71453
|
])) : fV("", !0),
|
|
71453
71454
|
a.value == fq(aV).CALL_END ? (vq(), Cq("button", {
|
|
71454
71455
|
key: 2,
|
|
71455
71456
|
onClick: U[1] || (U[1] = (H) => Y({ closeModal: !0 })),
|
|
71456
|
-
class: "w-16 h-16 bg-white
|
|
71457
|
+
class: "w-16 h-16 bg-white text-white rounded-full flex items-center justify-center shadow-3xl transition"
|
|
71457
71458
|
}, [
|
|
71458
71459
|
qV(yiq)
|
|
71459
71460
|
])) : fV("", !0),
|
|
@@ -71487,7 +71488,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
|
|
|
71487
71488
|
}, null, 8, Qiq)
|
|
71488
71489
|
], 64));
|
|
71489
71490
|
}
|
|
71490
|
-
}), Fiq = /* @__PURE__ */ FV(Piq, [["__scopeId", "data-v-
|
|
71491
|
+
}), Fiq = /* @__PURE__ */ FV(Piq, [["__scopeId", "data-v-394dae06"]]), jiq = ["onClick"], Liq = { class: "cursor-pointer" }, Ziq = /* @__PURE__ */ Hq({
|
|
71491
71492
|
__name: "SelectBase",
|
|
71492
71493
|
props: {
|
|
71493
71494
|
modelValue: {},
|