@openreplay/tracker 11.0.0 → 11.0.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/CHANGELOG.md +4 -0
- package/cjs/app/index.d.ts +3 -0
- package/cjs/app/index.js +27 -4
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -1
- package/cjs/modules/userTesting/SignalManager.d.ts +29 -0
- package/cjs/modules/userTesting/SignalManager.js +83 -0
- package/cjs/modules/userTesting/index.d.ts +5 -5
- package/cjs/modules/userTesting/index.js +156 -189
- package/cjs/modules/userTesting/styles.d.ts +28 -11
- package/cjs/modules/userTesting/styles.js +51 -29
- package/cjs/modules/userTesting/utils.d.ts +9 -0
- package/cjs/modules/userTesting/utils.js +87 -0
- package/coverage/clover.xml +851 -351
- package/coverage/coverage-final.json +10 -4
- package/coverage/lcov-report/index.html +38 -23
- package/coverage/lcov-report/main/app/canvas.ts.html +1 -1
- package/coverage/lcov-report/main/app/guards.ts.html +42 -42
- package/coverage/lcov-report/main/app/index.html +24 -24
- package/coverage/lcov-report/main/app/index.ts.html +196 -28
- package/coverage/lcov-report/main/app/logger.ts.html +1 -1
- package/coverage/lcov-report/main/app/messages.gen.ts.html +1 -1
- package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/index.html +1 -1
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/sanitizer.ts.html +1 -1
- package/coverage/lcov-report/main/app/session.ts.html +1 -1
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +11 -11
- package/coverage/lcov-report/main/index.ts.html +33 -6
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +1 -1
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/console.ts.html +1 -1
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +1 -1
- package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
- package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +1 -1
- package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
- package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
- package/coverage/lcov-report/main/modules/img.ts.html +1 -1
- package/coverage/lcov-report/main/modules/index.html +1 -1
- package/coverage/lcov-report/main/modules/input.ts.html +1 -1
- package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
- package/coverage/lcov-report/main/modules/network.ts.html +1 -1
- package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
- package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
- package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
- package/coverage/lcov-report/main/modules/timing.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +361 -0
- package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +10 -22
- package/coverage/lcov-report/main/modules/userTesting/index.html +61 -31
- package/coverage/lcov-report/main/modules/userTesting/index.ts.html +809 -113
- package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +136 -67
- package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +159 -87
- package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +361 -0
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +48 -6
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
- package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
- package/coverage/lcov-report/webworker/index.html +1 -1
- package/coverage/lcov-report/webworker/index.ts.html +1 -1
- package/coverage/lcov.info +1535 -653
- package/lib/app/index.d.ts +3 -0
- package/lib/app/index.js +27 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -1
- package/lib/modules/userTesting/SignalManager.d.ts +29 -0
- package/lib/modules/userTesting/SignalManager.js +80 -0
- package/lib/modules/userTesting/index.d.ts +5 -5
- package/lib/modules/userTesting/index.js +128 -161
- package/lib/modules/userTesting/styles.d.ts +28 -11
- package/lib/modules/userTesting/styles.js +50 -28
- package/lib/modules/userTesting/utils.d.ts +9 -0
- package/lib/modules/userTesting/utils.js +79 -0
- package/package.json +2 -2
|
@@ -9,6 +9,7 @@ export declare const bgStyle: {
|
|
|
9
9
|
alignItems: string;
|
|
10
10
|
justifyContent: string;
|
|
11
11
|
zIndex: number;
|
|
12
|
+
fontFamily: string;
|
|
12
13
|
};
|
|
13
14
|
export declare const containerStyle: {
|
|
14
15
|
display: string;
|
|
@@ -27,6 +28,7 @@ export declare const containerWidgetStyle: {
|
|
|
27
28
|
gap: string;
|
|
28
29
|
'align-items': string;
|
|
29
30
|
padding: string;
|
|
31
|
+
fontFamily: string;
|
|
30
32
|
'border-radius': string;
|
|
31
33
|
border: string;
|
|
32
34
|
background: string;
|
|
@@ -50,6 +52,7 @@ export declare const descriptionStyle: {
|
|
|
50
52
|
fontStyle: string;
|
|
51
53
|
fontWeight: string;
|
|
52
54
|
lineHeight: string;
|
|
55
|
+
whiteSpace: string;
|
|
53
56
|
};
|
|
54
57
|
export declare const noticeStyle: {
|
|
55
58
|
color: string;
|
|
@@ -93,6 +96,8 @@ export declare const contentStyle: {
|
|
|
93
96
|
flexDirection: string;
|
|
94
97
|
alignItems: string;
|
|
95
98
|
gap: string;
|
|
99
|
+
fontSize: string;
|
|
100
|
+
lineHeight: string;
|
|
96
101
|
};
|
|
97
102
|
export declare const titleWidgetStyle: {
|
|
98
103
|
padding: string;
|
|
@@ -114,17 +119,14 @@ export declare const descriptionWidgetStyle: {
|
|
|
114
119
|
boxSizing: string;
|
|
115
120
|
display: string;
|
|
116
121
|
width: string;
|
|
117
|
-
|
|
118
|
-
border: string;
|
|
122
|
+
borderBottom: string;
|
|
119
123
|
background: string;
|
|
120
124
|
padding: string;
|
|
121
125
|
alignSelf: string;
|
|
122
126
|
color: string;
|
|
123
127
|
fontFamily: string;
|
|
124
|
-
fontSize: string;
|
|
125
128
|
fontStyle: string;
|
|
126
129
|
fontWeight: string;
|
|
127
|
-
lineHeight: string;
|
|
128
130
|
};
|
|
129
131
|
export declare const endSectionStyle: {
|
|
130
132
|
display: string;
|
|
@@ -133,17 +135,14 @@ export declare const endSectionStyle: {
|
|
|
133
135
|
gap: string;
|
|
134
136
|
boxSizing: string;
|
|
135
137
|
width: string;
|
|
136
|
-
|
|
137
|
-
border: string;
|
|
138
|
+
borderBottom: string;
|
|
138
139
|
background: string;
|
|
139
140
|
padding: string;
|
|
140
141
|
alignSelf: string;
|
|
141
142
|
color: string;
|
|
142
143
|
fontFamily: string;
|
|
143
|
-
fontSize: string;
|
|
144
144
|
fontStyle: string;
|
|
145
145
|
fontWeight: string;
|
|
146
|
-
lineHeight: string;
|
|
147
146
|
};
|
|
148
147
|
export declare const symbolIcon: {
|
|
149
148
|
fontSize: string;
|
|
@@ -174,9 +173,12 @@ export declare const buttonWidgetStyle: {
|
|
|
174
173
|
};
|
|
175
174
|
export declare const stopWidgetStyle: {
|
|
176
175
|
marginTop: string;
|
|
176
|
+
marginBottom: string;
|
|
177
177
|
cursor: string;
|
|
178
178
|
display: string;
|
|
179
179
|
fontWeight: string;
|
|
180
|
+
fontSize: string;
|
|
181
|
+
lineHeight: string;
|
|
180
182
|
};
|
|
181
183
|
export declare const paginationStyle: {
|
|
182
184
|
display: string;
|
|
@@ -189,21 +191,27 @@ export declare const paginationStyle: {
|
|
|
189
191
|
};
|
|
190
192
|
export declare const taskNumberActive: {
|
|
191
193
|
display: string;
|
|
192
|
-
padding: string;
|
|
193
194
|
flexDirection: string;
|
|
194
195
|
alignItems: string;
|
|
196
|
+
justifyContent: string;
|
|
195
197
|
borderRadius: string;
|
|
196
198
|
outline: string;
|
|
199
|
+
fontSize: string;
|
|
200
|
+
height: string;
|
|
201
|
+
width: string;
|
|
197
202
|
};
|
|
198
203
|
export declare const taskNumberDone: {
|
|
199
204
|
display: string;
|
|
200
|
-
padding: string;
|
|
201
205
|
flexDirection: string;
|
|
202
206
|
alignItems: string;
|
|
207
|
+
justifyContent: string;
|
|
203
208
|
borderRadius: string;
|
|
204
209
|
outline: string;
|
|
205
210
|
boxShadow: string;
|
|
206
211
|
background: string;
|
|
212
|
+
fontSize: string;
|
|
213
|
+
height: string;
|
|
214
|
+
width: string;
|
|
207
215
|
};
|
|
208
216
|
export declare const taskDescriptionCard: {
|
|
209
217
|
borderRadius: string;
|
|
@@ -220,7 +228,8 @@ export declare const taskTextStyle: {
|
|
|
220
228
|
fontWeight: string;
|
|
221
229
|
};
|
|
222
230
|
export declare const taskDescriptionStyle: {
|
|
223
|
-
|
|
231
|
+
fontSize: string;
|
|
232
|
+
lineHeight: string;
|
|
224
233
|
};
|
|
225
234
|
export declare const taskButtonStyle: {
|
|
226
235
|
marginRight: string;
|
|
@@ -258,3 +267,11 @@ export declare const taskButtonsRow: {
|
|
|
258
267
|
width: string;
|
|
259
268
|
boxSizing: string;
|
|
260
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.taskButtonsRow = exports.taskButtonBorderedStyle = exports.taskButtonStyle = exports.taskDescriptionStyle = exports.taskTextStyle = exports.taskDescriptionCard = exports.taskNumberDone = exports.taskNumberActive = exports.paginationStyle = exports.stopWidgetStyle = exports.buttonWidgetStyle = exports.symbolIcon = exports.endSectionStyle = exports.descriptionWidgetStyle = exports.titleWidgetStyle = exports.contentStyle = exports.sectionTitleStyle = exports.buttonStyle = exports.noticeStyle = exports.descriptionStyle = exports.titleStyle = exports.containerWidgetStyle = exports.containerStyle = exports.bgStyle = void 0;
|
|
3
|
+
exports.spinnerStyles = exports.taskButtonsRow = exports.taskButtonBorderedStyle = exports.taskButtonStyle = exports.taskDescriptionStyle = exports.taskTextStyle = exports.taskDescriptionCard = exports.taskNumberDone = exports.taskNumberActive = exports.paginationStyle = exports.stopWidgetStyle = exports.buttonWidgetStyle = exports.symbolIcon = exports.endSectionStyle = exports.descriptionWidgetStyle = exports.titleWidgetStyle = exports.contentStyle = exports.sectionTitleStyle = exports.buttonStyle = exports.noticeStyle = exports.descriptionStyle = exports.titleStyle = exports.containerWidgetStyle = exports.containerStyle = exports.bgStyle = void 0;
|
|
4
4
|
exports.bgStyle = {
|
|
5
5
|
position: 'fixed',
|
|
6
6
|
top: 0,
|
|
@@ -12,28 +12,30 @@ exports.bgStyle = {
|
|
|
12
12
|
alignItems: 'center',
|
|
13
13
|
justifyContent: 'center',
|
|
14
14
|
zIndex: 999999,
|
|
15
|
+
fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
|
|
15
16
|
};
|
|
16
17
|
exports.containerStyle = {
|
|
17
18
|
display: 'flex',
|
|
18
19
|
flexDirection: 'column',
|
|
19
|
-
gap: '
|
|
20
|
+
gap: '2rem',
|
|
20
21
|
alignItems: 'center',
|
|
21
22
|
padding: '1.5rem',
|
|
22
|
-
borderRadius: '
|
|
23
|
+
borderRadius: '2px',
|
|
23
24
|
border: '1px solid #D9D9D9',
|
|
24
25
|
background: '#FFF',
|
|
25
|
-
width: '
|
|
26
|
+
width: '22rem',
|
|
26
27
|
};
|
|
27
28
|
exports.containerWidgetStyle = {
|
|
28
29
|
display: 'flex',
|
|
29
30
|
'flex-direction': 'column',
|
|
30
|
-
gap: '
|
|
31
|
+
gap: 'unset',
|
|
31
32
|
'align-items': 'center',
|
|
32
|
-
padding: '
|
|
33
|
-
|
|
33
|
+
padding: 'unset',
|
|
34
|
+
fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
|
|
35
|
+
'border-radius': '2px',
|
|
34
36
|
border: '1px solid #D9D9D9',
|
|
35
|
-
background: '
|
|
36
|
-
width: '
|
|
37
|
+
background: 'rgba(255, 255, 255, 0.75)',
|
|
38
|
+
width: '22rem',
|
|
37
39
|
};
|
|
38
40
|
exports.titleStyle = {
|
|
39
41
|
fontFamily: 'Verdana, sans-serif',
|
|
@@ -49,10 +51,11 @@ exports.descriptionStyle = {
|
|
|
49
51
|
padding: '1.25rem 0rem',
|
|
50
52
|
color: 'rgba(0, 0, 0, 0.85)',
|
|
51
53
|
fontFamily: 'Verdana, sans-serif',
|
|
52
|
-
fontSize: '
|
|
54
|
+
fontSize: '13px',
|
|
53
55
|
fontStyle: 'normal',
|
|
54
56
|
fontWeight: '400',
|
|
55
|
-
lineHeight: '
|
|
57
|
+
lineHeight: 'auto',
|
|
58
|
+
whiteSpace: 'pre-wrap',
|
|
56
59
|
};
|
|
57
60
|
exports.noticeStyle = {
|
|
58
61
|
color: 'rgba(0, 0, 0, 0.85)',
|
|
@@ -83,9 +86,9 @@ exports.buttonStyle = {
|
|
|
83
86
|
};
|
|
84
87
|
exports.sectionTitleStyle = {
|
|
85
88
|
fontFamily: 'Verdana, sans-serif',
|
|
86
|
-
fontSize: '
|
|
89
|
+
fontSize: '13px',
|
|
87
90
|
fontWeight: '500',
|
|
88
|
-
lineHeight: '
|
|
91
|
+
lineHeight: 'auto',
|
|
89
92
|
display: 'flex',
|
|
90
93
|
justifyContent: 'space-between',
|
|
91
94
|
width: '100%',
|
|
@@ -96,39 +99,40 @@ exports.contentStyle = {
|
|
|
96
99
|
flexDirection: 'column',
|
|
97
100
|
alignItems: 'flex-start',
|
|
98
101
|
gap: '0.625rem',
|
|
102
|
+
fontSize: '13px',
|
|
103
|
+
lineHeight: 'auto',
|
|
99
104
|
};
|
|
100
105
|
// New widget styles
|
|
101
106
|
exports.titleWidgetStyle = {
|
|
102
107
|
padding: '0.5rem',
|
|
103
108
|
gap: '0.5rem',
|
|
104
109
|
fontFamily: 'Verdana, sans-serif',
|
|
105
|
-
fontSize: '
|
|
110
|
+
fontSize: '16px',
|
|
106
111
|
fontStyle: 'normal',
|
|
107
112
|
fontWeight: '500',
|
|
108
|
-
lineHeight: '
|
|
113
|
+
lineHeight: 'auto',
|
|
109
114
|
color: 'white',
|
|
110
115
|
display: 'flex',
|
|
111
116
|
alignItems: 'center',
|
|
112
117
|
width: '100%',
|
|
113
|
-
borderRadius: '
|
|
114
|
-
background: 'rgba(0, 0, 0, 0.
|
|
118
|
+
borderRadius: '2px',
|
|
119
|
+
background: 'rgba(0, 0, 0, 0.75)',
|
|
115
120
|
boxSizing: 'border-box',
|
|
116
121
|
};
|
|
117
122
|
exports.descriptionWidgetStyle = {
|
|
118
123
|
boxSizing: 'border-box',
|
|
119
124
|
display: 'block',
|
|
120
125
|
width: '100%',
|
|
121
|
-
|
|
122
|
-
border: '1px solid #D9D9D9',
|
|
126
|
+
borderBottom: '1px solid #D9D9D9',
|
|
123
127
|
background: '#FFF',
|
|
124
|
-
padding: '0.
|
|
128
|
+
padding: '0.65rem',
|
|
125
129
|
alignSelf: 'stretch',
|
|
126
130
|
color: '#000',
|
|
127
131
|
fontFamily: 'Verdana, sans-serif',
|
|
128
|
-
fontSize: '0.875rem',
|
|
132
|
+
// fontSize: '0.875rem',
|
|
129
133
|
fontStyle: 'normal',
|
|
130
134
|
fontWeight: '400',
|
|
131
|
-
lineHeight: '1.375rem',
|
|
135
|
+
// lineHeight: '1.375rem',
|
|
132
136
|
};
|
|
133
137
|
exports.endSectionStyle = Object.assign(Object.assign({}, exports.descriptionWidgetStyle), { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.625rem' });
|
|
134
138
|
exports.symbolIcon = {
|
|
@@ -159,10 +163,13 @@ exports.buttonWidgetStyle = {
|
|
|
159
163
|
cursor: 'pointer',
|
|
160
164
|
};
|
|
161
165
|
exports.stopWidgetStyle = {
|
|
162
|
-
marginTop: '
|
|
166
|
+
marginTop: '1rem',
|
|
167
|
+
marginBottom: '1rem',
|
|
163
168
|
cursor: 'pointer',
|
|
164
169
|
display: 'block',
|
|
165
|
-
fontWeight: '
|
|
170
|
+
fontWeight: '500',
|
|
171
|
+
fontSize: '13px!important',
|
|
172
|
+
lineHeight: 'auto',
|
|
166
173
|
};
|
|
167
174
|
exports.paginationStyle = {
|
|
168
175
|
display: 'flex',
|
|
@@ -175,21 +182,27 @@ exports.paginationStyle = {
|
|
|
175
182
|
};
|
|
176
183
|
exports.taskNumberActive = {
|
|
177
184
|
display: 'flex',
|
|
178
|
-
padding: '0.0625rem 0.5rem',
|
|
179
185
|
flexDirection: 'column',
|
|
180
186
|
alignItems: 'center',
|
|
187
|
+
justifyContent: 'center',
|
|
181
188
|
borderRadius: '6.25em',
|
|
182
189
|
outline: '1px solid #394EFF',
|
|
190
|
+
fontSize: '13px',
|
|
191
|
+
height: '24px',
|
|
192
|
+
width: '24px',
|
|
183
193
|
};
|
|
184
194
|
exports.taskNumberDone = {
|
|
185
195
|
display: 'flex',
|
|
186
|
-
padding: '0.0625rem 0.5rem',
|
|
187
196
|
flexDirection: 'column',
|
|
188
197
|
alignItems: 'center',
|
|
198
|
+
justifyContent: 'center',
|
|
189
199
|
borderRadius: '6.25em',
|
|
190
200
|
outline: '1px solid #D2DFFF',
|
|
191
201
|
boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
|
|
192
202
|
background: '#D2DFFF',
|
|
203
|
+
fontSize: '13px',
|
|
204
|
+
height: '24px',
|
|
205
|
+
width: '24px',
|
|
193
206
|
};
|
|
194
207
|
exports.taskDescriptionCard = {
|
|
195
208
|
borderRadius: '0.375rem',
|
|
@@ -206,7 +219,8 @@ exports.taskTextStyle = {
|
|
|
206
219
|
fontWeight: 'bold',
|
|
207
220
|
};
|
|
208
221
|
exports.taskDescriptionStyle = {
|
|
209
|
-
|
|
222
|
+
fontSize: '13px',
|
|
223
|
+
lineHeight: 'auto',
|
|
210
224
|
};
|
|
211
225
|
exports.taskButtonStyle = {
|
|
212
226
|
marginRight: '0.5rem',
|
|
@@ -214,10 +228,10 @@ exports.taskButtonStyle = {
|
|
|
214
228
|
color: '#394EFF',
|
|
215
229
|
textAlign: 'center',
|
|
216
230
|
fontFamily: 'Verdana, sans-serif',
|
|
217
|
-
fontSize: '
|
|
231
|
+
fontSize: '13px',
|
|
218
232
|
fontStyle: 'normal',
|
|
219
233
|
fontWeight: '500',
|
|
220
|
-
lineHeight: '
|
|
234
|
+
lineHeight: 'auto',
|
|
221
235
|
};
|
|
222
236
|
exports.taskButtonBorderedStyle = Object.assign(Object.assign({}, exports.taskButtonStyle), { display: 'flex', padding: '0.25rem 0.9375rem', justifyContent: 'center', alignItems: 'center', gap: '0.5rem', borderRadius: '0.25rem', border: '1px solid #394EFF' });
|
|
223
237
|
exports.taskButtonsRow = {
|
|
@@ -227,3 +241,11 @@ exports.taskButtonsRow = {
|
|
|
227
241
|
width: '100%',
|
|
228
242
|
boxSizing: 'border-box',
|
|
229
243
|
};
|
|
244
|
+
exports.spinnerStyles = {
|
|
245
|
+
border: '4px solid rgba(255, 255, 255, 0.4)',
|
|
246
|
+
width: '16px',
|
|
247
|
+
height: '16px',
|
|
248
|
+
borderRadius: '50%',
|
|
249
|
+
borderLeftColor: '#fff',
|
|
250
|
+
animation: 'spin 0.5s linear infinite',
|
|
251
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEST_ID = exports.SESSION_ID = exports.TASK_IND = exports.TEST_START = exports.createElement = exports.createSpinner = exports.addKeyframes = exports.generateChevron = exports.generateGrid = void 0;
|
|
4
|
+
const styles_js_1 = require("./styles.js");
|
|
5
|
+
function generateGrid() {
|
|
6
|
+
const grid = document.createElement('div');
|
|
7
|
+
grid.className = 'grid';
|
|
8
|
+
for (let i = 0; i < 16; i++) {
|
|
9
|
+
const cell = document.createElement('div');
|
|
10
|
+
Object.assign(cell.style, {
|
|
11
|
+
width: '2px',
|
|
12
|
+
height: '2px',
|
|
13
|
+
borderRadius: '10px',
|
|
14
|
+
background: 'white',
|
|
15
|
+
});
|
|
16
|
+
cell.className = 'cell';
|
|
17
|
+
grid.appendChild(cell);
|
|
18
|
+
}
|
|
19
|
+
Object.assign(grid.style, {
|
|
20
|
+
display: 'grid',
|
|
21
|
+
gridTemplateColumns: 'repeat(4, 1fr)',
|
|
22
|
+
gridTemplateRows: 'repeat(4, 1fr)',
|
|
23
|
+
gap: '2px',
|
|
24
|
+
cursor: 'grab',
|
|
25
|
+
});
|
|
26
|
+
return grid;
|
|
27
|
+
}
|
|
28
|
+
exports.generateGrid = generateGrid;
|
|
29
|
+
function generateChevron() {
|
|
30
|
+
const triangle = document.createElement('div');
|
|
31
|
+
Object.assign(triangle.style, {
|
|
32
|
+
width: '0',
|
|
33
|
+
height: '0',
|
|
34
|
+
borderLeft: '7px solid transparent',
|
|
35
|
+
borderRight: '7px solid transparent',
|
|
36
|
+
borderBottom: '7px solid white',
|
|
37
|
+
});
|
|
38
|
+
const container = document.createElement('div');
|
|
39
|
+
container.appendChild(triangle);
|
|
40
|
+
Object.assign(container.style, {
|
|
41
|
+
display: 'flex',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
width: '16px',
|
|
45
|
+
height: '16px',
|
|
46
|
+
cursor: 'pointer',
|
|
47
|
+
marginLeft: 'auto',
|
|
48
|
+
transform: 'rotate(180deg)',
|
|
49
|
+
});
|
|
50
|
+
return container;
|
|
51
|
+
}
|
|
52
|
+
exports.generateChevron = generateChevron;
|
|
53
|
+
function addKeyframes() {
|
|
54
|
+
const styleSheet = document.createElement('style');
|
|
55
|
+
styleSheet.type = 'text/css';
|
|
56
|
+
styleSheet.innerText = `@keyframes spin {
|
|
57
|
+
0% { transform: rotate(0deg); }
|
|
58
|
+
100% { transform: rotate(360deg); }
|
|
59
|
+
}`;
|
|
60
|
+
document.head.appendChild(styleSheet);
|
|
61
|
+
}
|
|
62
|
+
exports.addKeyframes = addKeyframes;
|
|
63
|
+
function createSpinner() {
|
|
64
|
+
addKeyframes();
|
|
65
|
+
const spinner = document.createElement('div');
|
|
66
|
+
spinner.classList.add('spinner');
|
|
67
|
+
Object.assign(spinner.style, styles_js_1.spinnerStyles);
|
|
68
|
+
return spinner;
|
|
69
|
+
}
|
|
70
|
+
exports.createSpinner = createSpinner;
|
|
71
|
+
function createElement(tag, className, styles, textContent, id) {
|
|
72
|
+
const element = document.createElement(tag);
|
|
73
|
+
element.className = className;
|
|
74
|
+
Object.assign(element.style, styles);
|
|
75
|
+
if (textContent) {
|
|
76
|
+
element.textContent = textContent;
|
|
77
|
+
}
|
|
78
|
+
if (id) {
|
|
79
|
+
element.id = id;
|
|
80
|
+
}
|
|
81
|
+
return element;
|
|
82
|
+
}
|
|
83
|
+
exports.createElement = createElement;
|
|
84
|
+
exports.TEST_START = 'or_uxt_test_start';
|
|
85
|
+
exports.TASK_IND = 'or_uxt_task_index';
|
|
86
|
+
exports.SESSION_ID = 'or_uxt_session_id';
|
|
87
|
+
exports.TEST_ID = 'or_uxt_test_id';
|