@openreplay/tracker 17.2.2 → 17.2.4
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 +127 -34
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +127 -34
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/index.d.ts +1 -0
- package/dist/cjs/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/cjs/main/modules/analytics/index.d.ts +5 -0
- package/dist/cjs/main/modules/input.d.ts +2 -1
- package/dist/cjs/main/modules/mouse.d.ts +1 -0
- package/dist/cjs/main/utils.d.ts +2 -0
- package/dist/lib/entry.js +127 -34
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +127 -34
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/index.d.ts +1 -0
- package/dist/lib/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/lib/main/modules/analytics/index.d.ts +5 -0
- package/dist/lib/main/modules/input.d.ts +2 -1
- package/dist/lib/main/modules/mouse.d.ts +1 -0
- package/dist/lib/main/utils.d.ts +2 -0
- package/dist/types/main/index.d.ts +1 -0
- package/dist/types/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/types/main/modules/analytics/index.d.ts +5 -0
- package/dist/types/main/modules/input.d.ts +2 -1
- package/dist/types/main/modules/mouse.d.ts +1 -0
- package/dist/types/main/utils.d.ts +2 -0
- package/package.json +1 -1
package/dist/lib/main/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & I
|
|
|
28
28
|
resetTabOnWindowOpen?: boolean;
|
|
29
29
|
network?: Partial<NetworkOptions>;
|
|
30
30
|
mouse?: Partial<MouseHandlerOptions>;
|
|
31
|
+
customAttributes?: string[];
|
|
31
32
|
__DISABLE_SECURE_MODE?: boolean;
|
|
32
33
|
css: CssRulesOptions;
|
|
33
34
|
webAnimations?: WapOptions;
|
|
@@ -15,13 +15,15 @@ declare class Batcher {
|
|
|
15
15
|
private readonly backendUrl;
|
|
16
16
|
private readonly getToken;
|
|
17
17
|
private readonly init;
|
|
18
|
+
private readonly standalone;
|
|
18
19
|
private readonly autosendInterval;
|
|
19
20
|
private readonly retryTimeout;
|
|
20
21
|
private readonly retryLimit;
|
|
21
22
|
private readonly apiEdp;
|
|
22
23
|
private batch;
|
|
23
24
|
private intervalId;
|
|
24
|
-
|
|
25
|
+
private stopped;
|
|
26
|
+
constructor(backendUrl: string, getToken: () => string | null, init: () => Promise<void>, standalone: boolean);
|
|
25
27
|
getBatches(): {
|
|
26
28
|
data: {
|
|
27
29
|
user_actions: PeopleEvent[];
|
|
@@ -38,8 +40,11 @@ declare class Batcher {
|
|
|
38
40
|
dedupePeopleEvents(): PeopleEvent[];
|
|
39
41
|
private squashPeopleEvents;
|
|
40
42
|
private sendBatch;
|
|
43
|
+
private paused;
|
|
44
|
+
private onVisibilityChange;
|
|
41
45
|
startAutosend(): void;
|
|
42
46
|
flush(): void;
|
|
43
47
|
stop(): void;
|
|
48
|
+
restart(): void;
|
|
44
49
|
}
|
|
45
50
|
export default Batcher;
|
|
@@ -51,6 +51,11 @@ export default class Analytics {
|
|
|
51
51
|
_getToken: () => string | null;
|
|
52
52
|
_getTimestamp: () => number;
|
|
53
53
|
init: () => Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Used by tracker when running in blundled mode
|
|
56
|
+
*/
|
|
57
|
+
onStart: () => void;
|
|
58
|
+
onStop: () => void;
|
|
54
59
|
reset: () => void;
|
|
55
60
|
/**
|
|
56
61
|
* COMPATIBILITY LAYER
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type App from '../app/index.js';
|
|
2
2
|
type TextFieldElement = HTMLInputElement | HTMLTextAreaElement;
|
|
3
|
-
export declare function getInputLabel(node: TextFieldElement): string;
|
|
3
|
+
export declare function getInputLabel(node: TextFieldElement, customAttributes?: string[]): string;
|
|
4
4
|
export declare const InputMode: {
|
|
5
5
|
readonly Plain: 0;
|
|
6
6
|
readonly Obscured: 1;
|
|
@@ -29,6 +29,7 @@ export interface Options {
|
|
|
29
29
|
* will override other settings.
|
|
30
30
|
* */
|
|
31
31
|
defaultInputMode: InputModeT;
|
|
32
|
+
customAttributes?: string[];
|
|
32
33
|
}
|
|
33
34
|
export default function (app: App, opts: Partial<Options>): void;
|
|
34
35
|
export {};
|
|
@@ -8,6 +8,7 @@ export interface MouseHandlerOptions {
|
|
|
8
8
|
* default 7 = 210ms
|
|
9
9
|
* */
|
|
10
10
|
trackingOffset?: number;
|
|
11
|
+
customAttributes?: string[];
|
|
11
12
|
}
|
|
12
13
|
export default function (app: App, options?: MouseHandlerOptions): void;
|
|
13
14
|
export declare function getCSSPath(el: any): string | false;
|
package/dist/lib/main/utils.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare function normSpaces(str: string): string;
|
|
|
9
9
|
export declare function isURL(s: string): boolean;
|
|
10
10
|
export declare const DOCS_HOST = "https://docs.openreplay.com";
|
|
11
11
|
export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
|
|
12
|
+
export declare function getCustomAttributeLabel(e: Element, customAttributes?: string[]): string;
|
|
13
|
+
export declare function getClassSelector(e: Element): string;
|
|
12
14
|
export declare function getLabelAttribute(e: Element): string | null;
|
|
13
15
|
export declare function hasOpenreplayAttribute(e: Element, attr: string): boolean;
|
|
14
16
|
/**
|
|
@@ -28,6 +28,7 @@ export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & I
|
|
|
28
28
|
resetTabOnWindowOpen?: boolean;
|
|
29
29
|
network?: Partial<NetworkOptions>;
|
|
30
30
|
mouse?: Partial<MouseHandlerOptions>;
|
|
31
|
+
customAttributes?: string[];
|
|
31
32
|
__DISABLE_SECURE_MODE?: boolean;
|
|
32
33
|
css: CssRulesOptions;
|
|
33
34
|
webAnimations?: WapOptions;
|
|
@@ -15,13 +15,15 @@ declare class Batcher {
|
|
|
15
15
|
private readonly backendUrl;
|
|
16
16
|
private readonly getToken;
|
|
17
17
|
private readonly init;
|
|
18
|
+
private readonly standalone;
|
|
18
19
|
private readonly autosendInterval;
|
|
19
20
|
private readonly retryTimeout;
|
|
20
21
|
private readonly retryLimit;
|
|
21
22
|
private readonly apiEdp;
|
|
22
23
|
private batch;
|
|
23
24
|
private intervalId;
|
|
24
|
-
|
|
25
|
+
private stopped;
|
|
26
|
+
constructor(backendUrl: string, getToken: () => string | null, init: () => Promise<void>, standalone: boolean);
|
|
25
27
|
getBatches(): {
|
|
26
28
|
data: {
|
|
27
29
|
user_actions: PeopleEvent[];
|
|
@@ -38,8 +40,11 @@ declare class Batcher {
|
|
|
38
40
|
dedupePeopleEvents(): PeopleEvent[];
|
|
39
41
|
private squashPeopleEvents;
|
|
40
42
|
private sendBatch;
|
|
43
|
+
private paused;
|
|
44
|
+
private onVisibilityChange;
|
|
41
45
|
startAutosend(): void;
|
|
42
46
|
flush(): void;
|
|
43
47
|
stop(): void;
|
|
48
|
+
restart(): void;
|
|
44
49
|
}
|
|
45
50
|
export default Batcher;
|
|
@@ -51,6 +51,11 @@ export default class Analytics {
|
|
|
51
51
|
_getToken: () => string | null;
|
|
52
52
|
_getTimestamp: () => number;
|
|
53
53
|
init: () => Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Used by tracker when running in blundled mode
|
|
56
|
+
*/
|
|
57
|
+
onStart: () => void;
|
|
58
|
+
onStop: () => void;
|
|
54
59
|
reset: () => void;
|
|
55
60
|
/**
|
|
56
61
|
* COMPATIBILITY LAYER
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type App from '../app/index.js';
|
|
2
2
|
type TextFieldElement = HTMLInputElement | HTMLTextAreaElement;
|
|
3
|
-
export declare function getInputLabel(node: TextFieldElement): string;
|
|
3
|
+
export declare function getInputLabel(node: TextFieldElement, customAttributes?: string[]): string;
|
|
4
4
|
export declare const InputMode: {
|
|
5
5
|
readonly Plain: 0;
|
|
6
6
|
readonly Obscured: 1;
|
|
@@ -29,6 +29,7 @@ export interface Options {
|
|
|
29
29
|
* will override other settings.
|
|
30
30
|
* */
|
|
31
31
|
defaultInputMode: InputModeT;
|
|
32
|
+
customAttributes?: string[];
|
|
32
33
|
}
|
|
33
34
|
export default function (app: App, opts: Partial<Options>): void;
|
|
34
35
|
export {};
|
|
@@ -8,6 +8,7 @@ export interface MouseHandlerOptions {
|
|
|
8
8
|
* default 7 = 210ms
|
|
9
9
|
* */
|
|
10
10
|
trackingOffset?: number;
|
|
11
|
+
customAttributes?: string[];
|
|
11
12
|
}
|
|
12
13
|
export default function (app: App, options?: MouseHandlerOptions): void;
|
|
13
14
|
export declare function getCSSPath(el: any): string | false;
|
|
@@ -9,6 +9,8 @@ export declare function normSpaces(str: string): string;
|
|
|
9
9
|
export declare function isURL(s: string): boolean;
|
|
10
10
|
export declare const DOCS_HOST = "https://docs.openreplay.com";
|
|
11
11
|
export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
|
|
12
|
+
export declare function getCustomAttributeLabel(e: Element, customAttributes?: string[]): string;
|
|
13
|
+
export declare function getClassSelector(e: Element): string;
|
|
12
14
|
export declare function getLabelAttribute(e: Element): string | null;
|
|
13
15
|
export declare function hasOpenreplayAttribute(e: Element, attr: string): boolean;
|
|
14
16
|
/**
|