@cuemath/leap 2.8.30-as1 → 2.8.30-as2
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.
@@ -1,43 +1,43 @@
|
|
1
|
-
import { jsxs as I, jsx as
|
2
|
-
import { memo as Dt, useMemo as R, useState as
|
3
|
-
import { IMAGES as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
1
|
+
import { jsxs as I, jsx as i, Fragment as Vt } from "react/jsx-runtime";
|
2
|
+
import { memo as Dt, useMemo as R, useState as M, useRef as U, useCallback as Ut, useEffect as $, useLayoutEffect as zt } from "react";
|
3
|
+
import { IMAGES as Kt } from "../../../../assets/images/images.js";
|
4
|
+
import Pt from "../../../cue-canvas/cue-canvas.js";
|
5
|
+
import Xt from "../../../pointer-sync/pointer.js";
|
6
|
+
import vt from "../../../ui/layout/flex-view.js";
|
7
7
|
import jt from "../../constants/events.js";
|
8
8
|
import { QUESTIONS_GAP as Gt, LEARNOSITY_KEYBOARD_HEIGHT as Ht } from "../constants.js";
|
9
|
-
import { getPaperColorByQuestion as Yt, isConceptIntroWidget as Zt, scrollToQuestion as
|
9
|
+
import { getPaperColorByQuestion as Yt, isConceptIntroWidget as Zt, scrollToQuestion as bt } from "../worksheet-helpers.js";
|
10
10
|
import Jt from "./header/header.js";
|
11
11
|
import qt from "./learnosity-question.js";
|
12
12
|
import kt from "./question-backdrop/question-backdrop.js";
|
13
13
|
import te from "./subjective-review.js";
|
14
14
|
import ee from "./system-intros/advanced-practice-intro.js";
|
15
|
-
import
|
15
|
+
import ie from "./system-intros/basic-practice-intro.js";
|
16
16
|
import oe from "./system-intros/exit-ticket-intro.js";
|
17
|
-
import
|
17
|
+
import re from "./system-intros/regular-practice-intro.js";
|
18
18
|
import { QuestionContainerWrapper as ne, StimulusReview as ce, QuestionContainer as ae, QuestionWrapper as se, LessonOverviewBanner as le, CueCanvasWrapper as me, Hint as ue, Solution as fe } from "./worksheet-question-styled.js";
|
19
|
-
const
|
19
|
+
const Te = Dt(
|
20
20
|
({
|
21
21
|
userType: c,
|
22
|
-
signedRequest:
|
22
|
+
signedRequest: St,
|
23
23
|
worksheetCompleted: f,
|
24
24
|
question: n,
|
25
25
|
response: e,
|
26
26
|
nextQuestionId: v,
|
27
|
-
isActive:
|
28
|
-
isHidden:
|
29
|
-
canRender:
|
27
|
+
isActive: H,
|
28
|
+
isHidden: A,
|
29
|
+
canRender: z,
|
30
30
|
loggerRef: O,
|
31
31
|
appended: a,
|
32
|
-
maxQuestionWidth:
|
33
|
-
behavior:
|
34
|
-
layout:
|
35
|
-
actionbarHeight:
|
36
|
-
learnosity:
|
32
|
+
maxQuestionWidth: K,
|
33
|
+
behavior: P,
|
34
|
+
layout: X,
|
35
|
+
actionbarHeight: yt,
|
36
|
+
learnosity: b,
|
37
37
|
intersectionObserver: j,
|
38
38
|
background: G = "paper",
|
39
|
-
onMarkForReview:
|
40
|
-
userId:
|
39
|
+
onMarkForReview: Ct,
|
40
|
+
userId: Bt,
|
41
41
|
onPublishStrokes: Y,
|
42
42
|
onReceiveStrokes: Z,
|
43
43
|
isScribblingEnabled: J,
|
@@ -46,44 +46,44 @@ const Le = Dt(
|
|
46
46
|
onPublishMouseMove: k,
|
47
47
|
onSubscribeMouseMove: tt,
|
48
48
|
setActiveQuestionId: et,
|
49
|
-
canResolveDoubt:
|
50
|
-
onResolveDoubt:
|
51
|
-
studentId:
|
52
|
-
responses:
|
53
|
-
subjectiveProps:
|
49
|
+
canResolveDoubt: Wt,
|
50
|
+
onResolveDoubt: Lt,
|
51
|
+
studentId: Tt,
|
52
|
+
responses: xt,
|
53
|
+
subjectiveProps: it
|
54
54
|
}) => {
|
55
55
|
const C = R(
|
56
56
|
() => G === "paper" ? Yt(n) : void 0,
|
57
57
|
[G, n]
|
58
|
-
), [B, It] =
|
59
|
-
validation:
|
58
|
+
), [B, It] = M(), [ot, Mt] = M(), {
|
59
|
+
validation: rt,
|
60
60
|
review: Q,
|
61
61
|
maximumAttempts: nt,
|
62
62
|
canExceedAttempts: ct,
|
63
63
|
teacherValidationEnabled: S,
|
64
64
|
solutionHidden: at
|
65
|
-
} =
|
66
|
-
type:
|
65
|
+
} = P, { minQuestionHeight: At, topOffset: st, questionsScrollable: W } = X, {
|
66
|
+
type: _,
|
67
67
|
response_id: o,
|
68
|
-
stimulus_review:
|
68
|
+
stimulus_review: w,
|
69
69
|
item_type: h,
|
70
70
|
instructor_stimulus: lt,
|
71
|
-
metadata: { hints: d, solution:
|
71
|
+
metadata: { hints: d, solution: y, widget_reference: mt },
|
72
72
|
item_reference: ut,
|
73
73
|
question_number: ft
|
74
|
-
} = n, ht = !!
|
74
|
+
} = n, ht = !!w, L = h === "overview", m = Zt(lt), g = lt === "SystemIntro", dt = m || g, gt = e == null ? void 0 : e.responseEdited, Ot = R(() => {
|
75
75
|
const t = [];
|
76
|
-
return gt && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"),
|
76
|
+
return gt && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), _ === "hotspot" && t.push("correct-answers-hidden"), a && S && _ === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), L && t.push("lesson-overview"), m && t.push("concept-intro"), g && t.push("system-intro"), t.join(" ");
|
77
77
|
}, [
|
78
78
|
a,
|
79
79
|
m,
|
80
|
-
|
80
|
+
L,
|
81
81
|
g,
|
82
|
-
|
82
|
+
_,
|
83
83
|
gt,
|
84
84
|
S,
|
85
85
|
c
|
86
|
-
]), F = U({}),
|
86
|
+
]), F = U({}), T = (e == null ? void 0 : e.hintsUsed) ?? 0, [Et] = M((e == null ? void 0 : e.validatedByTeacher) ?? !1), x = U(null), V = U(null), D = R(() => d == null ? void 0 : d.slice(0, T), [d, T]), pt = R(() => c === "TEACHER" || f ? !0 : !e || !e.response || e.responseEdited ? !1 : rt, [e, c, rt, f]), $t = R(() => {
|
87
87
|
if (c === "TEACHER") return !0;
|
88
88
|
if (Q) {
|
89
89
|
const { attemptsHistory: t } = e ?? {};
|
@@ -91,51 +91,56 @@ const Le = Dt(
|
|
91
91
|
}
|
92
92
|
return !1;
|
93
93
|
}, [ct, nt, e, Q, c]), Nt = R(
|
94
|
-
() =>
|
95
|
-
[at,
|
96
|
-
), [_t, Qt] =
|
94
|
+
() => y && f && !at,
|
95
|
+
[at, y, f]
|
96
|
+
), [_t, Qt] = M({
|
97
97
|
width: 0,
|
98
98
|
height: 0
|
99
99
|
}), Ft = Ut((t) => {
|
100
|
-
|
100
|
+
Mt(t);
|
101
101
|
}, []);
|
102
|
-
return
|
103
|
-
|
104
|
-
}, [j]),
|
102
|
+
return $(() => {
|
103
|
+
x.current && j.observe(x.current);
|
104
|
+
}, [j]), $(() => {
|
105
105
|
if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
|
106
106
|
const t = document.querySelectorAll(
|
107
107
|
`.widget-${n.response_id} .lrn_draggable`
|
108
108
|
);
|
109
|
-
let s = 0,
|
109
|
+
let s = 0, r = 0;
|
110
110
|
t.forEach((l) => {
|
111
|
-
s = Math.max(s, l.clientWidth + 33),
|
111
|
+
s = Math.max(s, l.clientWidth + 33), r = Math.max(r, l.clientHeight + 1);
|
112
112
|
}), Qt({
|
113
113
|
width: n.type !== "association" ? s : 0,
|
114
|
-
height:
|
114
|
+
height: r
|
115
115
|
});
|
116
116
|
}
|
117
|
-
}, [a, n.response_id, n.type]),
|
118
|
-
if (a &&
|
119
|
-
const t =
|
117
|
+
}, [a, n.response_id, n.type]), $(() => {
|
118
|
+
if (a && pt) {
|
119
|
+
const t = b.question(o);
|
120
120
|
t && t.validate({
|
121
|
-
showCorrectAnswers:
|
121
|
+
showCorrectAnswers: $t
|
122
122
|
});
|
123
123
|
}
|
124
|
-
}, [a,
|
125
|
-
const t =
|
124
|
+
}, [a, b, o, Q, $t, c, pt]), $(() => {
|
125
|
+
const t = V.current;
|
126
126
|
if (a && t && O.current && F.current[o] === void 0 && !m && !g) {
|
127
|
-
const s = t.clientWidth,
|
128
|
-
for (let l = 0; l <
|
129
|
-
const u =
|
130
|
-
if (
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
127
|
+
const s = t.clientWidth, r = t.querySelectorAll("*");
|
128
|
+
for (let l = 0; l < r.length; l++) {
|
129
|
+
const u = r[l];
|
130
|
+
if (u) {
|
131
|
+
const E = window.getComputedStyle(u);
|
132
|
+
if (!(u instanceof HTMLElement && u.offsetParent !== null && E.visibility !== "hidden" && E.opacity !== "0"))
|
133
|
+
continue;
|
134
|
+
if (u.clientWidth > s) {
|
135
|
+
F.current[o] = !0, O.current(jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
|
136
|
+
item_reference: ut,
|
137
|
+
widget_reference: mt,
|
138
|
+
question_type: _,
|
139
|
+
question_number: ft,
|
140
|
+
responseId: o
|
141
|
+
});
|
142
|
+
break;
|
143
|
+
}
|
139
144
|
}
|
140
145
|
}
|
141
146
|
F.current[o] = !1;
|
@@ -146,40 +151,40 @@ const Le = Dt(
|
|
146
151
|
g,
|
147
152
|
ut,
|
148
153
|
O,
|
149
|
-
|
154
|
+
_,
|
150
155
|
ft,
|
151
156
|
o,
|
152
157
|
mt
|
153
|
-
]),
|
154
|
-
const t =
|
155
|
-
const l =
|
158
|
+
]), $(() => {
|
159
|
+
const t = x.current, s = (r) => {
|
160
|
+
const l = r.querySelector(".lrn_response_wrapper");
|
156
161
|
if (!l)
|
157
162
|
return 0;
|
158
|
-
const u =
|
159
|
-
return
|
163
|
+
const u = r.getBoundingClientRect().bottom, E = l.getBoundingClientRect().bottom, p = Math.abs(u - E);
|
164
|
+
return p < Ht ? Ht - p : 0;
|
160
165
|
};
|
161
|
-
a && t && It((
|
162
|
-
var
|
163
|
-
const
|
164
|
-
if (
|
165
|
-
return
|
166
|
-
if (!
|
166
|
+
a && t && It((r) => {
|
167
|
+
var Rt;
|
168
|
+
const E = ((Rt = n.ui_style) == null ? void 0 : Rt.type) === "floating-keyboard" && !(S && _ === "clozetext"), p = t.clientHeight;
|
169
|
+
if (p === 0)
|
170
|
+
return r;
|
171
|
+
if (!r)
|
167
172
|
return Math.ceil(
|
168
|
-
|
173
|
+
p + (E ? s(t) : 0)
|
169
174
|
);
|
170
|
-
const
|
171
|
-
|
175
|
+
const wt = Math.ceil(
|
176
|
+
p + (E ? s(t) : 0)
|
172
177
|
);
|
173
|
-
return Math.abs(
|
178
|
+
return Math.abs(wt - r) > 4 ? wt : r;
|
174
179
|
});
|
175
|
-
}),
|
176
|
-
!W && !
|
177
|
-
}, [
|
178
|
-
(
|
179
|
-
}, [ht,
|
180
|
+
}), zt(() => {
|
181
|
+
!W && !A && bt(o);
|
182
|
+
}, [A, W, o, st]), $(() => {
|
183
|
+
(T || ht || y && f) && b.renderMath("mathjax");
|
184
|
+
}, [ht, T, b, y, f]), $(() => {
|
180
185
|
if (S && v && !Et && (e != null && e.validatedByTeacher)) {
|
181
186
|
const t = setTimeout(() => {
|
182
|
-
W ?
|
187
|
+
W ? bt(v) : et(v);
|
183
188
|
}, 1e3);
|
184
189
|
return () => {
|
185
190
|
clearTimeout(t);
|
@@ -197,35 +202,35 @@ const Le = Dt(
|
|
197
202
|
{
|
198
203
|
"data-response-id": o,
|
199
204
|
className: `widget-${o}`,
|
200
|
-
ref:
|
205
|
+
ref: x,
|
201
206
|
$topOffset: st,
|
202
|
-
$flexDirection:
|
203
|
-
$alignItems:
|
204
|
-
$hidden:
|
207
|
+
$flexDirection: w ? "row" : "column",
|
208
|
+
$alignItems: w ? "flex-start" : "center",
|
209
|
+
$hidden: A,
|
205
210
|
$marginBottom: Gt,
|
206
211
|
children: [
|
207
|
-
|
212
|
+
w && /* @__PURE__ */ i(
|
208
213
|
ce,
|
209
214
|
{
|
210
215
|
dangerouslySetInnerHTML: {
|
211
|
-
__html:
|
216
|
+
__html: w
|
212
217
|
}
|
213
218
|
}
|
214
219
|
),
|
215
220
|
/* @__PURE__ */ I(
|
216
221
|
ae,
|
217
222
|
{
|
218
|
-
ref:
|
219
|
-
$width:
|
220
|
-
$minHeight: B ? Math.max(B - 72, ot ?? 0) :
|
221
|
-
$isActive:
|
223
|
+
ref: V,
|
224
|
+
$width: w ? "50%" : `${K}px`,
|
225
|
+
$minHeight: B ? Math.max(B - 72, ot ?? 0) : At,
|
226
|
+
$isActive: H,
|
222
227
|
$paperColor: C,
|
223
|
-
$opacity:
|
228
|
+
$opacity: H ? 1 : 0.2,
|
224
229
|
children: [
|
225
|
-
|
226
|
-
|
230
|
+
H && !!k && !!tt && q && /* @__PURE__ */ i(
|
231
|
+
Xt,
|
227
232
|
{
|
228
|
-
containerRef:
|
233
|
+
containerRef: V,
|
229
234
|
onPublish: k,
|
230
235
|
onSubscribe: tt,
|
231
236
|
responseId: o
|
@@ -238,69 +243,69 @@ const Le = Dt(
|
|
238
243
|
$dropzoneMinWidth: _t.width,
|
239
244
|
$dropzoneMinHeight: _t.height,
|
240
245
|
children: [
|
241
|
-
!(
|
246
|
+
!(L || m || g) && /* @__PURE__ */ i(
|
242
247
|
Jt,
|
243
248
|
{
|
244
249
|
userType: c,
|
245
250
|
question: n,
|
246
251
|
response: e,
|
247
|
-
behavior:
|
248
|
-
layout:
|
252
|
+
behavior: P,
|
253
|
+
layout: X,
|
249
254
|
paperColor: C,
|
250
|
-
onMarkForReview:
|
251
|
-
actionbarHeight:
|
252
|
-
canResolveDoubt:
|
253
|
-
onResolveDoubt:
|
255
|
+
onMarkForReview: Ct,
|
256
|
+
actionbarHeight: yt,
|
257
|
+
canResolveDoubt: Wt,
|
258
|
+
onResolveDoubt: Lt,
|
254
259
|
worksheetCompleted: f
|
255
260
|
}
|
256
261
|
),
|
257
|
-
|
258
|
-
m && C && /* @__PURE__ */
|
259
|
-
g ? /* @__PURE__ */ I(
|
260
|
-
h === "practice-basic" && /* @__PURE__ */
|
261
|
-
h === "practice-regular" && /* @__PURE__ */
|
262
|
-
h === "exit-ticket" && /* @__PURE__ */
|
263
|
-
(h == null ? void 0 : h.startsWith("advanced-")) && /* @__PURE__ */
|
262
|
+
L && /* @__PURE__ */ i(le, { src: Kt.LESSON_OVERVIEW_BANNER }),
|
263
|
+
m && C && /* @__PURE__ */ i(kt, { paperColor: C }),
|
264
|
+
g ? /* @__PURE__ */ I(Vt, { children: [
|
265
|
+
h === "practice-basic" && /* @__PURE__ */ i(ie, {}),
|
266
|
+
h === "practice-regular" && /* @__PURE__ */ i(re, {}),
|
267
|
+
h === "exit-ticket" && /* @__PURE__ */ i(oe, {}),
|
268
|
+
(h == null ? void 0 : h.startsWith("advanced-")) && /* @__PURE__ */ i(ee, {})
|
264
269
|
] }) : void 0,
|
265
|
-
/* @__PURE__ */
|
270
|
+
/* @__PURE__ */ i(
|
266
271
|
qt,
|
267
272
|
{
|
268
|
-
signedRequest:
|
273
|
+
signedRequest: St,
|
269
274
|
appended: a,
|
270
275
|
question: n,
|
271
276
|
response: e == null ? void 0 : e.response,
|
272
|
-
canRender:
|
273
|
-
learnosity:
|
277
|
+
canRender: z || H,
|
278
|
+
learnosity: b,
|
274
279
|
canForceAppend: c === "TEACHER",
|
275
280
|
isConceptIntro: m
|
276
281
|
}
|
277
282
|
),
|
278
|
-
!dt && q && Y && Z && B !== void 0 && /* @__PURE__ */
|
279
|
-
|
283
|
+
!dt && q && Y && Z && B !== void 0 && /* @__PURE__ */ i(me, { $canScribble: J, children: /* @__PURE__ */ i(
|
284
|
+
Pt,
|
280
285
|
{
|
281
|
-
canRender:
|
282
|
-
canScribble: J &&
|
286
|
+
canRender: z,
|
287
|
+
canScribble: J && H,
|
283
288
|
appended: a,
|
284
289
|
responseId: o,
|
285
|
-
width:
|
290
|
+
width: K,
|
286
291
|
height: Math.max(B, ot ?? 0),
|
287
292
|
onUpdateHeight: Ft,
|
288
293
|
onPublish: Y,
|
289
294
|
onSubscribe: Z,
|
290
|
-
userId:
|
295
|
+
userId: Bt,
|
291
296
|
initialData: N == null ? void 0 : N[o],
|
292
297
|
userType: c
|
293
298
|
}
|
294
299
|
) }),
|
295
|
-
!dt && D && D.length > 0 && /* @__PURE__ */
|
296
|
-
|
300
|
+
!dt && D && D.length > 0 && /* @__PURE__ */ i(
|
301
|
+
vt,
|
297
302
|
{
|
298
303
|
$background: "BLUE_1",
|
299
304
|
$gutterX: 1,
|
300
305
|
$gapX: 0.5,
|
301
306
|
$borderRadiusX: 0,
|
302
307
|
$borderColor: "BLUE_2",
|
303
|
-
children: D.map((t, s) => /* @__PURE__ */
|
308
|
+
children: D.map((t, s) => /* @__PURE__ */ i(
|
304
309
|
ue,
|
305
310
|
{
|
306
311
|
dangerouslySetInnerHTML: {
|
@@ -311,34 +316,34 @@ const Le = Dt(
|
|
311
316
|
))
|
312
317
|
}
|
313
318
|
),
|
314
|
-
Nt && /* @__PURE__ */
|
315
|
-
|
319
|
+
Nt && /* @__PURE__ */ i(
|
320
|
+
vt,
|
316
321
|
{
|
317
322
|
$background: "YELLOW_1",
|
318
323
|
$gutterX: 1,
|
319
324
|
$gapX: 0.875,
|
320
325
|
$borderRadiusX: 0,
|
321
326
|
$borderColor: "YELLOW_2",
|
322
|
-
children: /* @__PURE__ */
|
327
|
+
children: /* @__PURE__ */ i(
|
323
328
|
fe,
|
324
329
|
{
|
325
330
|
dangerouslySetInnerHTML: {
|
326
|
-
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${
|
331
|
+
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${y}`
|
327
332
|
}
|
328
333
|
}
|
329
334
|
)
|
330
335
|
}
|
331
336
|
),
|
332
|
-
!!
|
337
|
+
!!it && /* @__PURE__ */ i(
|
333
338
|
te,
|
334
339
|
{
|
335
|
-
responses:
|
340
|
+
responses: xt,
|
336
341
|
response: e,
|
337
342
|
nextQuestionId: v,
|
338
343
|
responseId: o,
|
339
|
-
studentId:
|
344
|
+
studentId: Tt,
|
340
345
|
userType: c,
|
341
|
-
...
|
346
|
+
...it
|
342
347
|
}
|
343
348
|
)
|
344
349
|
]
|
@@ -353,6 +358,6 @@ const Le = Dt(
|
|
353
358
|
}
|
354
359
|
);
|
355
360
|
export {
|
356
|
-
|
361
|
+
Te as default
|
357
362
|
};
|
358
363
|
//# sourceMappingURL=worksheet-question.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { LEARNOSITY_KEYBOARD_HEIGHT, QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n // drag drop questions\n if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n if (element && element.clientWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n\n const getExtraSpaceNeedForFloatingKeyboard = (questionEl: HTMLDivElement) => {\n const $responseWrapper = questionEl.querySelector('.lrn_response_wrapper');\n\n if (!$responseWrapper) {\n return 0;\n }\n\n const questionBottom = questionEl.getBoundingClientRect().bottom;\n const responseWrapperBottom = $responseWrapper.getBoundingClientRect().bottom;\n const spaceFromResponseToBottom = Math.abs(questionBottom - responseWrapperBottom);\n\n if (spaceFromResponseToBottom < LEARNOSITY_KEYBOARD_HEIGHT) {\n return LEARNOSITY_KEYBOARD_HEIGHT - spaceFromResponseToBottom;\n }\n\n return 0;\n };\n\n if (appended && $questionEl) {\n setQuestionHeight(qHeight => {\n const hasFloatingKeyboard = question.ui_style?.type === 'floating-keyboard';\n const v3CodeHidden = teacherValidationEnabled && questionType === 'clozetext';\n const hasKeyboard = hasFloatingKeyboard && !v3CodeHidden;\n const height = $questionEl.clientHeight;\n\n if (height === 0) {\n return qHeight;\n }\n\n // If the question has a floating keyboard, we need to add the height of the keyboard to the question height\n if (!qHeight) {\n return Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n }\n\n const newQuestionHeight = Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n }, [hasStimulusReview, hintsUsed, learnosity, solution, worksheetCompleted]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {!(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n responseId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span> ${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","EVENTS","getExtraSpaceNeedForFloatingKeyboard","questionEl","$responseWrapper","questionBottom","responseWrapperBottom","spaceFromResponseToBottom","LEARNOSITY_KEYBOARD_HEIGHT","qHeight","hasKeyboard","_a","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAiDC;AAAA,EACrD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,U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AAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
1
|
+
{"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { LEARNOSITY_KEYBOARD_HEIGHT, QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n if (element) {\n const style = window.getComputedStyle(element);\n const isVisible =\n element instanceof HTMLElement &&\n element.offsetParent !== null &&\n style.visibility !== 'hidden' &&\n style.opacity !== '0';\n\n if (!isVisible) {\n continue;\n }\n\n if (element.clientWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n });\n break;\n }\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n\n const getExtraSpaceNeedForFloatingKeyboard = (questionEl: HTMLDivElement) => {\n const $responseWrapper = questionEl.querySelector('.lrn_response_wrapper');\n\n if (!$responseWrapper) {\n return 0;\n }\n\n const questionBottom = questionEl.getBoundingClientRect().bottom;\n const responseWrapperBottom = $responseWrapper.getBoundingClientRect().bottom;\n const spaceFromResponseToBottom = Math.abs(questionBottom - responseWrapperBottom);\n\n if (spaceFromResponseToBottom < LEARNOSITY_KEYBOARD_HEIGHT) {\n return LEARNOSITY_KEYBOARD_HEIGHT - spaceFromResponseToBottom;\n }\n\n return 0;\n };\n\n if (appended && $questionEl) {\n setQuestionHeight(qHeight => {\n const hasFloatingKeyboard = question.ui_style?.type === 'floating-keyboard';\n const v3CodeHidden = teacherValidationEnabled && questionType === 'clozetext';\n const hasKeyboard = hasFloatingKeyboard && !v3CodeHidden;\n const height = $questionEl.clientHeight;\n\n if (height === 0) {\n return qHeight;\n }\n\n // If the question has a floating keyboard, we need to add the height of the keyboard to the question height\n if (!qHeight) {\n return Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n }\n\n const newQuestionHeight = Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n }, [hasStimulusReview, hintsUsed, learnosity, solution, worksheetCompleted]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {!(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n responseId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span> ${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","style","EVENTS","getExtraSpaceNeedForFloatingKeyboard","questionEl","$responseWrapper","questionBottom","responseWrapperBottom","spaceFromResponseToBottom","LEARNOSITY_KEYBOARD_HEIGHT","qHeight","hasKeyboard","_a","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAiDC;AAAA,EACrD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAA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