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