@openreplay/tracker 16.4.11-beta.0 → 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.
Files changed (102) hide show
  1. package/dist/cjs/common/messages.gen.d.ts +1 -44
  2. package/dist/cjs/entry.js +1584 -2177
  3. package/dist/cjs/entry.js.map +1 -1
  4. package/dist/cjs/index.js +1566 -2135
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/main/app/canvas.d.ts +11 -0
  7. package/dist/cjs/main/app/index.d.ts +2 -7
  8. package/dist/cjs/main/app/messages.gen.d.ts +0 -5
  9. package/dist/cjs/main/app/nodes/idSeq.d.ts +14 -0
  10. package/dist/cjs/main/app/nodes/index.d.ts +2 -1
  11. package/dist/cjs/main/app/observer/top_observer.d.ts +2 -1
  12. package/dist/cjs/main/app/session.d.ts +1 -0
  13. package/dist/cjs/main/entry.d.ts +5 -4
  14. package/dist/cjs/main/index.d.ts +22 -17
  15. package/dist/cjs/main/modules/analytics/batcher.d.ts +45 -0
  16. package/dist/cjs/main/modules/analytics/constantProperties.d.ts +53 -0
  17. package/dist/cjs/main/modules/analytics/demo.d.ts +0 -0
  18. package/dist/cjs/main/modules/analytics/events.d.ts +37 -0
  19. package/dist/cjs/main/modules/analytics/index.d.ts +73 -0
  20. package/dist/cjs/main/modules/analytics/people.d.ts +51 -0
  21. package/dist/cjs/main/modules/analytics/types.d.ts +32 -0
  22. package/dist/cjs/main/modules/analytics/utils.d.ts +19 -0
  23. package/dist/cjs/main/modules/conditionsManager.d.ts +6 -1
  24. package/dist/cjs/main/modules/input.d.ts +2 -1
  25. package/dist/cjs/main/modules/mouse.d.ts +1 -0
  26. package/dist/cjs/main/modules/viewport.d.ts +7 -0
  27. package/dist/cjs/main/singleton.d.ts +5 -7
  28. package/dist/cjs/main/utils.d.ts +2 -0
  29. package/dist/lib/common/messages.gen.d.ts +1 -44
  30. package/dist/lib/entry.js +1583 -2178
  31. package/dist/lib/entry.js.map +1 -1
  32. package/dist/lib/index.js +1566 -2135
  33. package/dist/lib/index.js.map +1 -1
  34. package/dist/lib/main/app/canvas.d.ts +11 -0
  35. package/dist/lib/main/app/index.d.ts +2 -7
  36. package/dist/lib/main/app/messages.gen.d.ts +0 -5
  37. package/dist/lib/main/app/nodes/idSeq.d.ts +14 -0
  38. package/dist/lib/main/app/nodes/index.d.ts +2 -1
  39. package/dist/lib/main/app/observer/top_observer.d.ts +2 -1
  40. package/dist/lib/main/app/session.d.ts +1 -0
  41. package/dist/lib/main/entry.d.ts +5 -4
  42. package/dist/lib/main/index.d.ts +22 -17
  43. package/dist/lib/main/modules/analytics/batcher.d.ts +45 -0
  44. package/dist/lib/main/modules/analytics/constantProperties.d.ts +53 -0
  45. package/dist/lib/main/modules/analytics/demo.d.ts +0 -0
  46. package/dist/lib/main/modules/analytics/events.d.ts +37 -0
  47. package/dist/lib/main/modules/analytics/index.d.ts +73 -0
  48. package/dist/lib/main/modules/analytics/people.d.ts +51 -0
  49. package/dist/lib/main/modules/analytics/types.d.ts +32 -0
  50. package/dist/lib/main/modules/analytics/utils.d.ts +19 -0
  51. package/dist/lib/main/modules/conditionsManager.d.ts +6 -1
  52. package/dist/lib/main/modules/input.d.ts +2 -1
  53. package/dist/lib/main/modules/mouse.d.ts +1 -0
  54. package/dist/lib/main/modules/viewport.d.ts +7 -0
  55. package/dist/lib/main/singleton.d.ts +5 -7
  56. package/dist/lib/main/utils.d.ts +2 -0
  57. package/dist/types/common/messages.gen.d.ts +1 -44
  58. package/dist/types/main/app/canvas.d.ts +11 -0
  59. package/dist/types/main/app/index.d.ts +2 -7
  60. package/dist/types/main/app/messages.gen.d.ts +0 -5
  61. package/dist/types/main/app/nodes/idSeq.d.ts +14 -0
  62. package/dist/types/main/app/nodes/index.d.ts +2 -1
  63. package/dist/types/main/app/observer/top_observer.d.ts +2 -1
  64. package/dist/types/main/app/session.d.ts +1 -0
  65. package/dist/types/main/entry.d.ts +5 -4
  66. package/dist/types/main/index.d.ts +22 -17
  67. package/dist/types/main/modules/analytics/batcher.d.ts +45 -0
  68. package/dist/types/main/modules/analytics/constantProperties.d.ts +53 -0
  69. package/dist/types/main/modules/analytics/demo.d.ts +0 -0
  70. package/dist/types/main/modules/analytics/events.d.ts +37 -0
  71. package/dist/types/main/modules/analytics/index.d.ts +73 -0
  72. package/dist/types/main/modules/analytics/people.d.ts +51 -0
  73. package/dist/types/main/modules/analytics/types.d.ts +32 -0
  74. package/dist/types/main/modules/analytics/utils.d.ts +19 -0
  75. package/dist/types/main/modules/conditionsManager.d.ts +6 -1
  76. package/dist/types/main/modules/input.d.ts +2 -1
  77. package/dist/types/main/modules/mouse.d.ts +1 -0
  78. package/dist/types/main/modules/viewport.d.ts +7 -0
  79. package/dist/types/main/singleton.d.ts +5 -7
  80. package/dist/types/main/utils.d.ts +2 -0
  81. package/package.json +1 -1
  82. package/dist/cjs/main/modules/featureFlags.d.ts +0 -25
  83. package/dist/cjs/main/modules/userTesting/SignalManager.d.ts +0 -29
  84. package/dist/cjs/main/modules/userTesting/dnd.d.ts +0 -1
  85. package/dist/cjs/main/modules/userTesting/index.d.ts +0 -45
  86. package/dist/cjs/main/modules/userTesting/recorder.d.ts +0 -24
  87. package/dist/cjs/main/modules/userTesting/styles.d.ts +0 -277
  88. package/dist/cjs/main/modules/userTesting/utils.d.ts +0 -9
  89. package/dist/lib/main/modules/featureFlags.d.ts +0 -25
  90. package/dist/lib/main/modules/userTesting/SignalManager.d.ts +0 -29
  91. package/dist/lib/main/modules/userTesting/dnd.d.ts +0 -1
  92. package/dist/lib/main/modules/userTesting/index.d.ts +0 -45
  93. package/dist/lib/main/modules/userTesting/recorder.d.ts +0 -24
  94. package/dist/lib/main/modules/userTesting/styles.d.ts +0 -277
  95. package/dist/lib/main/modules/userTesting/utils.d.ts +0 -9
  96. package/dist/types/main/modules/featureFlags.d.ts +0 -25
  97. package/dist/types/main/modules/userTesting/SignalManager.d.ts +0 -29
  98. package/dist/types/main/modules/userTesting/dnd.d.ts +0 -1
  99. package/dist/types/main/modules/userTesting/index.d.ts +0 -45
  100. package/dist/types/main/modules/userTesting/recorder.d.ts +0 -24
  101. package/dist/types/main/modules/userTesting/styles.d.ts +0 -277
  102. 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
- import { IFeatureFlag } from './featureFlags.js';
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 {};
@@ -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;
@@ -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;
@@ -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
  /**
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": "16.4.11-beta.0",
4
+ "version": "16.4.11-beta.1",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -1,25 +0,0 @@
1
- import App from '../app/index.js';
2
- export interface IFeatureFlag {
3
- key: string;
4
- is_persist: boolean;
5
- value: string | boolean;
6
- payload: string;
7
- }
8
- export interface FetchPersistFlagsData {
9
- key: string;
10
- value: string | boolean;
11
- }
12
- export default class FeatureFlags {
13
- private readonly app;
14
- flags: IFeatureFlag[];
15
- storageKey: string;
16
- onFlagsCb: (flags: IFeatureFlag[]) => void;
17
- constructor(app: App);
18
- getFeatureFlag(flagName: string): IFeatureFlag | undefined;
19
- isFlagEnabled(flagName: string): boolean;
20
- onFlagsLoad(cb: (flags: IFeatureFlag[]) => void): void;
21
- reloadFlags(token?: string): Promise<void>;
22
- handleFlags(flags: IFeatureFlag[]): void;
23
- clearPersistFlags(): void;
24
- diffPersist(flags: IFeatureFlag[]): IFeatureFlag[];
25
- }
@@ -1,29 +0,0 @@
1
- export default class SignalManager {
2
- private readonly ingestPoint;
3
- private readonly getTimestamp;
4
- private readonly token;
5
- private readonly testId;
6
- private readonly storageKey;
7
- private readonly setStorageKey;
8
- private readonly removeStorageKey;
9
- private readonly getStorageKey;
10
- private readonly getSessionId;
11
- private readonly durations;
12
- constructor(ingestPoint: string, getTimestamp: () => number, token: string, testId: number, storageKey: string, setStorageKey: (key: string, value: string) => void, removeStorageKey: (key: string) => void, getStorageKey: (key: string) => string | null, getSessionId: () => string | undefined);
13
- getDurations: () => {
14
- testStart: number;
15
- tasks: {
16
- taskId: number;
17
- started: number;
18
- }[];
19
- };
20
- setDurations: (durations: {
21
- testStart: number;
22
- tasks: {
23
- taskId: number;
24
- started: number;
25
- }[];
26
- }) => void;
27
- signalTask: (taskId: number, status: "begin" | "done" | "skipped", taskAnswer?: string) => void | Promise<Response>;
28
- signalTest: (status: "begin" | "done" | "skipped") => Promise<Response>;
29
- }
@@ -1 +0,0 @@
1
- export default function attachDND(element: any, dragTarget: any): void;
@@ -1,45 +0,0 @@
1
- import App from '../../app/index.js';
2
- export default class UserTestManager {
3
- private readonly app;
4
- private readonly storageKey;
5
- private readonly userRecorder;
6
- private readonly bg;
7
- private readonly container;
8
- private widgetGuidelinesVisible;
9
- private widgetTasksVisible;
10
- private widgetVisible;
11
- isActive: boolean;
12
- private descriptionSection;
13
- private taskSection;
14
- private endSection;
15
- private stopButton;
16
- private stopButtonContainer;
17
- private test;
18
- private testId;
19
- private signalManager;
20
- constructor(app: App, storageKey: string);
21
- getTestId(): number | null;
22
- getTest: (id: number, token: string, inProgress?: boolean) => Promise<number | void>;
23
- hideTaskSection: () => boolean;
24
- showTaskSection: () => boolean;
25
- collapseWidget: () => boolean;
26
- removeGreeting: () => boolean;
27
- createGreeting(title: string, micRequired: boolean, cameraRequired: boolean): void;
28
- showWidget(guidelines: string, tasks: {
29
- title: string;
30
- description: string;
31
- task_id: number;
32
- allow_typing: boolean;
33
- }[], inProgress?: boolean): void;
34
- createTitleSection(): HTMLElement;
35
- toggleDescriptionVisibility: () => void;
36
- createDescriptionSection(guidelines: string): HTMLElement;
37
- currentTaskIndex: number;
38
- createTasksSection(tasks: {
39
- title: string;
40
- description: string;
41
- task_id: number;
42
- allow_typing: boolean;
43
- }[]): HTMLElement;
44
- showEndSection(): void;
45
- }
@@ -1,24 +0,0 @@
1
- import App from '../../app/index.js';
2
- export declare const Quality: {
3
- Standard: {
4
- width: number;
5
- height: number;
6
- };
7
- High: {
8
- width: number;
9
- height: number;
10
- };
11
- };
12
- export default class Recorder {
13
- private readonly app;
14
- private mediaRecorder;
15
- private recordedChunks;
16
- private stream;
17
- private recStartTs;
18
- constructor(app: App);
19
- startRecording(fps: number, quality: (typeof Quality)[keyof typeof Quality], micReq: boolean, camReq: boolean): Promise<void>;
20
- stopRecording(): Promise<Blob>;
21
- sendToAPI(): Promise<void | Response>;
22
- saveToFile(fileName?: string): Promise<void>;
23
- discard(): void;
24
- }
@@ -1,277 +0,0 @@
1
- export declare const bgStyle: {
2
- position: string;
3
- top: number;
4
- left: number;
5
- width: string;
6
- height: string;
7
- background: string;
8
- display: string;
9
- alignItems: string;
10
- justifyContent: string;
11
- zIndex: number;
12
- fontFamily: string;
13
- };
14
- export declare const containerStyle: {
15
- display: string;
16
- flexDirection: string;
17
- gap: string;
18
- alignItems: string;
19
- padding: string;
20
- borderRadius: string;
21
- border: string;
22
- background: string;
23
- width: string;
24
- };
25
- export declare const containerWidgetStyle: {
26
- display: string;
27
- 'flex-direction': string;
28
- gap: string;
29
- 'align-items': string;
30
- padding: string;
31
- fontFamily: string;
32
- 'border-radius': string;
33
- border: string;
34
- background: string;
35
- width: string;
36
- };
37
- export declare const titleStyle: {
38
- fontFamily: string;
39
- fontSize: string;
40
- fontStyle: string;
41
- fontWeight: string;
42
- lineHeight: string;
43
- color: string;
44
- };
45
- export declare const descriptionStyle: {
46
- borderTop: string;
47
- borderBottom: string;
48
- padding: string;
49
- color: string;
50
- fontFamily: string;
51
- fontSize: string;
52
- fontStyle: string;
53
- fontWeight: string;
54
- lineHeight: string;
55
- whiteSpace: string;
56
- };
57
- export declare const noticeStyle: {
58
- color: string;
59
- fontFamily: string;
60
- fontSize: string;
61
- fontStyle: string;
62
- fontWeight: string;
63
- lineHeight: string;
64
- };
65
- export declare const buttonStyle: {
66
- display: string;
67
- padding: string;
68
- justifyContent: string;
69
- alignItems: string;
70
- gap: string;
71
- borderRadius: string;
72
- border: string;
73
- background: string;
74
- boxShadow: string;
75
- color: string;
76
- textAlign: string;
77
- fontFamily: string;
78
- fontSize: string;
79
- fontStyle: string;
80
- fontWeight: string;
81
- lineHeight: string;
82
- cursor: string;
83
- };
84
- export declare const sectionTitleStyle: {
85
- fontFamily: string;
86
- fontSize: string;
87
- fontWeight: string;
88
- lineHeight: string;
89
- display: string;
90
- justifyContent: string;
91
- width: string;
92
- cursor: string;
93
- };
94
- export declare const contentStyle: {
95
- display: string;
96
- flexDirection: string;
97
- alignItems: string;
98
- gap: string;
99
- fontSize: string;
100
- lineHeight: string;
101
- };
102
- export declare const titleWidgetStyle: {
103
- padding: string;
104
- gap: string;
105
- fontFamily: string;
106
- fontSize: string;
107
- fontStyle: string;
108
- fontWeight: string;
109
- lineHeight: string;
110
- color: string;
111
- display: string;
112
- alignItems: string;
113
- width: string;
114
- borderRadius: string;
115
- background: string;
116
- boxSizing: string;
117
- };
118
- export declare const descriptionWidgetStyle: {
119
- boxSizing: string;
120
- display: string;
121
- width: string;
122
- borderBottom: string;
123
- background: string;
124
- padding: string;
125
- alignSelf: string;
126
- color: string;
127
- fontFamily: string;
128
- fontStyle: string;
129
- fontWeight: string;
130
- };
131
- export declare const endSectionStyle: {
132
- display: string;
133
- flexDirection: string;
134
- alignItems: string;
135
- gap: string;
136
- boxSizing: string;
137
- width: string;
138
- borderBottom: string;
139
- background: string;
140
- padding: string;
141
- alignSelf: string;
142
- color: string;
143
- fontFamily: string;
144
- fontStyle: string;
145
- fontWeight: string;
146
- };
147
- export declare const symbolIcon: {
148
- fontSize: string;
149
- fontWeight: string;
150
- cursor: string;
151
- color: string;
152
- };
153
- export declare const buttonWidgetStyle: {
154
- display: string;
155
- padding: string;
156
- justifyContent: string;
157
- alignItems: string;
158
- gap: string;
159
- borderRadius: string;
160
- border: string;
161
- background: string;
162
- boxShadow: string;
163
- color: string;
164
- textAlign: string;
165
- fontFamily: string;
166
- fontSize: string;
167
- fontStyle: string;
168
- fontWeight: string;
169
- lineHeight: string;
170
- width: string;
171
- boxSizing: string;
172
- cursor: string;
173
- };
174
- export declare const stopWidgetStyle: {
175
- marginTop: string;
176
- marginBottom: string;
177
- cursor: string;
178
- display: string;
179
- fontWeight: string;
180
- fontSize: string;
181
- lineHeight: string;
182
- };
183
- export declare const paginationStyle: {
184
- display: string;
185
- justifyContent: string;
186
- alignItems: string;
187
- gap: string;
188
- padding: string;
189
- width: string;
190
- boxSizing: string;
191
- };
192
- export declare const taskNumberActive: {
193
- display: string;
194
- flexDirection: string;
195
- alignItems: string;
196
- justifyContent: string;
197
- borderRadius: string;
198
- outline: string;
199
- fontSize: string;
200
- height: string;
201
- width: string;
202
- };
203
- export declare const taskNumberDone: {
204
- display: string;
205
- flexDirection: string;
206
- alignItems: string;
207
- justifyContent: string;
208
- borderRadius: string;
209
- outline: string;
210
- boxShadow: string;
211
- background: string;
212
- fontSize: string;
213
- height: string;
214
- width: string;
215
- };
216
- export declare const taskDescriptionCard: {
217
- borderRadius: string;
218
- border: string;
219
- background: string;
220
- boxShadow: string;
221
- display: string;
222
- flexDirection: string;
223
- padding: string;
224
- gap: string;
225
- alignSelf: string;
226
- };
227
- export declare const taskTextStyle: {
228
- fontWeight: string;
229
- };
230
- export declare const taskDescriptionStyle: {
231
- fontSize: string;
232
- lineHeight: string;
233
- };
234
- export declare const taskButtonStyle: {
235
- marginRight: string;
236
- cursor: string;
237
- color: string;
238
- textAlign: string;
239
- fontFamily: string;
240
- fontSize: string;
241
- fontStyle: string;
242
- fontWeight: string;
243
- lineHeight: string;
244
- };
245
- export declare const taskButtonBorderedStyle: {
246
- display: string;
247
- padding: string;
248
- justifyContent: string;
249
- alignItems: string;
250
- gap: string;
251
- borderRadius: string;
252
- border: string;
253
- marginRight: string;
254
- cursor: string;
255
- color: string;
256
- textAlign: string;
257
- fontFamily: string;
258
- fontSize: string;
259
- fontStyle: string;
260
- fontWeight: string;
261
- lineHeight: string;
262
- };
263
- export declare const taskButtonsRow: {
264
- display: string;
265
- justifyContent: string;
266
- alignItems: string;
267
- width: string;
268
- boxSizing: string;
269
- };
270
- export declare const spinnerStyles: {
271
- border: string;
272
- width: string;
273
- height: string;
274
- borderRadius: string;
275
- borderLeftColor: string;
276
- animation: string;
277
- };
@@ -1,9 +0,0 @@
1
- export declare function generateGrid(): HTMLDivElement;
2
- export declare function generateChevron(): HTMLDivElement;
3
- export declare function addKeyframes(): void;
4
- export declare function createSpinner(): HTMLDivElement;
5
- export declare function createElement(tag: string, className: string, styles: any, textContent?: string, id?: string): HTMLElement;
6
- export declare const TEST_START = "or_uxt_test_start";
7
- export declare const TASK_IND = "or_uxt_task_index";
8
- export declare const SESSION_ID = "or_uxt_session_id";
9
- export declare const TEST_ID = "or_uxt_test_id";
@@ -1,25 +0,0 @@
1
- import App from '../app/index.js';
2
- export interface IFeatureFlag {
3
- key: string;
4
- is_persist: boolean;
5
- value: string | boolean;
6
- payload: string;
7
- }
8
- export interface FetchPersistFlagsData {
9
- key: string;
10
- value: string | boolean;
11
- }
12
- export default class FeatureFlags {
13
- private readonly app;
14
- flags: IFeatureFlag[];
15
- storageKey: string;
16
- onFlagsCb: (flags: IFeatureFlag[]) => void;
17
- constructor(app: App);
18
- getFeatureFlag(flagName: string): IFeatureFlag | undefined;
19
- isFlagEnabled(flagName: string): boolean;
20
- onFlagsLoad(cb: (flags: IFeatureFlag[]) => void): void;
21
- reloadFlags(token?: string): Promise<void>;
22
- handleFlags(flags: IFeatureFlag[]): void;
23
- clearPersistFlags(): void;
24
- diffPersist(flags: IFeatureFlag[]): IFeatureFlag[];
25
- }
@@ -1,29 +0,0 @@
1
- export default class SignalManager {
2
- private readonly ingestPoint;
3
- private readonly getTimestamp;
4
- private readonly token;
5
- private readonly testId;
6
- private readonly storageKey;
7
- private readonly setStorageKey;
8
- private readonly removeStorageKey;
9
- private readonly getStorageKey;
10
- private readonly getSessionId;
11
- private readonly durations;
12
- constructor(ingestPoint: string, getTimestamp: () => number, token: string, testId: number, storageKey: string, setStorageKey: (key: string, value: string) => void, removeStorageKey: (key: string) => void, getStorageKey: (key: string) => string | null, getSessionId: () => string | undefined);
13
- getDurations: () => {
14
- testStart: number;
15
- tasks: {
16
- taskId: number;
17
- started: number;
18
- }[];
19
- };
20
- setDurations: (durations: {
21
- testStart: number;
22
- tasks: {
23
- taskId: number;
24
- started: number;
25
- }[];
26
- }) => void;
27
- signalTask: (taskId: number, status: "begin" | "done" | "skipped", taskAnswer?: string) => void | Promise<Response>;
28
- signalTest: (status: "begin" | "done" | "skipped") => Promise<Response>;
29
- }
@@ -1 +0,0 @@
1
- export default function attachDND(element: any, dragTarget: any): void;
@@ -1,45 +0,0 @@
1
- import App from '../../app/index.js';
2
- export default class UserTestManager {
3
- private readonly app;
4
- private readonly storageKey;
5
- private readonly userRecorder;
6
- private readonly bg;
7
- private readonly container;
8
- private widgetGuidelinesVisible;
9
- private widgetTasksVisible;
10
- private widgetVisible;
11
- isActive: boolean;
12
- private descriptionSection;
13
- private taskSection;
14
- private endSection;
15
- private stopButton;
16
- private stopButtonContainer;
17
- private test;
18
- private testId;
19
- private signalManager;
20
- constructor(app: App, storageKey: string);
21
- getTestId(): number | null;
22
- getTest: (id: number, token: string, inProgress?: boolean) => Promise<number | void>;
23
- hideTaskSection: () => boolean;
24
- showTaskSection: () => boolean;
25
- collapseWidget: () => boolean;
26
- removeGreeting: () => boolean;
27
- createGreeting(title: string, micRequired: boolean, cameraRequired: boolean): void;
28
- showWidget(guidelines: string, tasks: {
29
- title: string;
30
- description: string;
31
- task_id: number;
32
- allow_typing: boolean;
33
- }[], inProgress?: boolean): void;
34
- createTitleSection(): HTMLElement;
35
- toggleDescriptionVisibility: () => void;
36
- createDescriptionSection(guidelines: string): HTMLElement;
37
- currentTaskIndex: number;
38
- createTasksSection(tasks: {
39
- title: string;
40
- description: string;
41
- task_id: number;
42
- allow_typing: boolean;
43
- }[]): HTMLElement;
44
- showEndSection(): void;
45
- }
@@ -1,24 +0,0 @@
1
- import App from '../../app/index.js';
2
- export declare const Quality: {
3
- Standard: {
4
- width: number;
5
- height: number;
6
- };
7
- High: {
8
- width: number;
9
- height: number;
10
- };
11
- };
12
- export default class Recorder {
13
- private readonly app;
14
- private mediaRecorder;
15
- private recordedChunks;
16
- private stream;
17
- private recStartTs;
18
- constructor(app: App);
19
- startRecording(fps: number, quality: (typeof Quality)[keyof typeof Quality], micReq: boolean, camReq: boolean): Promise<void>;
20
- stopRecording(): Promise<Blob>;
21
- sendToAPI(): Promise<void | Response>;
22
- saveToFile(fileName?: string): Promise<void>;
23
- discard(): void;
24
- }