@openreplay/tracker 9.0.8-beta.1 → 9.0.9

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 CHANGED
@@ -1,3 +1,7 @@
1
+ # 9.0.9
2
+
3
+ - Fix for `{disableStringDict: true}` behavior
4
+
1
5
  # 9.0.8
2
6
 
3
7
  - added slight delay to iframe handler (rapid updates of stacked frames used to break player)
package/cjs/app/index.js CHANGED
@@ -42,7 +42,7 @@ class App {
42
42
  this.stopCallbacks = [];
43
43
  this.commitCallbacks = [];
44
44
  this.activityState = ActivityState.NotActive;
45
- this.version = '9.0.8-beta.1'; // TODO: version compatability check inside each plugin.
45
+ this.version = '9.0.9'; // TODO: version compatability check inside each plugin.
46
46
  this.compressionThreshold = 24 * 1000;
47
47
  this.restartAttempts = 0;
48
48
  this.bc = null;
package/cjs/index.js CHANGED
@@ -153,7 +153,7 @@ class API {
153
153
  // no-cors issue only with text/plain or not-set Content-Type
154
154
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
155
155
  req.send(JSON.stringify({
156
- trackerVersion: '9.0.8-beta.1',
156
+ trackerVersion: '9.0.9',
157
157
  projectKey: options.projectKey,
158
158
  doNotTrack,
159
159
  // TODO: add precise reason (an exact API missing)
@@ -25,15 +25,17 @@ class AttributeSender {
25
25
  sendSetAttribute(id, name, value) {
26
26
  if (this.isDictDisabled) {
27
27
  const msg = [12 /* Type.SetNodeAttribute */, id, name, value];
28
- this.app.send(msg);
28
+ return this.app.send(msg);
29
+ }
30
+ else {
31
+ const message = [
32
+ 51 /* Type.SetNodeAttributeDict */,
33
+ id,
34
+ this.applyDict(name),
35
+ this.applyDict(value),
36
+ ];
37
+ return this.app.send(message);
29
38
  }
30
- const message = [
31
- 51 /* Type.SetNodeAttributeDict */,
32
- id,
33
- this.applyDict(name),
34
- this.applyDict(value),
35
- ];
36
- this.app.send(message);
37
39
  }
38
40
  applyDict(str) {
39
41
  const [key, isNew] = this.dict.getKey(str);
@@ -89,8 +89,7 @@ function default_1(app, opts) {
89
89
  function getInputValue(id, node) {
90
90
  let value = node.value;
91
91
  let inputMode = options.defaultInputMode;
92
- console.log(inputMode, node.type, node.value);
93
- if (node.type === 'password' || app.sanitizer.isHidden(id), app.sanitizer.isObscured(id)) {
92
+ if (node.type === 'password' || app.sanitizer.isHidden(id)) {
94
93
  inputMode = exports.InputMode.Hidden;
95
94
  }
96
95
  else if (app.sanitizer.isObscured(id) ||
@@ -155,7 +154,6 @@ function default_1(app, opts) {
155
154
  function sendInputChange(id, node, hesitationTime, inputTime) {
156
155
  const { value, mask } = getInputValue(id, node);
157
156
  const label = getInputLabel(node);
158
- console.log('sent input change', id, label, value);
159
157
  app.send((0, messages_gen_js_1.InputChange)(id, value, mask !== 0, label, hesitationTime, inputTime));
160
158
  }
161
159
  app.nodes.attachNodeCallback(app.safe((node) => {
@@ -169,7 +167,6 @@ function default_1(app, opts) {
169
167
  app.nodes.attachNodeListener(node, 'change', () => sendInputValue(id, node));
170
168
  }
171
169
  if (isTextFieldElement(node)) {
172
- console.log('found text input', node);
173
170
  trackInputValue(id, node);
174
171
  let nodeFocusTime = 0;
175
172
  let nodeHesitationTime = 0;
@@ -179,7 +176,6 @@ function default_1(app, opts) {
179
176
  };
180
177
  const onInput = () => {
181
178
  if (nodeHesitationTime === 0 && nodeFocusTime !== 0) {
182
- console.log('started typing in input after: ', nodeFocusTime);
183
179
  nodeHesitationTime = (0, utils_js_1.now)() - nodeFocusTime;
184
180
  }
185
181
  };
package/lib/app/index.js CHANGED
@@ -39,7 +39,7 @@ export default class App {
39
39
  this.stopCallbacks = [];
40
40
  this.commitCallbacks = [];
41
41
  this.activityState = ActivityState.NotActive;
42
- this.version = '9.0.8-beta.1'; // TODO: version compatability check inside each plugin.
42
+ this.version = '9.0.9'; // TODO: version compatability check inside each plugin.
43
43
  this.compressionThreshold = 24 * 1000;
44
44
  this.restartAttempts = 0;
45
45
  this.bc = null;
package/lib/index.js CHANGED
@@ -148,7 +148,7 @@ export default class API {
148
148
  // no-cors issue only with text/plain or not-set Content-Type
149
149
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
150
150
  req.send(JSON.stringify({
151
- trackerVersion: '9.0.8-beta.1',
151
+ trackerVersion: '9.0.9',
152
152
  projectKey: options.projectKey,
153
153
  doNotTrack,
154
154
  // TODO: add precise reason (an exact API missing)
@@ -21,15 +21,17 @@ export default class AttributeSender {
21
21
  sendSetAttribute(id, name, value) {
22
22
  if (this.isDictDisabled) {
23
23
  const msg = [12 /* Type.SetNodeAttribute */, id, name, value];
24
- this.app.send(msg);
24
+ return this.app.send(msg);
25
+ }
26
+ else {
27
+ const message = [
28
+ 51 /* Type.SetNodeAttributeDict */,
29
+ id,
30
+ this.applyDict(name),
31
+ this.applyDict(value),
32
+ ];
33
+ return this.app.send(message);
25
34
  }
26
- const message = [
27
- 51 /* Type.SetNodeAttributeDict */,
28
- id,
29
- this.applyDict(name),
30
- this.applyDict(value),
31
- ];
32
- this.app.send(message);
33
35
  }
34
36
  applyDict(str) {
35
37
  const [key, isNew] = this.dict.getKey(str);
@@ -85,8 +85,7 @@ export default function (app, opts) {
85
85
  function getInputValue(id, node) {
86
86
  let value = node.value;
87
87
  let inputMode = options.defaultInputMode;
88
- console.log(inputMode, node.type, node.value);
89
- if (node.type === 'password' || app.sanitizer.isHidden(id), app.sanitizer.isObscured(id)) {
88
+ if (node.type === 'password' || app.sanitizer.isHidden(id)) {
90
89
  inputMode = InputMode.Hidden;
91
90
  }
92
91
  else if (app.sanitizer.isObscured(id) ||
@@ -151,7 +150,6 @@ export default function (app, opts) {
151
150
  function sendInputChange(id, node, hesitationTime, inputTime) {
152
151
  const { value, mask } = getInputValue(id, node);
153
152
  const label = getInputLabel(node);
154
- console.log('sent input change', id, label, value);
155
153
  app.send(InputChange(id, value, mask !== 0, label, hesitationTime, inputTime));
156
154
  }
157
155
  app.nodes.attachNodeCallback(app.safe((node) => {
@@ -165,7 +163,6 @@ export default function (app, opts) {
165
163
  app.nodes.attachNodeListener(node, 'change', () => sendInputValue(id, node));
166
164
  }
167
165
  if (isTextFieldElement(node)) {
168
- console.log('found text input', node);
169
166
  trackInputValue(id, node);
170
167
  let nodeFocusTime = 0;
171
168
  let nodeHesitationTime = 0;
@@ -175,7 +172,6 @@ export default function (app, opts) {
175
172
  };
176
173
  const onInput = () => {
177
174
  if (nodeHesitationTime === 0 && nodeFocusTime !== 0) {
178
- console.log('started typing in input after: ', nodeFocusTime);
179
175
  nodeHesitationTime = now() - nodeFocusTime;
180
176
  }
181
177
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "9.0.8-beta.1",
4
+ "version": "9.0.9",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"