@openreplay/tracker 16.4.10 → 16.4.11-beta.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/cjs/common/messages.gen.d.ts +53 -46
- package/dist/cjs/entry.js +2011 -2354
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +1993 -2312
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/canvas.d.ts +11 -0
- package/dist/cjs/main/app/guards.d.ts +1 -0
- package/dist/cjs/main/app/index.d.ts +6 -12
- package/dist/cjs/main/app/messages.gen.d.ts +7 -7
- package/dist/cjs/main/app/observer/observer.d.ts +4 -0
- package/dist/cjs/main/app/observer/top_observer.d.ts +3 -1
- package/dist/cjs/main/app/session.d.ts +1 -0
- package/dist/cjs/main/entry.d.ts +5 -4
- package/dist/cjs/main/index.d.ts +31 -18
- package/dist/cjs/main/modules/analytics/batcher.d.ts +45 -0
- package/dist/cjs/main/modules/analytics/constantProperties.d.ts +53 -0
- package/dist/cjs/main/modules/analytics/demo.d.ts +0 -0
- package/dist/cjs/main/modules/analytics/events.d.ts +37 -0
- package/dist/cjs/main/modules/analytics/index.d.ts +73 -0
- package/dist/cjs/main/modules/analytics/people.d.ts +51 -0
- package/dist/cjs/main/modules/analytics/types.d.ts +32 -0
- package/dist/cjs/main/modules/analytics/utils.d.ts +19 -0
- package/dist/cjs/main/modules/conditionsManager.d.ts +6 -1
- package/dist/cjs/main/modules/input.d.ts +2 -1
- package/dist/cjs/main/modules/longAnimationTask.d.ts +25 -0
- package/dist/cjs/main/modules/mouse.d.ts +1 -0
- package/dist/cjs/main/modules/tagWatcher.d.ts +1 -1
- package/dist/cjs/main/modules/viewport.d.ts +7 -0
- package/dist/cjs/main/modules/webAnimations.d.ts +9 -0
- package/dist/cjs/main/singleton.d.ts +5 -7
- package/dist/cjs/main/utils.d.ts +5 -0
- package/dist/lib/common/messages.gen.d.ts +53 -46
- package/dist/lib/entry.js +2010 -2355
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +1993 -2312
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/canvas.d.ts +11 -0
- package/dist/lib/main/app/guards.d.ts +1 -0
- package/dist/lib/main/app/index.d.ts +6 -12
- package/dist/lib/main/app/messages.gen.d.ts +7 -7
- package/dist/lib/main/app/observer/observer.d.ts +4 -0
- package/dist/lib/main/app/observer/top_observer.d.ts +3 -1
- package/dist/lib/main/app/session.d.ts +1 -0
- package/dist/lib/main/entry.d.ts +5 -4
- package/dist/lib/main/index.d.ts +31 -18
- package/dist/lib/main/modules/analytics/batcher.d.ts +45 -0
- package/dist/lib/main/modules/analytics/constantProperties.d.ts +53 -0
- package/dist/lib/main/modules/analytics/demo.d.ts +0 -0
- package/dist/lib/main/modules/analytics/events.d.ts +37 -0
- package/dist/lib/main/modules/analytics/index.d.ts +73 -0
- package/dist/lib/main/modules/analytics/people.d.ts +51 -0
- package/dist/lib/main/modules/analytics/types.d.ts +32 -0
- package/dist/lib/main/modules/analytics/utils.d.ts +19 -0
- package/dist/lib/main/modules/conditionsManager.d.ts +6 -1
- package/dist/lib/main/modules/input.d.ts +2 -1
- package/dist/lib/main/modules/longAnimationTask.d.ts +25 -0
- package/dist/lib/main/modules/mouse.d.ts +1 -0
- package/dist/lib/main/modules/tagWatcher.d.ts +1 -1
- package/dist/lib/main/modules/viewport.d.ts +7 -0
- package/dist/lib/main/modules/webAnimations.d.ts +9 -0
- package/dist/lib/main/singleton.d.ts +5 -7
- package/dist/lib/main/utils.d.ts +5 -0
- package/dist/types/common/messages.gen.d.ts +53 -46
- package/dist/types/main/app/canvas.d.ts +11 -0
- package/dist/types/main/app/guards.d.ts +1 -0
- package/dist/types/main/app/index.d.ts +6 -12
- package/dist/types/main/app/messages.gen.d.ts +7 -7
- package/dist/types/main/app/observer/observer.d.ts +4 -0
- package/dist/types/main/app/observer/top_observer.d.ts +3 -1
- package/dist/types/main/app/session.d.ts +1 -0
- package/dist/types/main/entry.d.ts +5 -4
- package/dist/types/main/index.d.ts +31 -18
- package/dist/types/main/modules/analytics/batcher.d.ts +45 -0
- package/dist/types/main/modules/analytics/constantProperties.d.ts +53 -0
- package/dist/types/main/modules/analytics/demo.d.ts +0 -0
- package/dist/types/main/modules/analytics/events.d.ts +37 -0
- package/dist/types/main/modules/analytics/index.d.ts +73 -0
- package/dist/types/main/modules/analytics/people.d.ts +51 -0
- package/dist/types/main/modules/analytics/types.d.ts +32 -0
- package/dist/types/main/modules/analytics/utils.d.ts +19 -0
- package/dist/types/main/modules/conditionsManager.d.ts +6 -1
- package/dist/types/main/modules/input.d.ts +2 -1
- package/dist/types/main/modules/longAnimationTask.d.ts +25 -0
- package/dist/types/main/modules/mouse.d.ts +1 -0
- package/dist/types/main/modules/tagWatcher.d.ts +1 -1
- package/dist/types/main/modules/viewport.d.ts +7 -0
- package/dist/types/main/modules/webAnimations.d.ts +9 -0
- package/dist/types/main/singleton.d.ts +5 -7
- package/dist/types/main/utils.d.ts +5 -0
- package/package.json +2 -2
- package/dist/cjs/main/modules/featureFlags.d.ts +0 -25
- package/dist/cjs/main/modules/userTesting/SignalManager.d.ts +0 -29
- package/dist/cjs/main/modules/userTesting/dnd.d.ts +0 -1
- package/dist/cjs/main/modules/userTesting/index.d.ts +0 -45
- package/dist/cjs/main/modules/userTesting/recorder.d.ts +0 -24
- package/dist/cjs/main/modules/userTesting/styles.d.ts +0 -277
- package/dist/cjs/main/modules/userTesting/utils.d.ts +0 -9
- package/dist/lib/main/modules/featureFlags.d.ts +0 -25
- package/dist/lib/main/modules/userTesting/SignalManager.d.ts +0 -29
- package/dist/lib/main/modules/userTesting/dnd.d.ts +0 -1
- package/dist/lib/main/modules/userTesting/index.d.ts +0 -45
- package/dist/lib/main/modules/userTesting/recorder.d.ts +0 -24
- package/dist/lib/main/modules/userTesting/styles.d.ts +0 -277
- package/dist/lib/main/modules/userTesting/utils.d.ts +0 -9
- package/dist/types/main/modules/featureFlags.d.ts +0 -25
- package/dist/types/main/modules/userTesting/SignalManager.d.ts +0 -29
- package/dist/types/main/modules/userTesting/dnd.d.ts +0 -1
- package/dist/types/main/modules/userTesting/index.d.ts +0 -45
- package/dist/types/main/modules/userTesting/recorder.d.ts +0 -24
- package/dist/types/main/modules/userTesting/styles.d.ts +0 -277
- package/dist/types/main/modules/userTesting/utils.d.ts +0 -9
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import Message, { CustomEvent, JSException, MouseClick, NetworkRequest, SetPageLocation } from '../../common/messages.gen.js';
|
|
2
2
|
import App, { StartOptions } from '../app/index.js';
|
|
3
|
-
|
|
3
|
+
export interface IFeatureFlag {
|
|
4
|
+
key: string;
|
|
5
|
+
is_persist: boolean;
|
|
6
|
+
value: string | boolean;
|
|
7
|
+
payload: string;
|
|
8
|
+
}
|
|
4
9
|
interface Filter {
|
|
5
10
|
filters: {
|
|
6
11
|
operator: string;
|
|
@@ -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 {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type App from '../app/index.js';
|
|
2
|
+
export interface LongAnimationTask extends PerformanceEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
duration: number;
|
|
5
|
+
blockingDuration: number;
|
|
6
|
+
firstUIEventTimestamp: number;
|
|
7
|
+
startTime: number;
|
|
8
|
+
scripts: [
|
|
9
|
+
{
|
|
10
|
+
name: string;
|
|
11
|
+
duration: number;
|
|
12
|
+
invoker: string;
|
|
13
|
+
invokerType: string;
|
|
14
|
+
pauseDuration: number;
|
|
15
|
+
sourceURL: string;
|
|
16
|
+
sourceFunctionName: string;
|
|
17
|
+
sourceCharPosition: number;
|
|
18
|
+
forcedStyleAndLayoutDuration: number;
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
export interface LATOptions {
|
|
23
|
+
longTasks: boolean;
|
|
24
|
+
}
|
|
25
|
+
export default function (app: App, opts: Partial<LATOptions>): void;
|
|
@@ -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;
|
|
@@ -2,5 +2,12 @@ import type App from '../app/index.js';
|
|
|
2
2
|
export interface Options {
|
|
3
3
|
urlSanitizer?: (url: string) => string;
|
|
4
4
|
titleSanitizer?: (title: string) => string;
|
|
5
|
+
/** if present, tracker will remove hash symbol to present url as regular router url on replay level;
|
|
6
|
+
*
|
|
7
|
+
* applied BEFORE sanitizers.
|
|
8
|
+
*
|
|
9
|
+
* @example 'site.com/#/path' -> 'site.com/path'
|
|
10
|
+
*/
|
|
11
|
+
replaceHashSymbol?: boolean;
|
|
5
12
|
}
|
|
6
13
|
export default function (app: App, options?: Options): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type App from '../app/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* this will only work for custom elements by default (because of ionic)
|
|
4
|
+
*/
|
|
5
|
+
export interface Options {
|
|
6
|
+
allElements?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function webAnimations(app: App, options?: Options): void;
|
|
9
|
+
export default webAnimations;
|
|
@@ -17,6 +17,11 @@ declare class TrackerSingleton {
|
|
|
17
17
|
* */
|
|
18
18
|
stop(): string | undefined;
|
|
19
19
|
setUserID(id: string): void;
|
|
20
|
+
get analytics(): import("./entry.js").Analytics | null;
|
|
21
|
+
identify: (id: string) => void;
|
|
22
|
+
track: (eventName: string, properties?: Record<string, any>, options?: {
|
|
23
|
+
send_immediately: boolean;
|
|
24
|
+
}) => void;
|
|
20
25
|
/**
|
|
21
26
|
* Set metadata for the current session
|
|
22
27
|
*
|
|
@@ -36,12 +41,6 @@ declare class TrackerSingleton {
|
|
|
36
41
|
event(key: string, payload?: any, issue?: boolean): void;
|
|
37
42
|
issue(key: string, payload?: any): void;
|
|
38
43
|
handleError(e: Error | ErrorEvent | PromiseRejectionEvent, metadata?: Record<string, any>): void;
|
|
39
|
-
isFlagEnabled(flagName: string): boolean;
|
|
40
|
-
onFlagsLoad(...args: Parameters<Tracker['onFlagsLoad']>): void;
|
|
41
|
-
clearPersistFlags(): void;
|
|
42
|
-
reloadFlags(): Promise<void> | undefined;
|
|
43
|
-
getFeatureFlag(flagName: string): import("./modules/featureFlags.js").IFeatureFlag | undefined;
|
|
44
|
-
getAllFeatureFlags(): import("./modules/featureFlags.js").IFeatureFlag[] | undefined;
|
|
45
44
|
restartCanvasTracking(): void;
|
|
46
45
|
/**
|
|
47
46
|
* Set the anonymous user ID
|
|
@@ -102,7 +101,6 @@ declare class TrackerSingleton {
|
|
|
102
101
|
forceFlushBatch(): void;
|
|
103
102
|
getSessionInfo(): import("./app/session.js").SessionInfo | null;
|
|
104
103
|
getTabId(): string | null;
|
|
105
|
-
getUxId(): number | null;
|
|
106
104
|
}
|
|
107
105
|
declare const tracker: TrackerSingleton;
|
|
108
106
|
export default tracker;
|
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,3 +30,6 @@ export declare function createEventListener(target: EventTarget, event: string,
|
|
|
28
30
|
export declare function deleteEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean, forceNgOff?: boolean): void;
|
|
29
31
|
export declare function requestIdleCb(callback: () => void): void;
|
|
30
32
|
export declare function simpleMerge<T>(defaultObj: T, givenObj: Partial<T>): T;
|
|
33
|
+
export declare function throttleWithTrailing<K, Args extends any[]>(fn: (key: K, ...args: Args) => void, interval: number): ((key: K, ...args: Args) => void) & {
|
|
34
|
+
clear: () => void;
|
|
35
|
+
};
|
|
@@ -26,9 +26,7 @@ export declare const enum Type {
|
|
|
26
26
|
Metadata = 30,
|
|
27
27
|
StringDictGlobal = 34,
|
|
28
28
|
SetNodeAttributeDictGlobal = 35,
|
|
29
|
-
|
|
30
|
-
CSSDeleteRule = 38,
|
|
31
|
-
Fetch = 39,
|
|
29
|
+
NodeAnimationResult = 36,
|
|
32
30
|
Profiler = 40,
|
|
33
31
|
OTable = 41,
|
|
34
32
|
StateAction = 42,
|
|
@@ -42,17 +40,16 @@ export declare const enum Type {
|
|
|
42
40
|
SetNodeAttributeDictDeprecated = 51,
|
|
43
41
|
StringDict = 43,
|
|
44
42
|
SetNodeAttributeDict = 52,
|
|
45
|
-
|
|
43
|
+
ResourceTimingDeprecatedDeprecated = 53,
|
|
46
44
|
ConnectionInformation = 54,
|
|
47
45
|
SetPageVisibility = 55,
|
|
48
46
|
LoadFontFace = 57,
|
|
49
47
|
SetNodeFocus = 58,
|
|
50
|
-
LongTask = 59,
|
|
51
48
|
SetNodeAttributeURLBased = 60,
|
|
52
49
|
SetCSSDataURLBased = 61,
|
|
53
50
|
TechnicalInfo = 63,
|
|
54
51
|
CustomIssue = 64,
|
|
55
|
-
|
|
52
|
+
SetNodeSlot = 65,
|
|
56
53
|
MouseClick = 68,
|
|
57
54
|
MouseClickDeprecated = 69,
|
|
58
55
|
CreateIFrameDocument = 70,
|
|
@@ -67,11 +64,14 @@ export declare const enum Type {
|
|
|
67
64
|
PartitionedMessage = 82,
|
|
68
65
|
NetworkRequest = 83,
|
|
69
66
|
WSChannel = 84,
|
|
67
|
+
ResourceTiming = 85,
|
|
68
|
+
Incident = 87,
|
|
69
|
+
LongAnimationTask = 89,
|
|
70
70
|
InputChange = 112,
|
|
71
71
|
SelectionChange = 113,
|
|
72
72
|
MouseThrashing = 114,
|
|
73
73
|
UnbindNodes = 115,
|
|
74
|
-
|
|
74
|
+
ResourceTimingDeprecated = 116,
|
|
75
75
|
TabChange = 117,
|
|
76
76
|
TabData = 118,
|
|
77
77
|
CanvasNode = 119,
|
|
@@ -234,26 +234,10 @@ export type SetNodeAttributeDictGlobal = [
|
|
|
234
234
|
number,
|
|
235
235
|
number
|
|
236
236
|
];
|
|
237
|
-
export type
|
|
238
|
-
Type.
|
|
237
|
+
export type NodeAnimationResult = [
|
|
238
|
+
Type.NodeAnimationResult,
|
|
239
239
|
number,
|
|
240
|
-
string
|
|
241
|
-
number
|
|
242
|
-
];
|
|
243
|
-
export type CSSDeleteRule = [
|
|
244
|
-
Type.CSSDeleteRule,
|
|
245
|
-
number,
|
|
246
|
-
number
|
|
247
|
-
];
|
|
248
|
-
export type Fetch = [
|
|
249
|
-
Type.Fetch,
|
|
250
|
-
string,
|
|
251
|
-
string,
|
|
252
|
-
string,
|
|
253
|
-
string,
|
|
254
|
-
number,
|
|
255
|
-
number,
|
|
256
|
-
number
|
|
240
|
+
string
|
|
257
241
|
];
|
|
258
242
|
export type Profiler = [
|
|
259
243
|
Type.Profiler,
|
|
@@ -330,8 +314,8 @@ export type SetNodeAttributeDict = [
|
|
|
330
314
|
string,
|
|
331
315
|
string
|
|
332
316
|
];
|
|
333
|
-
export type
|
|
334
|
-
Type.
|
|
317
|
+
export type ResourceTimingDeprecatedDeprecated = [
|
|
318
|
+
Type.ResourceTimingDeprecatedDeprecated,
|
|
335
319
|
number,
|
|
336
320
|
number,
|
|
337
321
|
number,
|
|
@@ -361,16 +345,6 @@ export type SetNodeFocus = [
|
|
|
361
345
|
Type.SetNodeFocus,
|
|
362
346
|
number
|
|
363
347
|
];
|
|
364
|
-
export type LongTask = [
|
|
365
|
-
Type.LongTask,
|
|
366
|
-
number,
|
|
367
|
-
number,
|
|
368
|
-
number,
|
|
369
|
-
number,
|
|
370
|
-
string,
|
|
371
|
-
string,
|
|
372
|
-
string
|
|
373
|
-
];
|
|
374
348
|
export type SetNodeAttributeURLBased = [
|
|
375
349
|
Type.SetNodeAttributeURLBased,
|
|
376
350
|
number,
|
|
@@ -394,12 +368,10 @@ export type CustomIssue = [
|
|
|
394
368
|
string,
|
|
395
369
|
string
|
|
396
370
|
];
|
|
397
|
-
export type
|
|
398
|
-
Type.
|
|
371
|
+
export type SetNodeSlot = [
|
|
372
|
+
Type.SetNodeSlot,
|
|
399
373
|
number,
|
|
400
|
-
|
|
401
|
-
number,
|
|
402
|
-
string
|
|
374
|
+
number
|
|
403
375
|
];
|
|
404
376
|
export type MouseClick = [
|
|
405
377
|
Type.MouseClick,
|
|
@@ -496,6 +468,41 @@ export type WSChannel = [
|
|
|
496
468
|
string,
|
|
497
469
|
string
|
|
498
470
|
];
|
|
471
|
+
export type ResourceTiming = [
|
|
472
|
+
Type.ResourceTiming,
|
|
473
|
+
number,
|
|
474
|
+
number,
|
|
475
|
+
number,
|
|
476
|
+
number,
|
|
477
|
+
number,
|
|
478
|
+
number,
|
|
479
|
+
string,
|
|
480
|
+
string,
|
|
481
|
+
number,
|
|
482
|
+
boolean,
|
|
483
|
+
number,
|
|
484
|
+
number,
|
|
485
|
+
number,
|
|
486
|
+
number,
|
|
487
|
+
number,
|
|
488
|
+
number,
|
|
489
|
+
number
|
|
490
|
+
];
|
|
491
|
+
export type Incident = [
|
|
492
|
+
Type.Incident,
|
|
493
|
+
string,
|
|
494
|
+
number,
|
|
495
|
+
number
|
|
496
|
+
];
|
|
497
|
+
export type LongAnimationTask = [
|
|
498
|
+
Type.LongAnimationTask,
|
|
499
|
+
string,
|
|
500
|
+
number,
|
|
501
|
+
number,
|
|
502
|
+
number,
|
|
503
|
+
number,
|
|
504
|
+
string
|
|
505
|
+
];
|
|
499
506
|
export type InputChange = [
|
|
500
507
|
Type.InputChange,
|
|
501
508
|
number,
|
|
@@ -519,8 +526,8 @@ export type UnbindNodes = [
|
|
|
519
526
|
Type.UnbindNodes,
|
|
520
527
|
number
|
|
521
528
|
];
|
|
522
|
-
export type
|
|
523
|
-
Type.
|
|
529
|
+
export type ResourceTimingDeprecated = [
|
|
530
|
+
Type.ResourceTimingDeprecated,
|
|
524
531
|
number,
|
|
525
532
|
number,
|
|
526
533
|
number,
|
|
@@ -576,5 +583,5 @@ export type WebVitals = [
|
|
|
576
583
|
string,
|
|
577
584
|
string
|
|
578
585
|
];
|
|
579
|
-
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal |
|
|
586
|
+
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | NodeAnimationResult | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | SetNodeSlot | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
|
|
580
587
|
export default Message;
|
|
@@ -5,6 +5,8 @@ interface Options {
|
|
|
5
5
|
isDebug?: boolean;
|
|
6
6
|
fixedScaling?: boolean;
|
|
7
7
|
useAnimationFrame?: boolean;
|
|
8
|
+
framesSupport?: boolean;
|
|
9
|
+
/** @deprecated webp is the default format for pipeline optimization */
|
|
8
10
|
fileExt?: 'webp' | 'png' | 'jpeg' | 'avif';
|
|
9
11
|
}
|
|
10
12
|
declare class CanvasRecorder {
|
|
@@ -12,8 +14,14 @@ declare class CanvasRecorder {
|
|
|
12
14
|
private readonly options;
|
|
13
15
|
private snapshots;
|
|
14
16
|
private readonly intervals;
|
|
17
|
+
private readonly observers;
|
|
15
18
|
private readonly interval;
|
|
16
19
|
private readonly fileExt;
|
|
20
|
+
private uploadQueue;
|
|
21
|
+
private readonly MAX_CONCURRENT_UPLOADS;
|
|
22
|
+
private readonly MAX_QUEUE_SIZE;
|
|
23
|
+
private readonly pendingBatches;
|
|
24
|
+
private isProcessingQueue;
|
|
17
25
|
constructor(app: App, options: Options);
|
|
18
26
|
startTracking(): void;
|
|
19
27
|
restartTracking: () => void;
|
|
@@ -23,6 +31,9 @@ declare class CanvasRecorder {
|
|
|
23
31
|
data: Blob;
|
|
24
32
|
id: number;
|
|
25
33
|
}[], canvasId: number, createdAt: number): void;
|
|
34
|
+
private processUploadQueue;
|
|
35
|
+
private uploadBatch;
|
|
36
|
+
private cleanupCanvas;
|
|
26
37
|
clear(): void;
|
|
27
38
|
}
|
|
28
39
|
export default CanvasRecorder;
|
|
@@ -18,6 +18,7 @@ type TagTypeMap = {
|
|
|
18
18
|
style: HTMLStyleElement | SVGStyleElement;
|
|
19
19
|
link: HTMLLinkElement;
|
|
20
20
|
canvas: HTMLCanvasElement;
|
|
21
|
+
slot: HTMLSlotElement;
|
|
21
22
|
};
|
|
22
23
|
export declare function hasTag<T extends keyof TagTypeMap>(el: Node, tagName: T): el is TagTypeMap[typeof tagName];
|
|
23
24
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Options as WebworkerOptions } from '../../common/interaction.js';
|
|
2
2
|
import AttributeSender from '../modules/attributeSender.js';
|
|
3
|
-
import FeatureFlags from '../modules/featureFlags.js';
|
|
4
3
|
import type { Options as NetworkOptions } from '../modules/network.js';
|
|
5
4
|
import Logger, { ILogLevel } from './logger.js';
|
|
6
5
|
import Message from './messages.gen.js';
|
|
@@ -152,13 +151,11 @@ export default class App {
|
|
|
152
151
|
private readonly version;
|
|
153
152
|
private worker?;
|
|
154
153
|
attributeSender: AttributeSender;
|
|
155
|
-
featureFlags: FeatureFlags;
|
|
156
154
|
socketMode: boolean;
|
|
157
155
|
private compressionThreshold;
|
|
158
156
|
private readonly bc;
|
|
159
157
|
private readonly contextId;
|
|
160
158
|
private canvasRecorder;
|
|
161
|
-
private uxtManager;
|
|
162
159
|
private conditionsManager;
|
|
163
160
|
private readonly tagWatcher;
|
|
164
161
|
private canStart;
|
|
@@ -166,7 +163,6 @@ export default class App {
|
|
|
166
163
|
private pageFrames;
|
|
167
164
|
private frameOderNumber;
|
|
168
165
|
private frameLevel;
|
|
169
|
-
private features;
|
|
170
166
|
private emptyBatchCounter;
|
|
171
167
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
172
168
|
/** used by child iframes for crossdomain only */
|
|
@@ -192,6 +188,7 @@ export default class App {
|
|
|
192
188
|
allowAppStart(): void;
|
|
193
189
|
private checkNodeId;
|
|
194
190
|
private initWorker;
|
|
191
|
+
private restart;
|
|
195
192
|
private handleWorkerMsg;
|
|
196
193
|
private _debug;
|
|
197
194
|
send: (message: Message, urgent?: boolean) => void;
|
|
@@ -253,7 +250,7 @@ export default class App {
|
|
|
253
250
|
* user 30 seconds to "activate" and record session by calling `start()` on conditional trigger,
|
|
254
251
|
* and we will then send buffered batch, so it won't get lost
|
|
255
252
|
* */
|
|
256
|
-
coldStart
|
|
253
|
+
coldStart(startOpts?: StartOptions, conditional?: boolean): Promise<void>;
|
|
257
254
|
private setupConditionalStart;
|
|
258
255
|
onSessionSent: () => void;
|
|
259
256
|
/**
|
|
@@ -261,7 +258,7 @@ export default class App {
|
|
|
261
258
|
* @param {Object} startOpts - options for session start, same as .start()
|
|
262
259
|
* @param {Function} onSessionSent - callback that will be called once session is fully sent
|
|
263
260
|
* */
|
|
264
|
-
offlineRecording
|
|
261
|
+
offlineRecording(startOpts: StartOptions | undefined, onSessionSent: () => void): {
|
|
265
262
|
saveBuffer: () => void;
|
|
266
263
|
getBuffer: () => Message[];
|
|
267
264
|
setBuffer: (buffer: Message[]) => void;
|
|
@@ -273,15 +270,15 @@ export default class App {
|
|
|
273
270
|
*
|
|
274
271
|
* Keeping the size of local storage reasonable is up to the end users of this library
|
|
275
272
|
* */
|
|
276
|
-
saveBuffer
|
|
273
|
+
saveBuffer(): void;
|
|
277
274
|
/**
|
|
278
275
|
* @returns buffer with stored messages for offline recording
|
|
279
276
|
* */
|
|
280
|
-
getBuffer
|
|
277
|
+
getBuffer(): Message[];
|
|
281
278
|
/**
|
|
282
279
|
* Used to set a buffer with messages array
|
|
283
280
|
* */
|
|
284
|
-
setBuffer
|
|
281
|
+
setBuffer(buffer: Message[]): void;
|
|
285
282
|
/**
|
|
286
283
|
* Uploads the stored session buffer to backend
|
|
287
284
|
* @returns promise that resolves once messages are loaded, it has to be awaited
|
|
@@ -294,9 +291,6 @@ export default class App {
|
|
|
294
291
|
private _start;
|
|
295
292
|
restartCanvasTracking: () => void;
|
|
296
293
|
flushBuffer: (buffer: Message[]) => Promise<unknown>;
|
|
297
|
-
onUxtCb: never[];
|
|
298
|
-
addOnUxtCb(cb: (id: number) => void): void;
|
|
299
|
-
getUxtId(): number | null;
|
|
300
294
|
waitStart(): Promise<unknown>;
|
|
301
295
|
waitStarted(): Promise<unknown>;
|
|
302
296
|
waitStatus(status: ActivityState): Promise<unknown>;
|
|
@@ -27,9 +27,7 @@ export declare function UserAnonymousID(id: string): Messages.UserAnonymousID;
|
|
|
27
27
|
export declare function Metadata(key: string, value: string): Messages.Metadata;
|
|
28
28
|
export declare function StringDictGlobal(key: number, value: string): Messages.StringDictGlobal;
|
|
29
29
|
export declare function SetNodeAttributeDictGlobal(id: number, name: number, value: number): Messages.SetNodeAttributeDictGlobal;
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function CSSDeleteRule(id: number, index: number): Messages.CSSDeleteRule;
|
|
32
|
-
export declare function Fetch(method: string, url: string, request: string, response: string, status: number, timestamp: number, duration: number): Messages.Fetch;
|
|
30
|
+
export declare function NodeAnimationResult(id: number, styles: string): Messages.NodeAnimationResult;
|
|
33
31
|
export declare function Profiler(name: string, duration: number, args: string, result: string): Messages.Profiler;
|
|
34
32
|
export declare function OTable(key: string, value: string): Messages.OTable;
|
|
35
33
|
export declare function StateAction(type: string): Messages.StateAction;
|
|
@@ -43,17 +41,16 @@ export declare function StringDictDeprecated(key: number, value: string): Messag
|
|
|
43
41
|
export declare function SetNodeAttributeDictDeprecated(id: number, nameKey: number, valueKey: number): Messages.SetNodeAttributeDictDeprecated;
|
|
44
42
|
export declare function StringDict(key: string, value: string): Messages.StringDict;
|
|
45
43
|
export declare function SetNodeAttributeDict(id: number, name: string, value: string): Messages.SetNodeAttributeDict;
|
|
46
|
-
export declare function
|
|
44
|
+
export declare function ResourceTimingDeprecatedDeprecated(timestamp: number, duration: number, ttfb: number, headerSize: number, encodedBodySize: number, decodedBodySize: number, url: string, initiator: string): Messages.ResourceTimingDeprecatedDeprecated;
|
|
47
45
|
export declare function ConnectionInformation(downlink: number, type: string): Messages.ConnectionInformation;
|
|
48
46
|
export declare function SetPageVisibility(hidden: boolean): Messages.SetPageVisibility;
|
|
49
47
|
export declare function LoadFontFace(parentID: number, family: string, source: string, descriptors: string): Messages.LoadFontFace;
|
|
50
48
|
export declare function SetNodeFocus(id: number): Messages.SetNodeFocus;
|
|
51
|
-
export declare function LongTask(timestamp: number, duration: number, context: number, containerType: number, containerSrc: string, containerId: string, containerName: string): Messages.LongTask;
|
|
52
49
|
export declare function SetNodeAttributeURLBased(id: number, name: string, value: string, baseURL: string): Messages.SetNodeAttributeURLBased;
|
|
53
50
|
export declare function SetCSSDataURLBased(id: number, data: string, baseURL: string): Messages.SetCSSDataURLBased;
|
|
54
51
|
export declare function TechnicalInfo(type: string, value: string): Messages.TechnicalInfo;
|
|
55
52
|
export declare function CustomIssue(name: string, payload: string): Messages.CustomIssue;
|
|
56
|
-
export declare function
|
|
53
|
+
export declare function SetNodeSlot(id: number, slotID: number): Messages.SetNodeSlot;
|
|
57
54
|
export declare function MouseClick(id: number, hesitationTime: number, label: string, selector: string, normalizedX: number, normalizedY: number): Messages.MouseClick;
|
|
58
55
|
export declare function MouseClickDeprecated(id: number, hesitationTime: number, label: string, selector: string): Messages.MouseClickDeprecated;
|
|
59
56
|
export declare function CreateIFrameDocument(frameID: number, id: number): Messages.CreateIFrameDocument;
|
|
@@ -68,11 +65,14 @@ export declare function BatchMetadata(version: number, pageNo: number, firstInde
|
|
|
68
65
|
export declare function PartitionedMessage(partNo: number, partTotal: number): Messages.PartitionedMessage;
|
|
69
66
|
export declare function NetworkRequest(type: string, method: string, url: string, request: string, response: string, status: number, timestamp: number, duration: number, transferredBodySize: number): Messages.NetworkRequest;
|
|
70
67
|
export declare function WSChannel(chType: string, channelName: string, data: string, timestamp: number, dir: string, messageType: string): Messages.WSChannel;
|
|
68
|
+
export declare function ResourceTiming(timestamp: number, duration: number, ttfb: number, headerSize: number, encodedBodySize: number, decodedBodySize: number, url: string, initiator: string, transferredSize: number, cached: boolean, queueing: number, dnsLookup: number, initialConnection: number, ssl: number, contentDownload: number, total: number, stalled: number): Messages.ResourceTiming;
|
|
69
|
+
export declare function Incident(label: string, startTime: number, endTime: number): Messages.Incident;
|
|
70
|
+
export declare function LongAnimationTask(name: string, duration: number, blockingDuration: number, firstUIEventTimestamp: number, startTime: number, scripts: string): Messages.LongAnimationTask;
|
|
71
71
|
export declare function InputChange(id: number, value: string, valueMasked: boolean, label: string, hesitationTime: number, inputDuration: number): Messages.InputChange;
|
|
72
72
|
export declare function SelectionChange(selectionStart: number, selectionEnd: number, selection: string): Messages.SelectionChange;
|
|
73
73
|
export declare function MouseThrashing(timestamp: number): Messages.MouseThrashing;
|
|
74
74
|
export declare function UnbindNodes(totalRemovedPercent: number): Messages.UnbindNodes;
|
|
75
|
-
export declare function
|
|
75
|
+
export declare function ResourceTimingDeprecated(timestamp: number, duration: number, ttfb: number, headerSize: number, encodedBodySize: number, decodedBodySize: number, url: string, initiator: string, transferredSize: number, cached: boolean): Messages.ResourceTimingDeprecated;
|
|
76
76
|
export declare function TabChange(tabId: string): Messages.TabChange;
|
|
77
77
|
export declare function TabData(tabId: string): Messages.TabData;
|
|
78
78
|
export declare function CanvasNode(nodeId: string, timestamp: number): Messages.CanvasNode;
|
|
@@ -2,6 +2,7 @@ import App from '../index.js';
|
|
|
2
2
|
export declare function parseUseEl(useElement: SVGUseElement, mode: 'inline' | 'dataurl' | 'svgtext', domParser: DOMParser): Promise<any>;
|
|
3
3
|
interface Options {
|
|
4
4
|
disableSprites?: boolean;
|
|
5
|
+
disableThrottling?: boolean;
|
|
5
6
|
inlineRemoteCss?: boolean;
|
|
6
7
|
inlinerOptions?: {
|
|
7
8
|
forceFetch?: boolean;
|
|
@@ -17,6 +18,7 @@ export default abstract class Observer {
|
|
|
17
18
|
private readonly indexes;
|
|
18
19
|
private readonly attributesMap;
|
|
19
20
|
private readonly textSet;
|
|
21
|
+
private readonly slotMap;
|
|
20
22
|
private readonly disableSprites;
|
|
21
23
|
/**
|
|
22
24
|
* this option means that, instead of using link element with href to load css,
|
|
@@ -35,6 +37,8 @@ export default abstract class Observer {
|
|
|
35
37
|
*/
|
|
36
38
|
private handleIframeSrcChange;
|
|
37
39
|
private sendNodeAttribute;
|
|
40
|
+
throttling: boolean;
|
|
41
|
+
private throttledSetNodeData;
|
|
38
42
|
private sendNodeData;
|
|
39
43
|
private bindNode;
|
|
40
44
|
private bindTree;
|
|
@@ -2,11 +2,12 @@ import Observer from './observer.js';
|
|
|
2
2
|
import { Offset } from './iframe_offsets.js';
|
|
3
3
|
import App from '../index.js';
|
|
4
4
|
export declare enum InlineCssMode {
|
|
5
|
+
Unset = -1,
|
|
5
6
|
/** default behavior -- will parse and cache the css file on backend */
|
|
6
7
|
Disabled = 0,
|
|
7
8
|
/** will attempt to record the linked css file as AdoptedStyleSheet object */
|
|
8
9
|
Inline = 1,
|
|
9
|
-
/** will fetch the file, then
|
|
10
|
+
/** will fetch the file, then simulate AdoptedStyleSheets behavior programmaticaly for the replay */
|
|
10
11
|
InlineFetched = 2,
|
|
11
12
|
/** will fetch the file, then save it as plain css inside <style> node */
|
|
12
13
|
PlainFetched = 3
|
|
@@ -22,6 +23,7 @@ export interface Options {
|
|
|
22
23
|
* @default InlineCssMode.None = 0
|
|
23
24
|
* */
|
|
24
25
|
inlineCss: InlineCssMode;
|
|
26
|
+
disableThrottling?: boolean;
|
|
25
27
|
}
|
|
26
28
|
type Context = Window & typeof globalThis;
|
|
27
29
|
type ContextCallback = (context: Context) => void;
|
|
@@ -45,6 +45,7 @@ export default class Session {
|
|
|
45
45
|
getPageNumber: () => number | undefined;
|
|
46
46
|
incPageNo: () => number;
|
|
47
47
|
getSessionToken: (projectKey?: string) => string | undefined;
|
|
48
|
+
getRawTokenWithProject: () => string | null;
|
|
48
49
|
setSessionToken: (token: string, projectKey: string) => void;
|
|
49
50
|
applySessionHash(hash: string): void;
|
|
50
51
|
getSessionHash(): string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import TrackerClass from './index
|
|
2
|
-
export { default as App } from './app/index
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
import TrackerClass from './index';
|
|
2
|
+
export { default as App } from './app/index';
|
|
3
|
+
export { default as tracker, default as openReplay } from './singleton';
|
|
4
|
+
export { SanitizeLevel, Messages, Options } from './index';
|
|
5
|
+
export { default as Analytics } from './modules/analytics/index';
|
|
5
6
|
export default TrackerClass;
|