@openreplay/tracker 17.2.9 → 17.2.10
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/cjs/entry.js +20 -5
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +20 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/lib/entry.js +20 -5
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +20 -5
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/entry.js
CHANGED
|
@@ -4005,7 +4005,7 @@ class App {
|
|
|
4005
4005
|
this.stopCallbacks = [];
|
|
4006
4006
|
this.commitCallbacks = [];
|
|
4007
4007
|
this.activityState = ActivityState.NotActive;
|
|
4008
|
-
this.version = '17.2.
|
|
4008
|
+
this.version = '17.2.10'; // TODO: version compatability check inside each plugin.
|
|
4009
4009
|
this.socketMode = false;
|
|
4010
4010
|
this.compressionThreshold = 24 * 1000;
|
|
4011
4011
|
this.bc = null;
|
|
@@ -6035,9 +6035,11 @@ function Input (app, opts) {
|
|
|
6035
6035
|
}
|
|
6036
6036
|
const inputValues = new Map();
|
|
6037
6037
|
const checkboxValues = new Map();
|
|
6038
|
+
const selectValues = new Map();
|
|
6038
6039
|
app.attachStopCallback(() => {
|
|
6039
6040
|
inputValues.clear();
|
|
6040
6041
|
checkboxValues.clear();
|
|
6042
|
+
selectValues.clear();
|
|
6041
6043
|
tagSelectorMap.clear();
|
|
6042
6044
|
});
|
|
6043
6045
|
function trackInputValue(id, node) {
|
|
@@ -6054,6 +6056,13 @@ function Input (app, opts) {
|
|
|
6054
6056
|
checkboxValues.set(id, value);
|
|
6055
6057
|
app.send(SetInputChecked(id, value));
|
|
6056
6058
|
}
|
|
6059
|
+
function trackSelectValue(id, node) {
|
|
6060
|
+
if (selectValues.get(id) === node.value) {
|
|
6061
|
+
return;
|
|
6062
|
+
}
|
|
6063
|
+
selectValues.set(id, node.value);
|
|
6064
|
+
sendInputValue(id, node);
|
|
6065
|
+
}
|
|
6057
6066
|
// The only way (to our knowledge) to track all kinds of input changes, including those made by JS
|
|
6058
6067
|
app.ticker.attach(() => {
|
|
6059
6068
|
inputValues.forEach((value, id) => {
|
|
@@ -6068,6 +6077,12 @@ function Input (app, opts) {
|
|
|
6068
6077
|
return checkboxValues.delete(id);
|
|
6069
6078
|
trackCheckboxValue(id, node.checked);
|
|
6070
6079
|
});
|
|
6080
|
+
selectValues.forEach((_, id) => {
|
|
6081
|
+
const node = app.nodes.getNode(id);
|
|
6082
|
+
if (!node)
|
|
6083
|
+
return selectValues.delete(id);
|
|
6084
|
+
trackSelectValue(id, node);
|
|
6085
|
+
});
|
|
6071
6086
|
}, 3);
|
|
6072
6087
|
function sendInputChange(id, node, hesitationTime, inputTime) {
|
|
6073
6088
|
const { value, mask } = getInputValue(id, node);
|
|
@@ -6084,8 +6099,8 @@ function Input (app, opts) {
|
|
|
6084
6099
|
}
|
|
6085
6100
|
// TODO: support multiple select (?): use selectedOptions;
|
|
6086
6101
|
if (hasTag(node, 'select')) {
|
|
6087
|
-
|
|
6088
|
-
app.nodes.attachNodeListener(node, 'change', () =>
|
|
6102
|
+
trackSelectValue(id, node);
|
|
6103
|
+
app.nodes.attachNodeListener(node, 'change', () => trackSelectValue(id, node));
|
|
6089
6104
|
}
|
|
6090
6105
|
if (isTextFieldElement(node)) {
|
|
6091
6106
|
trackInputValue(id, node);
|
|
@@ -8938,7 +8953,7 @@ class ConstantProperties {
|
|
|
8938
8953
|
user_id: this.user_id,
|
|
8939
8954
|
distinct_id: this.deviceId,
|
|
8940
8955
|
sdk_edition: 'web',
|
|
8941
|
-
sdk_version: '17.2.
|
|
8956
|
+
sdk_version: '17.2.10',
|
|
8942
8957
|
timezone: getUTCOffsetString(),
|
|
8943
8958
|
search_engine: this.searchEngine,
|
|
8944
8959
|
};
|
|
@@ -9640,7 +9655,7 @@ class API {
|
|
|
9640
9655
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9641
9656
|
const doNotTrack = this.checkDoNotTrack();
|
|
9642
9657
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9643
|
-
trackerVersion: '17.2.
|
|
9658
|
+
trackerVersion: '17.2.10',
|
|
9644
9659
|
projectKey: this.options.projectKey,
|
|
9645
9660
|
doNotTrack,
|
|
9646
9661
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|