@openreplay/tracker 3.4.17-beta.1 → 3.5.2

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.
@@ -55,6 +55,7 @@ function _getTarget(target) {
55
55
  if (tag === 'BUTTON' ||
56
56
  tag === 'A' ||
57
57
  tag === 'LI' ||
58
+ tag === 'SELECT' ||
58
59
  element.onclick != null ||
59
60
  element.getAttribute('role') === 'button' ||
60
61
  getLabelAttribute(element) !== null) {
@@ -81,6 +82,7 @@ export default function (app) {
81
82
  if (tag === 'BUTTON' ||
82
83
  tag === 'A' ||
83
84
  tag === 'LI' ||
85
+ tag === 'SELECT' ||
84
86
  target.onclick != null ||
85
87
  target.getAttribute('role') === 'button') {
86
88
  const label = app.sanitizer.getInnerTextSecure(target);
package/lib/utils.d.ts CHANGED
@@ -3,14 +3,6 @@ export declare const stars: (str: string) => string;
3
3
  export declare function normSpaces(str: string): string;
4
4
  export declare function isURL(s: string): boolean;
5
5
  export declare const IN_BROWSER: boolean;
6
- export declare const log: {
7
- (...data: any[]): void;
8
- (message?: any, ...optionalParams: any[]): void;
9
- };
10
- export declare const warn: {
11
- (...data: any[]): void;
12
- (message?: any, ...optionalParams: any[]): void;
13
- };
14
6
  export declare const DOCS_HOST = "https://docs.openreplay.com";
15
7
  export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
16
8
  export declare function getLabelAttribute(e: Element): string | null;
package/lib/utils.js CHANGED
@@ -12,15 +12,14 @@ export function isURL(s) {
12
12
  return s.substr(0, 8) === 'https://' || s.substr(0, 7) === 'http://';
13
13
  }
14
14
  export const IN_BROWSER = !(typeof window === "undefined");
15
- export const log = console.log;
16
- export const warn = console.warn;
15
+ // TODO: JOIN IT WITH LOGGER somehow (use logging decorators?); Don't forget about index.js loggin when there is no logger instance.
17
16
  export const DOCS_HOST = 'https://docs.openreplay.com';
18
17
  const warnedFeatures = {};
19
18
  export function deprecationWarn(nameOfFeature, useInstead, docsPath = "/") {
20
19
  if (warnedFeatures[nameOfFeature]) {
21
20
  return;
22
21
  }
23
- warn(`OpenReplay: ${nameOfFeature} is deprecated. ${useInstead ? `Please, use ${useInstead} instead.` : ""} Visit ${DOCS_HOST}${docsPath} for more information.`);
22
+ console.warn(`OpenReplay: ${nameOfFeature} is deprecated. ${useInstead ? `Please, use ${useInstead} instead.` : ""} Visit ${DOCS_HOST}${docsPath} for more information.`);
24
23
  warnedFeatures[nameOfFeature] = true;
25
24
  }
26
25
  export function getLabelAttribute(e) {
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": "3.4.17-beta.1",
4
+ "version": "3.5.2",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"