@cuemath/leap 2.8.37-rj-2 → 2.8.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/lottie/lottie.js +0 -4
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +11 -20
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +47 -53
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +212 -235
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +11 -12
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js +7 -8
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +71 -81
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js +7 -0
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js +213 -0
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/post-game-stats/enums/post-game-stats-enum.js +1 -1
- package/dist/features/post-game-stats/enums/post-game-stats-enum.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +10 -15
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats.js +61 -83
- package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +148 -142
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.js +67 -69
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/carat-left.js +0 -26
- package/dist/assets/line-icons/icons/carat-left.js.map +0 -1
- package/dist/assets/line-icons/icons/carat-right.js +0 -26
- package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -9
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -217
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -6
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -197
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js +0 -17
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js +0 -47
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js +0 -6
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/constants.js +0 -16
- package/dist/features/post-game-stats/digital-meter/constants.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +0 -87
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +0 -154
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/helper.js +0 -33
- package/dist/features/post-game-stats/digital-meter/helper.js.map +0 -1
- package/dist/features/post-game-stats/number-count-animation/number-count-animation-styled.js +0 -29
- package/dist/features/post-game-stats/number-count-animation/number-count-animation-styled.js.map +0 -1
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js +0 -20
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js.map +0 -1
- package/dist/static/point2.7cec6e24.json +0 -1
- package/dist/static/point3.f96fe7aa.json +0 -1
- package/dist/static/point4.fe04fb83.json +0 -1
- package/dist/static/target-achieved-text.053bd142.json +0 -2830
- package/dist/static/target-achieved-text.10db8475.json +0 -1
@@ -1,25 +1,25 @@
|
|
1
|
-
import { jsxs as I, jsx as r, Fragment as
|
2
|
-
import { memo as
|
3
|
-
import { IMAGES as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { QUESTIONS_GAP as
|
9
|
-
import { getPaperColorByQuestion as
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import { QuestionContainerWrapper as
|
19
|
-
const
|
1
|
+
import { jsxs as I, jsx as r, Fragment as Ut } from "react/jsx-runtime";
|
2
|
+
import { memo as Kt, useMemo as R, useState as A, useRef as U, useCallback as Vt, useEffect as E, useLayoutEffect as Xt } from "react";
|
3
|
+
import { IMAGES as Pt } from "../../../../assets/images/images.js";
|
4
|
+
import jt from "../../../cue-canvas/cue-canvas.js";
|
5
|
+
import Gt from "../../../pointer-sync/pointer.js";
|
6
|
+
import bt from "../../../ui/layout/flex-view.js";
|
7
|
+
import Yt from "../../constants/events.js";
|
8
|
+
import { QUESTIONS_GAP as Zt, LEARNOSITY_KEYBOARD_HEIGHT as St } from "../constants.js";
|
9
|
+
import { getPaperColorByQuestion as Jt, isConceptIntroWidget as qt, scrollToQuestion as Wt } from "../worksheet-helpers.js";
|
10
|
+
import kt from "./header/header.js";
|
11
|
+
import te from "./learnosity-question.js";
|
12
|
+
import ee from "./question-backdrop/question-backdrop.js";
|
13
|
+
import re from "./subjective-review.js";
|
14
|
+
import ie from "./system-intros/advanced-practice-intro.js";
|
15
|
+
import oe from "./system-intros/basic-practice-intro.js";
|
16
|
+
import ne from "./system-intros/exit-ticket-intro.js";
|
17
|
+
import ce from "./system-intros/regular-practice-intro.js";
|
18
|
+
import { QuestionContainerWrapper as ae, StimulusReview as se, QuestionContainer as le, QuestionWrapper as me, LessonOverviewBanner as ue, CueCanvasWrapper as fe, Hint as he, Solution as de } from "./worksheet-question-styled.js";
|
19
|
+
const Ie = Kt(
|
20
20
|
({
|
21
21
|
userType: c,
|
22
|
-
signedRequest:
|
22
|
+
signedRequest: Ct,
|
23
23
|
worksheetCompleted: f,
|
24
24
|
question: n,
|
25
25
|
response: e,
|
@@ -32,12 +32,12 @@ const Le = Dt(
|
|
32
32
|
maxQuestionWidth: V,
|
33
33
|
behavior: X,
|
34
34
|
layout: P,
|
35
|
-
actionbarHeight:
|
35
|
+
actionbarHeight: yt,
|
36
36
|
learnosity: H,
|
37
37
|
intersectionObserver: j,
|
38
38
|
background: G = "paper",
|
39
|
-
onMarkForReview:
|
40
|
-
userId:
|
39
|
+
onMarkForReview: Bt,
|
40
|
+
userId: xt,
|
41
41
|
onPublishStrokes: Y,
|
42
42
|
onReceiveStrokes: Z,
|
43
43
|
isScribblingEnabled: J,
|
@@ -46,58 +46,60 @@ const Le = Dt(
|
|
46
46
|
onPublishMouseMove: k,
|
47
47
|
onSubscribeMouseMove: tt,
|
48
48
|
setActiveQuestionId: et,
|
49
|
-
canResolveDoubt:
|
50
|
-
onResolveDoubt:
|
51
|
-
studentId:
|
52
|
-
responses:
|
49
|
+
canResolveDoubt: Lt,
|
50
|
+
onResolveDoubt: Tt,
|
51
|
+
studentId: It,
|
52
|
+
responses: At,
|
53
53
|
subjectiveProps: rt
|
54
54
|
}) => {
|
55
55
|
const C = R(
|
56
|
-
() => G === "paper" ?
|
56
|
+
() => G === "paper" ? Jt(n) : void 0,
|
57
57
|
[G, n]
|
58
|
-
), [
|
59
|
-
validation:
|
58
|
+
), [y, Mt] = A(), [it, Ot] = A(), {
|
59
|
+
validation: ot,
|
60
60
|
review: Q,
|
61
61
|
maximumAttempts: nt,
|
62
62
|
canExceedAttempts: ct,
|
63
|
-
teacherValidationEnabled:
|
63
|
+
teacherValidationEnabled: b,
|
64
64
|
solutionHidden: at
|
65
|
-
} = X, { minQuestionHeight:
|
66
|
-
type:
|
67
|
-
response_id:
|
68
|
-
stimulus_review:
|
65
|
+
} = X, { minQuestionHeight: Nt, topOffset: st, questionsScrollable: B } = P, {
|
66
|
+
type: _,
|
67
|
+
response_id: i,
|
68
|
+
stimulus_review: $,
|
69
69
|
item_type: h,
|
70
70
|
instructor_stimulus: lt,
|
71
|
-
metadata: { hints: d, solution:
|
71
|
+
metadata: { hints: d, solution: S, widget_reference: mt },
|
72
72
|
item_reference: ut,
|
73
|
-
question_number: ft
|
74
|
-
|
73
|
+
question_number: ft,
|
74
|
+
item_number: ht,
|
75
|
+
item_display_number: dt
|
76
|
+
} = n, gt = !!$, x = h === "overview", m = qt(lt), g = lt === "SystemIntro", Et = m || g, _t = e == null ? void 0 : e.responseEdited, Qt = R(() => {
|
75
77
|
const t = [];
|
76
|
-
return
|
78
|
+
return _t && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), _ === "hotspot" && t.push("correct-answers-hidden"), a && b && _ === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), m && t.push("concept-intro"), g && t.push("system-intro"), t.join(" ");
|
77
79
|
}, [
|
78
80
|
a,
|
79
81
|
m,
|
80
82
|
x,
|
81
83
|
g,
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
_,
|
85
|
+
_t,
|
86
|
+
b,
|
85
87
|
c
|
86
|
-
]), F = U({}), L = (e == null ? void 0 : e.hintsUsed) ?? 0, [
|
88
|
+
]), F = U({}), L = (e == null ? void 0 : e.hintsUsed) ?? 0, [$t] = A((e == null ? void 0 : e.validatedByTeacher) ?? !1), T = U(null), z = U(null), D = R(() => d == null ? void 0 : d.slice(0, L), [d, L]), pt = R(() => c === "TEACHER" || f ? !0 : !e || !e.response || e.responseEdited ? !1 : ot, [e, c, ot, f]), Rt = R(() => {
|
87
89
|
if (c === "TEACHER") return !0;
|
88
90
|
if (Q) {
|
89
91
|
const { attemptsHistory: t } = e ?? {};
|
90
92
|
return ((t == null ? void 0 : t.length) ?? 0) >= nt && !ct;
|
91
93
|
}
|
92
94
|
return !1;
|
93
|
-
}, [ct, nt, e, Q, c]),
|
94
|
-
() =>
|
95
|
-
[at,
|
96
|
-
), [
|
95
|
+
}, [ct, nt, e, Q, c]), Ft = R(
|
96
|
+
() => S && f && !at,
|
97
|
+
[at, S, f]
|
98
|
+
), [vt, zt] = A({
|
97
99
|
width: 0,
|
98
100
|
height: 0
|
99
|
-
}),
|
100
|
-
|
101
|
+
}), Dt = Vt((t) => {
|
102
|
+
Ot(t);
|
101
103
|
}, []);
|
102
104
|
return E(() => {
|
103
105
|
T.current && j.observe(T.current);
|
@@ -106,82 +108,86 @@ const Le = Dt(
|
|
106
108
|
const t = document.querySelectorAll(
|
107
109
|
`.widget-${n.response_id} .lrn_draggable`
|
108
110
|
);
|
109
|
-
let s = 0,
|
111
|
+
let s = 0, o = 0;
|
110
112
|
t.forEach((l) => {
|
111
|
-
s = Math.max(s, l.clientWidth + 33),
|
112
|
-
}),
|
113
|
+
s = Math.max(s, l.clientWidth + 33), o = Math.max(o, l.clientHeight + 1);
|
114
|
+
}), zt({
|
113
115
|
width: n.type !== "association" ? s : 0,
|
114
|
-
height:
|
116
|
+
height: o
|
115
117
|
});
|
116
118
|
}
|
117
119
|
}, [a, n.response_id, n.type]), E(() => {
|
118
|
-
if (a &&
|
119
|
-
const t = H.question(
|
120
|
+
if (a && pt) {
|
121
|
+
const t = H.question(i);
|
120
122
|
t && t.validate({
|
121
|
-
showCorrectAnswers:
|
123
|
+
showCorrectAnswers: Rt
|
122
124
|
});
|
123
125
|
}
|
124
|
-
}, [a, H,
|
126
|
+
}, [a, H, i, Q, Rt, c, pt]), E(() => {
|
125
127
|
const t = z.current;
|
126
|
-
if (a && t && O.current && F.current[
|
127
|
-
const s = t.clientWidth,
|
128
|
-
for (let l = 0; l <
|
129
|
-
const u =
|
128
|
+
if (a && t && O.current && F.current[i] === void 0 && !m && !g) {
|
129
|
+
const s = t.clientWidth, o = t.querySelectorAll("*");
|
130
|
+
for (let l = 0; l < o.length; l++) {
|
131
|
+
const u = o[l];
|
130
132
|
if (u != null && u.closest(".resize-sensor"))
|
131
133
|
continue;
|
132
134
|
if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
|
133
|
-
F.current[
|
135
|
+
F.current[i] = !0, O.current(Yt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
|
134
136
|
item_reference: ut,
|
135
137
|
widget_reference: mt,
|
136
|
-
question_type:
|
138
|
+
question_type: _,
|
137
139
|
question_number: ft,
|
138
|
-
responseId:
|
140
|
+
responseId: i,
|
141
|
+
item_number: ht,
|
142
|
+
item_display_number: dt
|
139
143
|
});
|
140
144
|
break;
|
141
145
|
}
|
142
146
|
}
|
143
|
-
F.current[
|
147
|
+
F.current[i] = !1;
|
144
148
|
}
|
145
149
|
}, [
|
146
150
|
a,
|
147
151
|
m,
|
148
152
|
g,
|
153
|
+
dt,
|
154
|
+
ht,
|
149
155
|
ut,
|
150
156
|
O,
|
151
|
-
|
157
|
+
_,
|
152
158
|
ft,
|
153
|
-
|
159
|
+
i,
|
154
160
|
mt
|
155
161
|
]), E(() => {
|
156
|
-
const t = T.current, s = (
|
157
|
-
const l =
|
162
|
+
const t = T.current, s = (o) => {
|
163
|
+
const l = o.querySelector(".lrn_response_wrapper");
|
158
164
|
if (!l)
|
159
165
|
return 0;
|
160
|
-
const u =
|
161
|
-
return
|
166
|
+
const u = o.getBoundingClientRect().bottom, W = l.getBoundingClientRect().bottom, p = Math.abs(u - W);
|
167
|
+
return p < St ? St - p : 0;
|
162
168
|
};
|
163
|
-
a && t &&
|
164
|
-
var
|
165
|
-
const W = ((
|
166
|
-
if (
|
167
|
-
return
|
168
|
-
if (!
|
169
|
+
a && t && Mt((o) => {
|
170
|
+
var Ht;
|
171
|
+
const W = ((Ht = n.ui_style) == null ? void 0 : Ht.type) === "floating-keyboard" && !(b && _ === "clozetext"), p = t.clientHeight;
|
172
|
+
if (p === 0)
|
173
|
+
return o;
|
174
|
+
if (!o)
|
169
175
|
return Math.ceil(
|
170
|
-
|
176
|
+
p + (W ? s(t) : 0)
|
171
177
|
);
|
172
|
-
const
|
173
|
-
|
178
|
+
const wt = Math.ceil(
|
179
|
+
p + (W ? s(t) : 0)
|
174
180
|
);
|
175
|
-
return Math.abs(
|
181
|
+
return Math.abs(wt - o) > 4 ? wt : o;
|
176
182
|
});
|
177
|
-
}),
|
178
|
-
!
|
179
|
-
}, [M,
|
180
|
-
(L ||
|
181
|
-
}, [
|
182
|
-
if (
|
183
|
+
}), Xt(() => {
|
184
|
+
!B && !M && Wt(i);
|
185
|
+
}, [M, B, i, st]), E(() => {
|
186
|
+
(L || gt || S && f) && H.renderMath("mathjax");
|
187
|
+
}, [gt, L, H, S, f]), E(() => {
|
188
|
+
if (b && v && !$t && (e != null && e.validatedByTeacher)) {
|
183
189
|
const t = setTimeout(() => {
|
184
|
-
|
190
|
+
B ? Wt(v) : et(v);
|
185
191
|
}, 1e3);
|
186
192
|
return () => {
|
187
193
|
clearTimeout(t);
|
@@ -189,59 +195,59 @@ const Le = Dt(
|
|
189
195
|
}
|
190
196
|
}, [
|
191
197
|
v,
|
192
|
-
|
193
|
-
|
194
|
-
|
198
|
+
b,
|
199
|
+
$t,
|
200
|
+
B,
|
195
201
|
et,
|
196
202
|
e == null ? void 0 : e.validatedByTeacher
|
197
203
|
]), /* @__PURE__ */ I(
|
198
|
-
|
204
|
+
ae,
|
199
205
|
{
|
200
|
-
"data-response-id":
|
201
|
-
className: `widget-${
|
206
|
+
"data-response-id": i,
|
207
|
+
className: `widget-${i}`,
|
202
208
|
ref: T,
|
203
209
|
$topOffset: st,
|
204
|
-
$flexDirection:
|
205
|
-
$alignItems:
|
210
|
+
$flexDirection: $ ? "row" : "column",
|
211
|
+
$alignItems: $ ? "flex-start" : "center",
|
206
212
|
$hidden: M,
|
207
|
-
$marginBottom:
|
213
|
+
$marginBottom: Zt,
|
208
214
|
children: [
|
209
|
-
|
210
|
-
|
215
|
+
$ && /* @__PURE__ */ r(
|
216
|
+
se,
|
211
217
|
{
|
212
218
|
dangerouslySetInnerHTML: {
|
213
|
-
__html:
|
219
|
+
__html: $
|
214
220
|
}
|
215
221
|
}
|
216
222
|
),
|
217
223
|
/* @__PURE__ */ I(
|
218
|
-
|
224
|
+
le,
|
219
225
|
{
|
220
226
|
ref: z,
|
221
|
-
$width:
|
222
|
-
$minHeight:
|
227
|
+
$width: $ ? "50%" : `${V}px`,
|
228
|
+
$minHeight: y ? Math.max(y - 72, it ?? 0) : Nt,
|
223
229
|
$isActive: w,
|
224
230
|
$paperColor: C,
|
225
231
|
$opacity: w ? 1 : 0.2,
|
226
232
|
children: [
|
227
233
|
w && !!k && !!tt && q && /* @__PURE__ */ r(
|
228
|
-
|
234
|
+
Gt,
|
229
235
|
{
|
230
236
|
containerRef: z,
|
231
237
|
onPublish: k,
|
232
238
|
onSubscribe: tt,
|
233
|
-
responseId:
|
239
|
+
responseId: i
|
234
240
|
}
|
235
241
|
),
|
236
242
|
/* @__PURE__ */ I(
|
237
|
-
|
243
|
+
me,
|
238
244
|
{
|
239
|
-
className:
|
240
|
-
$dropzoneMinWidth:
|
241
|
-
$dropzoneMinHeight:
|
245
|
+
className: Qt,
|
246
|
+
$dropzoneMinWidth: vt.width,
|
247
|
+
$dropzoneMinHeight: vt.height,
|
242
248
|
children: [
|
243
249
|
!(x || m || g) && /* @__PURE__ */ r(
|
244
|
-
|
250
|
+
kt,
|
245
251
|
{
|
246
252
|
userType: c,
|
247
253
|
question: n,
|
@@ -249,25 +255,25 @@ const Le = Dt(
|
|
249
255
|
behavior: X,
|
250
256
|
layout: P,
|
251
257
|
paperColor: C,
|
252
|
-
onMarkForReview:
|
253
|
-
actionbarHeight:
|
254
|
-
canResolveDoubt:
|
255
|
-
onResolveDoubt:
|
258
|
+
onMarkForReview: Bt,
|
259
|
+
actionbarHeight: yt,
|
260
|
+
canResolveDoubt: Lt,
|
261
|
+
onResolveDoubt: Tt,
|
256
262
|
worksheetCompleted: f
|
257
263
|
}
|
258
264
|
),
|
259
|
-
x && /* @__PURE__ */ r(
|
260
|
-
m && C && /* @__PURE__ */ r(
|
261
|
-
g ? /* @__PURE__ */ I(
|
262
|
-
h === "practice-basic" && /* @__PURE__ */ r(
|
263
|
-
h === "practice-regular" && /* @__PURE__ */ r(
|
264
|
-
h === "exit-ticket" && /* @__PURE__ */ r(
|
265
|
-
(h == null ? void 0 : h.startsWith("advanced-")) && /* @__PURE__ */ r(
|
265
|
+
x && /* @__PURE__ */ r(ue, { src: Pt.LESSON_OVERVIEW_BANNER }),
|
266
|
+
m && C && /* @__PURE__ */ r(ee, { paperColor: C }),
|
267
|
+
g ? /* @__PURE__ */ I(Ut, { children: [
|
268
|
+
h === "practice-basic" && /* @__PURE__ */ r(oe, {}),
|
269
|
+
h === "practice-regular" && /* @__PURE__ */ r(ce, {}),
|
270
|
+
h === "exit-ticket" && /* @__PURE__ */ r(ne, {}),
|
271
|
+
(h == null ? void 0 : h.startsWith("advanced-")) && /* @__PURE__ */ r(ie, {})
|
266
272
|
] }) : void 0,
|
267
273
|
/* @__PURE__ */ r(
|
268
|
-
|
274
|
+
te,
|
269
275
|
{
|
270
|
-
signedRequest:
|
276
|
+
signedRequest: Ct,
|
271
277
|
appended: a,
|
272
278
|
question: n,
|
273
279
|
response: e == null ? void 0 : e.response,
|
@@ -277,25 +283,25 @@ const Le = Dt(
|
|
277
283
|
isConceptIntro: m
|
278
284
|
}
|
279
285
|
),
|
280
|
-
!
|
281
|
-
|
286
|
+
!Et && q && Y && Z && y !== void 0 && /* @__PURE__ */ r(fe, { $canScribble: J, children: /* @__PURE__ */ r(
|
287
|
+
jt,
|
282
288
|
{
|
283
289
|
canRender: K,
|
284
290
|
canScribble: J && w,
|
285
291
|
appended: a,
|
286
|
-
responseId:
|
292
|
+
responseId: i,
|
287
293
|
width: V,
|
288
|
-
height: Math.max(
|
289
|
-
onUpdateHeight:
|
294
|
+
height: Math.max(y, it ?? 0),
|
295
|
+
onUpdateHeight: Dt,
|
290
296
|
onPublish: Y,
|
291
297
|
onSubscribe: Z,
|
292
|
-
userId:
|
293
|
-
initialData: N == null ? void 0 : N[
|
298
|
+
userId: xt,
|
299
|
+
initialData: N == null ? void 0 : N[i],
|
294
300
|
userType: c
|
295
301
|
}
|
296
302
|
) }),
|
297
|
-
!
|
298
|
-
|
303
|
+
!Et && D && D.length > 0 && /* @__PURE__ */ r(
|
304
|
+
bt,
|
299
305
|
{
|
300
306
|
$background: "BLUE_1",
|
301
307
|
$gutterX: 1,
|
@@ -303,7 +309,7 @@ const Le = Dt(
|
|
303
309
|
$borderRadiusX: 0,
|
304
310
|
$borderColor: "BLUE_2",
|
305
311
|
children: D.map((t, s) => /* @__PURE__ */ r(
|
306
|
-
|
312
|
+
he,
|
307
313
|
{
|
308
314
|
dangerouslySetInnerHTML: {
|
309
315
|
__html: `<span style="color: #DA5107; font-weight: 600;">Hint${((d == null ? void 0 : d.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span> ${t}`
|
@@ -313,8 +319,8 @@ const Le = Dt(
|
|
313
319
|
))
|
314
320
|
}
|
315
321
|
),
|
316
|
-
|
317
|
-
|
322
|
+
Ft && /* @__PURE__ */ r(
|
323
|
+
bt,
|
318
324
|
{
|
319
325
|
$background: "YELLOW_1",
|
320
326
|
$gutterX: 1,
|
@@ -322,23 +328,23 @@ const Le = Dt(
|
|
322
328
|
$borderRadiusX: 0,
|
323
329
|
$borderColor: "YELLOW_2",
|
324
330
|
children: /* @__PURE__ */ r(
|
325
|
-
|
331
|
+
de,
|
326
332
|
{
|
327
333
|
dangerouslySetInnerHTML: {
|
328
|
-
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${
|
334
|
+
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${S}`
|
329
335
|
}
|
330
336
|
}
|
331
337
|
)
|
332
338
|
}
|
333
339
|
),
|
334
340
|
!!rt && /* @__PURE__ */ r(
|
335
|
-
|
341
|
+
re,
|
336
342
|
{
|
337
|
-
responses:
|
343
|
+
responses: At,
|
338
344
|
response: e,
|
339
345
|
nextQuestionId: v,
|
340
|
-
responseId:
|
341
|
-
studentId:
|
346
|
+
responseId: i,
|
347
|
+
studentId: It,
|
342
348
|
userType: c,
|
343
349
|
...rt
|
344
350
|
}
|
@@ -355,6 +361,6 @@ const Le = Dt(
|
|
355
361
|
}
|
356
362
|
);
|
357
363
|
export {
|
358
|
-
|
364
|
+
Ie as default
|
359
365
|
};
|
360
366
|
//# 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 if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > 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,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,iBAAAC;AAAA,I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gBAAgB;AAAA,0BAChB,cAAa;AAAA,0BAEZ,UAAMxD,EAAA,IAAI,CAACyD,GAAMC,MAChB,gBAAAnB;AAAA,4BAACoB;AAAAA,4BAAA;AAAA,8BAEC,yBAAyB;AAAA,gCACvB,QAAQ,yDACL/E,KAAA,gBAAAA,EAAgB,WAAU,KAAK,IAAI,IAAI8E,IAAQ,CAAC,KAAK,EACxD,iBAAiBD,CAAI;AAAA,8BACvB;AAAA,4BAAA;AAAA,4BALKA;AAAA,0BAAA,CAOR;AAAA,wBAAA;AAAA,sBACH;AAAA,sBAEDrD,MACC,gBAAAmC;AAAA,wBAACiB;AAAA,wBAAA;AAAA,0BACC,aAAY;AAAA,0BACZ,UAAU;AAAA,0BACV,OAAO;AAAA,0BACP,gBAAgB;AAAA,0BAChB,cAAa;AAAA,0BAEb,UAAA,gBAAAjB;AAAA,4BAACqB;AAAAA,4BAAA;AAAA,8BACC,yBAAyB;AAAA,gCACvB,QAAQ,iEAAiE/E,CAAQ;AAAA,8BACnF;AAAA,4BAAA;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,sBAED,CAAC,CAACxB,MACD,gBAAAkF;AAAA,wBAACsB;AAAA,wBAAA;AAAA,0BACC,WAAAzG;AAAA,0BACA,UAAA3B;AAAA,0BACA,gBAAAC;AAAA,0BACA,YAAA8C;AAAA,0BACA,WAAArB;AAAA,0BACA,UAAA9B;AAAA,0BACC,GAAGgC;AAAA,wBAAA;AAAA,sBACN;AAAA,oBAAA;AAAA,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 item_number,\n item_display_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?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > 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 item_number,\n item_display_number,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_display_number,\n item_number,\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","item_number","item_display_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,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA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