@skippr/live-agent-sdk 0.63.0 → 0.65.0
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/dist/esm/lib-exports.js +0 -21
- package/dist/skippr-sdk.js +53 -53
- package/package.json +4 -2
package/dist/esm/lib-exports.js
CHANGED
|
@@ -3196,8 +3196,6 @@ function parsePageAction(payload) {
|
|
|
3196
3196
|
const direction = parseScrollDirection(json.direction);
|
|
3197
3197
|
return typeof json.ref === "string" && direction ? { type: "scroll_in", ref: json.ref, direction } : null;
|
|
3198
3198
|
}
|
|
3199
|
-
case "navigate":
|
|
3200
|
-
return typeof json.url === "string" ? { type: "navigate", url: json.url } : null;
|
|
3201
3199
|
default:
|
|
3202
3200
|
return null;
|
|
3203
3201
|
}
|
|
@@ -3205,16 +3203,6 @@ function parsePageAction(payload) {
|
|
|
3205
3203
|
return null;
|
|
3206
3204
|
}
|
|
3207
3205
|
}
|
|
3208
|
-
function isSameOriginHttpUrl(url) {
|
|
3209
|
-
try {
|
|
3210
|
-
const parsed = new URL(url);
|
|
3211
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:")
|
|
3212
|
-
return false;
|
|
3213
|
-
return parsed.origin === window.location.origin;
|
|
3214
|
-
} catch {
|
|
3215
|
-
return false;
|
|
3216
|
-
}
|
|
3217
|
-
}
|
|
3218
3206
|
function isVisible2(element) {
|
|
3219
3207
|
const rect = element.getBoundingClientRect();
|
|
3220
3208
|
if (rect.width === 0 && rect.height === 0)
|
|
@@ -3391,8 +3379,6 @@ function labelFor(action) {
|
|
|
3391
3379
|
return "Scrolling…";
|
|
3392
3380
|
case "hover":
|
|
3393
3381
|
return "Hovering…";
|
|
3394
|
-
case "navigate":
|
|
3395
|
-
return "Navigating…";
|
|
3396
3382
|
}
|
|
3397
3383
|
}
|
|
3398
3384
|
function PageActionHandler() {
|
|
@@ -3403,13 +3389,6 @@ function PageActionHandler() {
|
|
|
3403
3389
|
const endStepRef = useRef8(null);
|
|
3404
3390
|
const runStep = useCallback7((action) => {
|
|
3405
3391
|
return new Promise((resolve) => {
|
|
3406
|
-
if (action.type === "navigate") {
|
|
3407
|
-
queueRef.current.length = 0;
|
|
3408
|
-
if (isSameOriginHttpUrl(action.url))
|
|
3409
|
-
window.location.assign(action.url);
|
|
3410
|
-
resolve(true);
|
|
3411
|
-
return;
|
|
3412
|
-
}
|
|
3413
3392
|
if (action.type === "scroll_page") {
|
|
3414
3393
|
let scrolled = false;
|
|
3415
3394
|
const finishScroll = () => {
|