@appsurify-testmap/rrweb-all 3.6.0-alpha.1 → 3.10.0-alpha.1
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/rrweb-all.cjs +99 -33
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +99 -33
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +99 -33
- package/dist/rrweb-all.umd.cjs.map +2 -2
- package/dist/rrweb-all.umd.min.cjs +34 -34
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-all.js
CHANGED
|
@@ -15900,7 +15900,8 @@ function initInputObserver({
|
|
|
15900
15900
|
maskInputOptions,
|
|
15901
15901
|
maskInputFn,
|
|
15902
15902
|
sampling,
|
|
15903
|
-
userTriggeredOnInput
|
|
15903
|
+
userTriggeredOnInput,
|
|
15904
|
+
trustSyntheticInput
|
|
15904
15905
|
}) {
|
|
15905
15906
|
function eventHandler(event) {
|
|
15906
15907
|
let target = getEventTarget(event);
|
|
@@ -15950,34 +15951,53 @@ function initInputObserver({
|
|
|
15950
15951
|
function cbWithDedup(target, v2) {
|
|
15951
15952
|
const lastInputValue = lastInputValueMap.get(target);
|
|
15952
15953
|
const el = target;
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15972
|
-
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15954
|
+
if (trustSyntheticInput) {
|
|
15955
|
+
const isInitialEmpty = !v2.userTriggered && el.value === "" && !v2.isChecked && !lastInputValue;
|
|
15956
|
+
const isSelectDefaultSelection = el.tagName === "SELECT" && !v2.userTriggered && !lastInputValue && el.selectedIndex === 0;
|
|
15957
|
+
if (isInitialEmpty || isSelectDefaultSelection) {
|
|
15958
|
+
console.debug(
|
|
15959
|
+
`[${nowTimestamp()}] [rrweb:record/observer] phantom input ignored (trust mode)`,
|
|
15960
|
+
{
|
|
15961
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
15962
|
+
node: index.describeNode(el),
|
|
15963
|
+
tag: el.tagName,
|
|
15964
|
+
value: el.value,
|
|
15965
|
+
isInitialEmpty,
|
|
15966
|
+
isSelectDefaultSelection
|
|
15967
|
+
}
|
|
15968
|
+
);
|
|
15969
|
+
return;
|
|
15970
|
+
}
|
|
15971
|
+
} else {
|
|
15972
|
+
const hasPlaceholder = el.hasAttribute("placeholder");
|
|
15973
|
+
const isEmpty = el.value === "";
|
|
15974
|
+
const isDefaultEmpty = typeof el.defaultValue === "string" ? el.defaultValue === "" : true;
|
|
15975
|
+
const isNonUser = !v2.userTriggered;
|
|
15976
|
+
const isRepeatEmpty = !lastInputValue || lastInputValue.text === "";
|
|
15977
|
+
const isLikelyPhantom = hasPlaceholder && isEmpty && isDefaultEmpty && isRepeatEmpty && isNonUser && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
15978
|
+
const isRenderDrivenTextInput = el.tagName === "INPUT" && el.type === "text" && !v2.userTriggered && v2.text === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder");
|
|
15979
|
+
const isValueFromDefault = !v2.userTriggered && el.value === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder") && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
15980
|
+
const isPhantomCheckbox = el.type === "checkbox" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
15981
|
+
const isPhantomRadio = el.type === "radio" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
15982
|
+
if (isLikelyPhantom || isRenderDrivenTextInput || isValueFromDefault || isPhantomCheckbox || isPhantomRadio) {
|
|
15983
|
+
console.debug(
|
|
15984
|
+
`[${nowTimestamp()}] [rrweb:record/observer] ⛔ phantom input ignored`,
|
|
15985
|
+
{
|
|
15986
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
15987
|
+
node: index.describeNode(el),
|
|
15988
|
+
tag: el.tagName,
|
|
15989
|
+
nodeType: el.nodeType,
|
|
15990
|
+
attribute: el.attributes,
|
|
15991
|
+
value: el.value,
|
|
15992
|
+
isLikelyPhantom,
|
|
15993
|
+
isRenderDrivenTextInput,
|
|
15994
|
+
isValueFromDefault,
|
|
15995
|
+
isPhantomCheckbox,
|
|
15996
|
+
isPhantomRadio
|
|
15997
|
+
}
|
|
15998
|
+
);
|
|
15999
|
+
return;
|
|
16000
|
+
}
|
|
15981
16001
|
}
|
|
15982
16002
|
if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {
|
|
15983
16003
|
lastInputValueMap.set(target, v2);
|
|
@@ -18028,8 +18048,15 @@ class NavigationManager {
|
|
|
18028
18048
|
handleNavigation(data) {
|
|
18029
18049
|
if (this.disabled) return;
|
|
18030
18050
|
if (this.locked) return;
|
|
18031
|
-
this.
|
|
18032
|
-
|
|
18051
|
+
if (this.pendingNavigation) {
|
|
18052
|
+
this.cancelTimers();
|
|
18053
|
+
this.disconnectSettlingObserver();
|
|
18054
|
+
this.pendingNavigation = null;
|
|
18055
|
+
this.onSnapshot(true);
|
|
18056
|
+
} else {
|
|
18057
|
+
this.cancelTimers();
|
|
18058
|
+
this.disconnectSettlingObserver();
|
|
18059
|
+
}
|
|
18033
18060
|
this.pendingNavigation = data;
|
|
18034
18061
|
if (this.frozen) {
|
|
18035
18062
|
return;
|
|
@@ -18236,7 +18263,7 @@ class ProcessedNodeManager {
|
|
|
18236
18263
|
destroy() {
|
|
18237
18264
|
}
|
|
18238
18265
|
}
|
|
18239
|
-
const version$1 = "3.
|
|
18266
|
+
const version$1 = "3.10.0-alpha.1";
|
|
18240
18267
|
let wrappedEmit;
|
|
18241
18268
|
let takeFullSnapshot$1;
|
|
18242
18269
|
let canvasManager;
|
|
@@ -18285,6 +18312,7 @@ function record(options = {}) {
|
|
|
18285
18312
|
recordAfter = options.recordAfter === "DOMContentLoaded" ? options.recordAfter : "load",
|
|
18286
18313
|
flushCustomEvent = options.flushCustomEvent !== void 0 ? options.flushCustomEvent : "after",
|
|
18287
18314
|
userTriggeredOnInput = false,
|
|
18315
|
+
trustSyntheticInput = false,
|
|
18288
18316
|
collectFonts = false,
|
|
18289
18317
|
inlineImages = false,
|
|
18290
18318
|
plugins,
|
|
@@ -18824,6 +18852,7 @@ function record(options = {}) {
|
|
|
18824
18852
|
recordCanvas,
|
|
18825
18853
|
inlineImages,
|
|
18826
18854
|
userTriggeredOnInput,
|
|
18855
|
+
trustSyntheticInput,
|
|
18827
18856
|
collectFonts,
|
|
18828
18857
|
doc,
|
|
18829
18858
|
maskInputFn,
|
|
@@ -18900,6 +18929,43 @@ function record(options = {}) {
|
|
|
18900
18929
|
);
|
|
18901
18930
|
}
|
|
18902
18931
|
return () => {
|
|
18932
|
+
if (recording) {
|
|
18933
|
+
const activeEl = document.activeElement;
|
|
18934
|
+
if (activeEl && INPUT_TAGS.includes(activeEl.tagName)) {
|
|
18935
|
+
const inputEl = activeEl;
|
|
18936
|
+
const id = mirror.getId(inputEl);
|
|
18937
|
+
if (id !== -1) {
|
|
18938
|
+
const lastValue = lastInputValueMap.get(inputEl);
|
|
18939
|
+
let text = inputEl.value;
|
|
18940
|
+
let isChecked = false;
|
|
18941
|
+
const type = getInputType(inputEl) || "";
|
|
18942
|
+
if (type === "radio" || type === "checkbox") {
|
|
18943
|
+
isChecked = inputEl.checked;
|
|
18944
|
+
} else if (maskInputOptions[inputEl.tagName.toLowerCase()] || maskInputOptions[type]) {
|
|
18945
|
+
text = maskInputValue({
|
|
18946
|
+
element: inputEl,
|
|
18947
|
+
maskInputOptions,
|
|
18948
|
+
tagName: inputEl.tagName,
|
|
18949
|
+
type,
|
|
18950
|
+
value: text,
|
|
18951
|
+
maskInputFn
|
|
18952
|
+
});
|
|
18953
|
+
}
|
|
18954
|
+
if (!lastValue || lastValue.text !== text || lastValue.isChecked !== isChecked) {
|
|
18955
|
+
const inputData = userTriggeredOnInput ? { text, isChecked, userTriggered: false } : { text, isChecked };
|
|
18956
|
+
lastInputValueMap.set(inputEl, inputData);
|
|
18957
|
+
wrappedEmit({
|
|
18958
|
+
type: EventType.IncrementalSnapshot,
|
|
18959
|
+
data: {
|
|
18960
|
+
source: IncrementalSource.Input,
|
|
18961
|
+
...inputData,
|
|
18962
|
+
id
|
|
18963
|
+
}
|
|
18964
|
+
});
|
|
18965
|
+
}
|
|
18966
|
+
}
|
|
18967
|
+
}
|
|
18968
|
+
}
|
|
18903
18969
|
if (checkoutDebounceTimer) {
|
|
18904
18970
|
clearTimeout(checkoutDebounceTimer);
|
|
18905
18971
|
checkoutDebounceTimer = null;
|
|
@@ -21831,7 +21897,7 @@ class Replayer {
|
|
|
21831
21897
|
this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);
|
|
21832
21898
|
}
|
|
21833
21899
|
}
|
|
21834
|
-
const version = "3.
|
|
21900
|
+
const version = "3.10.0-alpha.1";
|
|
21835
21901
|
const { getVersion } = record;
|
|
21836
21902
|
const { isRecording } = record;
|
|
21837
21903
|
const { flushCustomEventQueue } = record;
|