@16x/webphone-sdk 3.2.4 → 3.2.5
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/CHANGELOG.md +5 -0
- package/dist/{Diagnostics-B1EdRU6l.cjs → Diagnostics-A7Z5fddO.cjs} +1 -1
- package/dist/{Diagnostics-CwcR4kCt.js → Diagnostics-bC1jC3qZ.js} +1 -1
- package/dist/diagnostics/index.cjs +1 -1
- package/dist/diagnostics/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/legacy/index.cjs +1 -1
- package/dist/legacy/index.js +1 -1
- package/dist/{legacySessionProvider-BdOk_ssd.js → legacySessionProvider-BlHM7TTM.js} +1 -1
- package/dist/{legacySessionProvider-BK9-n2uj.cjs → legacySessionProvider-DEC6MTLR.cjs} +1 -1
- package/dist/ui/i18n/types.d.ts +1 -0
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +18 -9
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var e = {
|
|
|
32
32
|
permissionBody: "Allow microphone access in the browser settings, then check again.",
|
|
33
33
|
errorTitle: "Unable to continue",
|
|
34
34
|
errorBody: "Check the network, origin allowlist, or agent permission, then retry.",
|
|
35
|
+
errorTokenUnavailable: "Could not get a sign-in token. Check that the token service is running and configured.",
|
|
35
36
|
currentCall: "Current call",
|
|
36
37
|
inbound: "Inbound",
|
|
37
38
|
outbound: "Outbound",
|
|
@@ -83,6 +84,7 @@ var e = {
|
|
|
83
84
|
permissionBody: "请在浏览器设置中允许本网站访问麦克风,然后重新检测。",
|
|
84
85
|
errorTitle: "无法继续通话",
|
|
85
86
|
errorBody: "请检查网络、域名授权或坐席权限后重试。",
|
|
87
|
+
errorTokenUnavailable: "无法获取登录凭证,请检查 token 服务是否启动及配置是否正确。",
|
|
86
88
|
currentCall: "当前通话",
|
|
87
89
|
inbound: "呼入",
|
|
88
90
|
outbound: "呼出",
|
|
@@ -443,13 +445,20 @@ function A(e) {
|
|
|
443
445
|
case "unrecoverable-error":
|
|
444
446
|
case "unsupported": return p("div", {
|
|
445
447
|
attrs: { part: "panel" },
|
|
446
|
-
children: [
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
448
|
+
children: [
|
|
449
|
+
p("div", {
|
|
450
|
+
attrs: {
|
|
451
|
+
role: "alert",
|
|
452
|
+
part: "status-rail"
|
|
453
|
+
},
|
|
454
|
+
text: e.messages.errorTitle ?? "无法继续通话"
|
|
455
|
+
}),
|
|
456
|
+
p("p", { text: e.view.kind === "unrecoverable-error" && e.view.code === "AUTH_TOKEN_UNAVAILABLE" ? e.messages.errorTokenUnavailable ?? "无法获取登录凭证,请检查 token 服务是否启动及配置是否正确。" : e.messages.errorBody ?? "请检查网络、域名授权或坐席权限后重试。" }),
|
|
457
|
+
...e.view.kind === "unrecoverable-error" ? [p("code", {
|
|
458
|
+
attrs: { "data-error-code": e.view.code },
|
|
459
|
+
text: e.view.code
|
|
460
|
+
})] : []
|
|
461
|
+
]
|
|
453
462
|
});
|
|
454
463
|
case "setup":
|
|
455
464
|
case "connecting":
|
|
@@ -884,7 +893,7 @@ var B = ":root,:host{--ccbar-color-surface:#fff;--ccbar-color-surface-muted:#f1f
|
|
|
884
893
|
}
|
|
885
894
|
let r = e.closest("[data-action]");
|
|
886
895
|
if (!(r instanceof HTMLElement) || r instanceof HTMLButtonElement && r.disabled && r.getAttribute("data-action") !== "enable-phone") return;
|
|
887
|
-
let a = this.#e?.getActiveCall?.();
|
|
896
|
+
let a = this.#e?.getActiveCall?.() ?? this.#e?.getCalls?.().find((e) => e.state === "held");
|
|
888
897
|
switch (r.getAttribute("data-action")) {
|
|
889
898
|
case "signin":
|
|
890
899
|
if (this.#e === void 0) return;
|
|
@@ -948,7 +957,7 @@ var B = ":root,:host{--ccbar-color-surface:#fff;--ccbar-color-surface-muted:#f1f
|
|
|
948
957
|
}
|
|
949
958
|
}
|
|
950
959
|
async #I(e) {
|
|
951
|
-
let t = this.#e?.getActiveCall?.();
|
|
960
|
+
let t = this.#e?.getActiveCall?.() ?? this.#e?.getCalls?.().find((e) => e.state === "held");
|
|
952
961
|
if (t !== void 0 && (t.state === "active" || t.state === "held")) {
|
|
953
962
|
await d(t, e);
|
|
954
963
|
return;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.2.
|
|
1
|
+
export declare const SDK_VERSION = "3.2.5";
|