@cuemath/leap 3.2.9-pzd-0.1 → 3.2.9-pzd-0.2
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/features/worksheet/worksheet/hooks/use-worksheet-journey.js +17 -15
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +66 -65
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/package.json +1 -1
@@ -1,26 +1,28 @@
|
|
1
|
-
import { useMemo as p, useEffect as
|
2
|
-
import { usePuzzleAttemptJourney as
|
1
|
+
import { useMemo as p, useEffect as m } from "react";
|
2
|
+
import { usePuzzleAttemptJourney as c } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js";
|
3
3
|
import { usePuzzleReviewJourney as f } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js";
|
4
|
-
import { usePuzzleUnassignJourney as
|
5
|
-
import { useJourney as
|
6
|
-
const
|
7
|
-
const { maximumAttempts: e, canStartJourney: t } =
|
8
|
-
return
|
9
|
-
|
4
|
+
import { usePuzzleUnassignJourney as l } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js";
|
5
|
+
import { useJourney as P } from "../../../journey/use-journey/use-journey.js";
|
6
|
+
const C = ({ behavior: a }) => {
|
7
|
+
const { maximumAttempts: e, canStartJourney: t } = a, { isJourneyActive: r, clearJourney: o } = P(), { puzzleAttemptCtaRef: i, startJourney: u } = c(), { puzzleReviewCtaRef: y, startJourney: n } = f(), { puzzleUnassignRef: J, startJourney: s } = l(), z = p(() => e === -2, [e]);
|
8
|
+
return m(() => {
|
9
|
+
z && t && !r && (u(), n(), s());
|
10
10
|
}, [
|
11
11
|
t,
|
12
12
|
r,
|
13
|
-
|
14
|
-
o,
|
13
|
+
z,
|
15
14
|
u,
|
15
|
+
n,
|
16
16
|
s
|
17
|
-
]), {
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
]), m(() => () => {
|
18
|
+
o();
|
19
|
+
}, [o]), {
|
20
|
+
puzzleAttemptCtaRef: i,
|
21
|
+
puzzleReviewCtaRef: y,
|
22
|
+
puzzleUnassignRef: J
|
21
23
|
};
|
22
24
|
};
|
23
25
|
export {
|
24
|
-
|
26
|
+
C as useWorksheetJourney
|
25
27
|
};
|
26
28
|
//# sourceMappingURL=use-worksheet-journey.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-worksheet-journey.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-worksheet-journey.ts"],"sourcesContent":["import type { IWorksheetBehavior } from '../worksheet-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { usePuzzleAttemptJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey';\nimport { usePuzzleReviewJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey';\nimport { usePuzzleUnassignJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey';\nimport { useJourney } from '../../../journey/use-journey/use-journey';\n\ninterface IUseWorksheetJourney {\n behavior: IWorksheetBehavior;\n}\n\nconst useWorksheetJourney = ({ behavior }: IUseWorksheetJourney) => {\n const { maximumAttempts, canStartJourney } = behavior;\n\n const { isJourneyActive } = useJourney();\n\n const { puzzleAttemptCtaRef, startJourney: startPuzzleAttemptJourney } =\n usePuzzleAttemptJourney();\n\n const { puzzleReviewCtaRef, startJourney: startPuzzleReviewJourney } = usePuzzleReviewJourney();\n const { puzzleUnassignRef, startJourney: startPuzzleUnassignJourney } =\n usePuzzleUnassignJourney();\n\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n useEffect(() => {\n if (isPuzzleCard && canStartJourney && !isJourneyActive) {\n //* This will be triggered by STUDENT during resume sheet.\n startPuzzleAttemptJourney();\n //* This will be triggered by TEACHER during review sheet\n startPuzzleReviewJourney();\n //* This will be trigger by TEACHER during preview sheet.\n startPuzzleUnassignJourney();\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isPuzzleCard,\n startPuzzleAttemptJourney,\n startPuzzleReviewJourney,\n startPuzzleUnassignJourney,\n ]);\n\n return {\n puzzleAttemptCtaRef,\n puzzleReviewCtaRef,\n puzzleUnassignRef,\n };\n};\n\nexport { useWorksheetJourney };\n"],"names":["useWorksheetJourney","behavior","maximumAttempts","canStartJourney","isJourneyActive","useJourney","puzzleAttemptCtaRef","startPuzzleAttemptJourney","usePuzzleAttemptJourney","puzzleReviewCtaRef","startPuzzleReviewJourney","usePuzzleReviewJourney","puzzleUnassignRef","startPuzzleUnassignJourney","usePuzzleUnassignJourney","isPuzzleCard","useMemo","useEffect"],"mappings":";;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,UAAAC,QAAqC;AAC5D,QAAA,EAAE,iBAAAC,GAAiB,iBAAAC,EAAoB,IAAAF,GAEvC,EAAE,iBAAAG,
|
1
|
+
{"version":3,"file":"use-worksheet-journey.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-worksheet-journey.ts"],"sourcesContent":["import type { IWorksheetBehavior } from '../worksheet-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { usePuzzleAttemptJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey';\nimport { usePuzzleReviewJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey';\nimport { usePuzzleUnassignJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey';\nimport { useJourney } from '../../../journey/use-journey/use-journey';\n\ninterface IUseWorksheetJourney {\n behavior: IWorksheetBehavior;\n}\n\nconst useWorksheetJourney = ({ behavior }: IUseWorksheetJourney) => {\n const { maximumAttempts, canStartJourney } = behavior;\n\n const { isJourneyActive, clearJourney } = useJourney();\n\n const { puzzleAttemptCtaRef, startJourney: startPuzzleAttemptJourney } =\n usePuzzleAttemptJourney();\n\n const { puzzleReviewCtaRef, startJourney: startPuzzleReviewJourney } = usePuzzleReviewJourney();\n const { puzzleUnassignRef, startJourney: startPuzzleUnassignJourney } =\n usePuzzleUnassignJourney();\n\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n useEffect(() => {\n if (isPuzzleCard && canStartJourney && !isJourneyActive) {\n //* This will be triggered by STUDENT during resume sheet.\n startPuzzleAttemptJourney();\n //* This will be triggered by TEACHER during review sheet\n startPuzzleReviewJourney();\n //* This will be trigger by TEACHER during preview sheet.\n startPuzzleUnassignJourney();\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isPuzzleCard,\n startPuzzleAttemptJourney,\n startPuzzleReviewJourney,\n startPuzzleUnassignJourney,\n ]);\n\n useEffect(() => {\n return () => {\n clearJourney();\n };\n }, [clearJourney]);\n\n return {\n puzzleAttemptCtaRef,\n puzzleReviewCtaRef,\n puzzleUnassignRef,\n };\n};\n\nexport { useWorksheetJourney };\n"],"names":["useWorksheetJourney","behavior","maximumAttempts","canStartJourney","isJourneyActive","clearJourney","useJourney","puzzleAttemptCtaRef","startPuzzleAttemptJourney","usePuzzleAttemptJourney","puzzleReviewCtaRef","startPuzzleReviewJourney","usePuzzleReviewJourney","puzzleUnassignRef","startPuzzleUnassignJourney","usePuzzleUnassignJourney","isPuzzleCard","useMemo","useEffect"],"mappings":";;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,UAAAC,QAAqC;AAC5D,QAAA,EAAE,iBAAAC,GAAiB,iBAAAC,EAAoB,IAAAF,GAEvC,EAAE,iBAAAG,GAAiB,cAAAC,EAAa,IAAIC,EAAW,GAE/C,EAAE,qBAAAC,GAAqB,cAAcC,MACzCC,EAAwB,GAEpB,EAAE,oBAAAC,GAAoB,cAAcC,MAA6BC,EAAuB,GACxF,EAAE,mBAAAC,GAAmB,cAAcC,MACvCC,EAAyB,GAErBC,IAAeC,EAAQ,MAAMf,MAAoB,IAAI,CAACA,CAAe,CAAC;AAE5E,SAAAgB,EAAU,MAAM;AACV,IAAAF,KAAgBb,KAAmB,CAACC,MAEZI,KAEDG,KAEEG;EAC7B,GACC;AAAA,IACDX;AAAA,IACAC;AAAA,IACAY;AAAA,IACAR;AAAA,IACAG;AAAA,IACAG;AAAA,EAAA,CACD,GAEDI,EAAU,MACD,MAAM;AACE,IAAAb;EAAA,GAEd,CAACA,CAAY,CAAC,GAEV;AAAA,IACL,qBAAAE;AAAA,IACA,oBAAAG;AAAA,IACA,mBAAAG;AAAA,EAAA;AAEJ;"}
|
@@ -1,20 +1,20 @@
|
|
1
1
|
import { jsxs as ee, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { deepEqual as ne } from "../../../../node_modules/fast-equals/dist/esm/index.js";
|
3
|
-
import { memo as ie, useMemo as
|
3
|
+
import { memo as ie, useMemo as lt, useState as q, useEffect as T } from "react";
|
4
4
|
import oe from "../../../../assets/line-icons/icons/check2.js";
|
5
5
|
import se from "../../../../assets/line-icons/icons/hand.js";
|
6
6
|
import re from "../../../../assets/line-icons/icons/question.js";
|
7
7
|
import ae from "../../../../assets/line-icons/icons/skip.js";
|
8
|
-
import
|
8
|
+
import dt from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
9
9
|
import o from "../../../ui/buttons/button/button.js";
|
10
10
|
import x from "../../../ui/buttons/icon-button/icon-button.js";
|
11
11
|
import ue from "../../../ui/layout/flex-view.js";
|
12
12
|
import { useWorksheetJourney as le } from "../hooks/use-worksheet-journey.js";
|
13
13
|
import de from "./use-handler-callbacks.js";
|
14
14
|
const xe = ie((N) => {
|
15
|
-
var
|
15
|
+
var st, rt, at;
|
16
16
|
const {
|
17
|
-
layout:
|
17
|
+
layout: ct,
|
18
18
|
learnosity: b,
|
19
19
|
question: l,
|
20
20
|
questions: v,
|
@@ -26,21 +26,21 @@ const xe = ie((N) => {
|
|
26
26
|
response: t,
|
27
27
|
behavior: m,
|
28
28
|
userType: p,
|
29
|
-
setActiveQuestionId:
|
30
|
-
setSummaryVisible:
|
31
|
-
setBlocker:
|
32
|
-
setResponses:
|
33
|
-
getTimeSpentOnQuestion:
|
34
|
-
onSubmit:
|
29
|
+
setActiveQuestionId: mt,
|
30
|
+
setSummaryVisible: pt,
|
31
|
+
setBlocker: Bt,
|
32
|
+
setResponses: ht,
|
33
|
+
getTimeSpentOnQuestion: ft,
|
34
|
+
onSubmit: kt,
|
35
35
|
onSkip: g,
|
36
|
-
onUnassign:
|
37
|
-
onReview:
|
38
|
-
} = N, { onHelp:
|
36
|
+
onUnassign: bt,
|
37
|
+
onReview: yt
|
38
|
+
} = N, { onHelp: At, onResponseChange: St, onTeacherValidation: Ct, loggerRef: Tt } = N, {
|
39
39
|
navigationMode: w,
|
40
40
|
canAttempt: s,
|
41
|
-
hints:
|
42
|
-
checkButtonLabel:
|
43
|
-
retryButtonLabel:
|
41
|
+
hints: xt,
|
42
|
+
checkButtonLabel: vt,
|
43
|
+
retryButtonLabel: gt,
|
44
44
|
validation: d,
|
45
45
|
maximumAttempts: B,
|
46
46
|
canExceedAttempts: M,
|
@@ -50,18 +50,18 @@ const xe = ie((N) => {
|
|
50
50
|
skippableTime: W,
|
51
51
|
skippable: j,
|
52
52
|
canUnAssign: P,
|
53
|
-
canTeacherValidateDisabled:
|
54
|
-
} = m, { response_id: z, item_type: wt, type: R, instructor_stimulus: It, is_optional:
|
53
|
+
canTeacherValidateDisabled: F
|
54
|
+
} = m, { response_id: z, item_type: wt, type: R, instructor_stimulus: It, is_optional: G } = l, y = xt ? ((at = (rt = (st = b.question(z)) == null ? void 0 : st.getMetadata()) == null ? void 0 : rt.hints) == null ? void 0 : at.length) ?? 0 : 0, D = It === "SystemIntro", E = wt === "exit-ticket", h = s && y - ((t == null ? void 0 : t.hintsUsed) ?? 0) > 0, J = lt(() => B === -2, [B]), [a, O] = q(!1), [K, Y] = q(!1), [Z, A] = q(!1), { puzzleAttemptCtaRef: zt, puzzleReviewCtaRef: Rt, puzzleUnassignRef: Dt } = le({
|
55
55
|
behavior: m
|
56
56
|
});
|
57
57
|
T(() => {
|
58
58
|
if (I && h) {
|
59
59
|
const i = setTimeout(() => {
|
60
|
-
|
60
|
+
O(!0);
|
61
61
|
}, I * 1e3);
|
62
62
|
return () => clearTimeout(i);
|
63
63
|
}
|
64
|
-
|
64
|
+
O(h);
|
65
65
|
}, [I, h]), T(() => {
|
66
66
|
const i = !(t != null && t.response) && !(t != null && t.skipped);
|
67
67
|
if (j)
|
@@ -81,7 +81,7 @@ const xe = ie((N) => {
|
|
81
81
|
const {
|
82
82
|
checkButton: f,
|
83
83
|
checkButtonDisabled: Et,
|
84
|
-
hintsButton:
|
84
|
+
hintsButton: tt,
|
85
85
|
retryButton: S,
|
86
86
|
nextButton: _t,
|
87
87
|
nextButtonDisabled: Ut,
|
@@ -89,17 +89,17 @@ const xe = ie((N) => {
|
|
89
89
|
readyButton: qt,
|
90
90
|
validateButton: Nt,
|
91
91
|
skipSectionButton: Lt,
|
92
|
-
submitAttemptButton:
|
92
|
+
submitAttemptButton: et,
|
93
93
|
skipButton: Xt,
|
94
94
|
unassignButton: Ht,
|
95
95
|
reviewButton: Qt,
|
96
96
|
submitAttemptButtonDisabled: Mt,
|
97
97
|
submitAttemptButtonTooltip: $t,
|
98
98
|
submitAttemptButtonTooltipText: Wt,
|
99
|
-
reviewButtonDisabled:
|
100
|
-
} =
|
101
|
-
const i = r &&
|
102
|
-
var
|
99
|
+
reviewButtonDisabled: nt
|
100
|
+
} = lt(() => {
|
101
|
+
const i = r && G && (t == null ? void 0 : t.assignStatus) === "assigned", C = () => {
|
102
|
+
var ut;
|
103
103
|
if (B === -2)
|
104
104
|
return p === "STUDENT" ? s ? {
|
105
105
|
submitAttemptButton: !0
|
@@ -112,7 +112,7 @@ const xe = ie((N) => {
|
|
112
112
|
unassignButton: !0
|
113
113
|
} : {
|
114
114
|
reviewButton: r,
|
115
|
-
reviewButtonDisabled:
|
115
|
+
reviewButtonDisabled: F
|
116
116
|
};
|
117
117
|
if (!s)
|
118
118
|
return {
|
@@ -123,7 +123,7 @@ const xe = ie((N) => {
|
|
123
123
|
nextButton: !0,
|
124
124
|
nextButtonDisabled: !(t != null && t.response),
|
125
125
|
hintsButton: a,
|
126
|
-
skipButton:
|
126
|
+
skipButton: Z
|
127
127
|
};
|
128
128
|
if (!d)
|
129
129
|
return {
|
@@ -142,7 +142,7 @@ const xe = ie((N) => {
|
|
142
142
|
nextButton: !0
|
143
143
|
};
|
144
144
|
if (k) {
|
145
|
-
const te = (
|
145
|
+
const te = (ut = n == null ? void 0 : n.slice(-1)[0]) == null ? void 0 : ut.response;
|
146
146
|
return {
|
147
147
|
nextButton: V,
|
148
148
|
checkButton: !0,
|
@@ -206,7 +206,7 @@ const xe = ie((N) => {
|
|
206
206
|
return C();
|
207
207
|
}, [
|
208
208
|
r,
|
209
|
-
|
209
|
+
G,
|
210
210
|
t,
|
211
211
|
$,
|
212
212
|
s,
|
@@ -215,7 +215,7 @@ const xe = ie((N) => {
|
|
215
215
|
B,
|
216
216
|
M,
|
217
217
|
a,
|
218
|
-
|
218
|
+
Z,
|
219
219
|
v,
|
220
220
|
L,
|
221
221
|
P,
|
@@ -225,11 +225,12 @@ const xe = ie((N) => {
|
|
225
225
|
D,
|
226
226
|
R,
|
227
227
|
E,
|
228
|
-
H
|
228
|
+
H,
|
229
|
+
F
|
229
230
|
]), {
|
230
231
|
handleResponseChange: _,
|
231
|
-
handleHelpButtonClick:
|
232
|
-
handleBackButtonClick:
|
232
|
+
handleHelpButtonClick: it,
|
233
|
+
handleBackButtonClick: ot,
|
233
234
|
handleNextButtonClick: U,
|
234
235
|
handleCheckButtonClick: jt,
|
235
236
|
handleRetryButtonClick: Pt,
|
@@ -240,31 +241,31 @@ const xe = ie((N) => {
|
|
240
241
|
handleReadyButtonClick: Kt,
|
241
242
|
handleSkipButtonClick: Yt
|
242
243
|
} = de({
|
243
|
-
layout:
|
244
|
+
layout: ct,
|
244
245
|
question: l,
|
245
246
|
questions: v,
|
246
247
|
learnosity: b,
|
247
248
|
questionIndex: X,
|
248
|
-
setActiveQuestionId:
|
249
|
-
setSummaryVisible:
|
250
|
-
setBlocker:
|
251
|
-
setResponses:
|
252
|
-
onResponseChange:
|
253
|
-
onTeacherValidation:
|
254
|
-
onHelp:
|
249
|
+
setActiveQuestionId: mt,
|
250
|
+
setSummaryVisible: pt,
|
251
|
+
setBlocker: Bt,
|
252
|
+
setResponses: ht,
|
253
|
+
onResponseChange: St,
|
254
|
+
onTeacherValidation: Ct,
|
255
|
+
onHelp: At,
|
255
256
|
behavior: m,
|
256
|
-
loggerRef:
|
257
|
-
setSkipped:
|
258
|
-
getTimeSpentOnQuestion:
|
257
|
+
loggerRef: Tt,
|
258
|
+
setSkipped: Y,
|
259
|
+
getTimeSpentOnQuestion: ft
|
259
260
|
});
|
260
261
|
return T(() => {
|
261
|
-
|
262
|
+
K && (Y(!1), A(!1), U(), g && g(l.item_display_number, l.question_number));
|
262
263
|
}, [
|
263
264
|
U,
|
264
265
|
g,
|
265
266
|
l.item_display_number,
|
266
267
|
l.question_number,
|
267
|
-
|
268
|
+
K
|
268
269
|
]), T(() => {
|
269
270
|
const i = c ? b.question(z) : void 0;
|
270
271
|
return i && s && (!d || f) && (i.on("changed", _), i.enable()), () => {
|
@@ -287,7 +288,7 @@ const xe = ie((N) => {
|
|
287
288
|
$alignItems: "center",
|
288
289
|
$justifyContent: "flex-end",
|
289
290
|
children: [
|
290
|
-
|
291
|
+
tt && /* @__PURE__ */ e(
|
291
292
|
x,
|
292
293
|
{
|
293
294
|
Icon: re,
|
@@ -297,16 +298,16 @@ const xe = ie((N) => {
|
|
297
298
|
onClick: Ft
|
298
299
|
}
|
299
300
|
),
|
300
|
-
!
|
301
|
+
!tt && it && (f || S) && /* @__PURE__ */ e(
|
301
302
|
x,
|
302
303
|
{
|
303
304
|
Icon: se,
|
304
305
|
analyticsLabel: "Ask for help",
|
305
306
|
renderAs: "secondary",
|
306
|
-
onClick:
|
307
|
+
onClick: it
|
307
308
|
}
|
308
309
|
),
|
309
|
-
|
310
|
+
ot && /* @__PURE__ */ e(
|
310
311
|
o,
|
311
312
|
{
|
312
313
|
widthX: 6,
|
@@ -314,7 +315,7 @@ const xe = ie((N) => {
|
|
314
315
|
size: "small",
|
315
316
|
label: "Back",
|
316
317
|
disabled: X === 0,
|
317
|
-
onClick:
|
318
|
+
onClick: ot
|
318
319
|
}
|
319
320
|
),
|
320
321
|
Xt && /* @__PURE__ */ e(
|
@@ -344,7 +345,7 @@ const xe = ie((N) => {
|
|
344
345
|
widthX: 6,
|
345
346
|
renderAs: "primary",
|
346
347
|
size: "small",
|
347
|
-
label:
|
348
|
+
label: gt,
|
348
349
|
disabled: !c,
|
349
350
|
onClick: Pt
|
350
351
|
}
|
@@ -354,7 +355,7 @@ const xe = ie((N) => {
|
|
354
355
|
{
|
355
356
|
renderAs: "primary",
|
356
357
|
size: "small",
|
357
|
-
label:
|
358
|
+
label: vt,
|
358
359
|
disabled: Et === !0 || !c,
|
359
360
|
onClick: jt
|
360
361
|
}
|
@@ -370,7 +371,7 @@ const xe = ie((N) => {
|
|
370
371
|
onClick: Ot
|
371
372
|
}
|
372
373
|
),
|
373
|
-
!
|
374
|
+
!et && Nt && /* @__PURE__ */ e(
|
374
375
|
x,
|
375
376
|
{
|
376
377
|
renderAs: "primary",
|
@@ -380,20 +381,20 @@ const xe = ie((N) => {
|
|
380
381
|
onClick: Gt
|
381
382
|
}
|
382
383
|
),
|
383
|
-
|
384
|
-
|
384
|
+
et && /* @__PURE__ */ e(
|
385
|
+
dt,
|
385
386
|
{
|
386
387
|
position: "top",
|
387
388
|
renderAs: "primary",
|
388
389
|
tooltipItem: Wt ?? "",
|
389
390
|
hidden: !$t,
|
390
|
-
children: /* @__PURE__ */ e("div", { ref:
|
391
|
+
children: /* @__PURE__ */ e("div", { ref: J ? zt : void 0, children: /* @__PURE__ */ e(
|
391
392
|
o,
|
392
393
|
{
|
393
394
|
renderAs: "primary",
|
394
395
|
size: "small",
|
395
|
-
label:
|
396
|
-
onClick:
|
396
|
+
label: J ? "I have solved" : "Submit",
|
397
|
+
onClick: kt,
|
397
398
|
disabled: Mt
|
398
399
|
}
|
399
400
|
) })
|
@@ -406,16 +407,16 @@ const xe = ie((N) => {
|
|
406
407
|
renderAs: "primary",
|
407
408
|
size: "small",
|
408
409
|
label: "Unassign",
|
409
|
-
onClick:
|
410
|
+
onClick: bt
|
410
411
|
}
|
411
412
|
) }),
|
412
413
|
Qt && /* @__PURE__ */ e(
|
413
|
-
|
414
|
+
dt,
|
414
415
|
{
|
415
416
|
tooltipItem: "Review this in class with student.",
|
416
417
|
position: "top",
|
417
418
|
renderAs: "primary",
|
418
|
-
hidden: !
|
419
|
+
hidden: !nt,
|
419
420
|
children: /* @__PURE__ */ e("div", { ref: Rt, children: /* @__PURE__ */ e(
|
420
421
|
o,
|
421
422
|
{
|
@@ -423,8 +424,8 @@ const xe = ie((N) => {
|
|
423
424
|
renderAs: "primary",
|
424
425
|
size: "small",
|
425
426
|
label: "Review",
|
426
|
-
onClick:
|
427
|
-
disabled:
|
427
|
+
onClick: yt,
|
428
|
+
disabled: nt
|
428
429
|
}
|
429
430
|
) })
|
430
431
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"worksheet-questions-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.tsx"],"sourcesContent":["import type {\n IButtonTypes,\n IWorksheetQuestionsControllerProps,\n} from './worksheet-questions-controller-types';\nimport type { FC } from 'react';\n\nimport { deepEqual } from 'fast-equals';\nimport { memo, useEffect, useMemo, useState } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport HandIcon from '../../../../assets/line-icons/icons/hand';\nimport QuestionIcon from '../../../../assets/line-icons/icons/question';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { useWorksheetJourney } from '../hooks/use-worksheet-journey';\nimport useHandlerCallbacks from './use-handler-callbacks';\n\nconst WorksheetQuestionsController: FC<IWorksheetQuestionsControllerProps> = memo(props => {\n const {\n layout,\n learnosity,\n question,\n questions,\n responses,\n questionIndex,\n canSubmitWorksheet,\n isQuestionUnlocked,\n isQuestionAppended,\n response,\n behavior,\n userType,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n getTimeSpentOnQuestion,\n onSubmit,\n onSkip,\n onUnassign,\n onReview,\n } = props;\n\n const { onHelp, onResponseChange, onTeacherValidation, loggerRef } = props;\n const {\n navigationMode,\n canAttempt,\n hints,\n checkButtonLabel,\n retryButtonLabel,\n validation,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n canTeacherValidate,\n hintsTimer,\n skippableTime,\n skippable,\n canUnAssign,\n canTeacherValidateDisabled,\n } = behavior;\n\n const { response_id, item_type, type, instructor_stimulus, is_optional } = question;\n const hintsAvailable = !hints\n ? 0\n : learnosity.question(response_id)?.getMetadata()?.hints?.length ?? 0;\n\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isExitTicket = item_type === 'exit-ticket';\n const hintsRemaining = canAttempt && hintsAvailable - (response?.hintsUsed ?? 0) > 0;\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n const [showHintsButton, setShowHintsButton] = useState(false);\n const [skipped, setSkipped] = useState(false);\n const [showSkipButton, setShowSkipButton] = useState(false);\n\n const { puzzleAttemptCtaRef, puzzleReviewCtaRef, puzzleUnassignRef } = useWorksheetJourney({\n behavior,\n });\n\n useEffect(() => {\n if (hintsTimer && hintsRemaining) {\n const timeoutId = setTimeout(() => {\n setShowHintsButton(true);\n }, hintsTimer * 1000);\n\n return () => clearTimeout(timeoutId);\n }\n setShowHintsButton(hintsRemaining);\n }, [hintsTimer, hintsRemaining]);\n\n useEffect(() => {\n const canShowSkip = !response?.response && !response?.skipped;\n\n //* If hints are available and user has exhausted all hints then we show skip button.\n //* If hints are not available and user has not given any response or have not skipped a question then we show skip button after skippableTime/ 90 seconds.\n //* Else skip button is hidden.\n if (skippable) {\n if (hintsAvailable > 0 && !hintsRemaining) {\n setShowSkipButton(canShowSkip);\n } else if (hintsAvailable === 0 && canShowSkip) {\n const timeoutId = setTimeout(\n () => {\n setShowSkipButton(canShowSkip);\n },\n (skippableTime ?? 0) * 1000,\n );\n\n return () => clearTimeout(timeoutId);\n } else {\n setShowSkipButton(false);\n }\n }\n }, [hintsAvailable, hintsRemaining, response, skippable, skippableTime]);\n\n const {\n checkButton,\n checkButtonDisabled,\n hintsButton,\n retryButton,\n nextButton,\n nextButtonDisabled,\n startButton,\n readyButton,\n validateButton,\n skipSectionButton,\n submitAttemptButton,\n skipButton,\n unassignButton,\n reviewButton,\n submitAttemptButtonDisabled,\n submitAttemptButtonTooltip,\n submitAttemptButtonTooltipText,\n reviewButtonDisabled,\n } = useMemo<IButtonTypes>(() => {\n const showSkipSectionButton =\n canTeacherValidate && is_optional && response?.assignStatus === 'assigned';\n\n const getSystemValidationButtons = (): IButtonTypes => {\n //* maximumAttempts = -2 means this is a puzzle card.\n if (maximumAttempts === -2) {\n if (userType === 'STUDENT') {\n if (canAttempt) {\n return {\n submitAttemptButton: true,\n };\n }\n\n return {\n submitAttemptButton: true,\n submitAttemptButtonDisabled: true,\n submitAttemptButtonTooltip: true,\n submitAttemptButtonTooltipText: canTeacherValidate\n ? 'To be discussed with tutor'\n : 'Already solved',\n };\n }\n\n if (canUnAssign) {\n return {\n unassignButton: true,\n };\n }\n\n return {\n reviewButton: canTeacherValidate,\n reviewButtonDisabled: canTeacherValidateDisabled,\n };\n }\n\n if (!canAttempt) {\n return {\n nextButton: true,\n };\n }\n\n if (!validation && behavior.navigationMode === 'LINEAR') {\n return {\n nextButton: true,\n nextButtonDisabled: !response?.response,\n hintsButton: showHintsButton,\n skipButton: showSkipButton,\n };\n }\n\n if (!validation) {\n return {\n nextButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if (!response || !response.response || !response.score) {\n return {\n checkButton: true,\n checkButtonDisabled: true,\n hintsButton: showHintsButton,\n };\n }\n\n const { responseEdited, score, attemptsHistory } = response;\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n if (maximumAttemptsReached && !canExceedAttempts) {\n return {\n nextButton: true,\n };\n }\n\n if (responseEdited) {\n const lastAttemptResponse = attemptsHistory?.slice(-1)[0]?.response;\n\n return {\n nextButton: maximumAttemptsReached,\n checkButton: true,\n checkButtonDisabled: deepEqual(response.response, lastAttemptResponse),\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) < score.max_score) {\n return {\n nextButton: maximumAttemptsReached,\n retryButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) === score.max_score) {\n return {\n nextButton: true,\n };\n }\n\n return {};\n };\n\n const isPendingTeacherValidation = () =>\n questions.some(({ response_id: questionId }) => {\n const { assignStatus, validatedByTeacher } = responses[questionId] ?? {};\n\n return assignStatus === 'skipped' ? false : validatedByTeacher !== true;\n });\n\n if (teacherValidationEnabled) {\n const { validatedByTeacher } = response ?? {};\n\n // TODO: change the condition to if teacher validator is needed or not\n if (navigationMode === 'ADAPTIVE' || navigationMode === 'CURRENT') {\n if (userType === 'STUDENT') {\n return {\n hintsButton: showHintsButton,\n validateButton: false,\n };\n }\n\n return {\n validateButton: false,\n };\n }\n\n if (validatedByTeacher) {\n return {\n validateButton: true,\n submitAttemptButton:\n canTeacherValidate && canAttempt && userType === 'STUDENT' && canSubmitWorksheet\n ? !isPendingTeacherValidation()\n : false,\n };\n }\n\n if (!isQuestionUnlocked) {\n return {};\n }\n\n if (userType === 'STUDENT') {\n if (isSystemIntro) {\n return {\n startButton: canTeacherValidate && canAttempt,\n };\n }\n\n if (type !== 'clozetext') {\n return {\n ...getSystemValidationButtons(),\n nextButton: false,\n };\n }\n\n return {\n hintsButton: showHintsButton,\n readyButton: canTeacherValidate && isExitTicket && !response?.submittedByStudent,\n };\n }\n\n if (isSystemIntro) {\n return {\n skipSectionButton: showSkipSectionButton,\n };\n }\n\n if (type !== 'clozetext') {\n const { responseEdited, score } = response ?? {};\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton:\n responseEdited || !canTeacherValidate\n ? false\n : !!(score?.score && score?.max_score && !((score.score ?? 0) < score.max_score)),\n };\n }\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton: canTeacherValidate && (isExitTicket ? response?.submittedByStudent : true),\n };\n }\n\n return getSystemValidationButtons();\n }, [\n canTeacherValidate,\n is_optional,\n response,\n teacherValidationEnabled,\n canAttempt,\n validation,\n behavior.navigationMode,\n maximumAttempts,\n canExceedAttempts,\n showHintsButton,\n showSkipButton,\n questions,\n responses,\n canUnAssign,\n navigationMode,\n isQuestionUnlocked,\n userType,\n isSystemIntro,\n type,\n isExitTicket,\n canSubmitWorksheet,\n ]);\n\n const {\n handleResponseChange,\n handleHelpButtonClick,\n handleBackButtonClick,\n handleNextButtonClick,\n handleCheckButtonClick,\n handleRetryButtonClick,\n handleHintButtonClick,\n handleValidateButtonClick,\n handleStartButtonClick,\n handleSkipSectionButtonClick,\n handleReadyButtonClick,\n handleSkipButtonClick,\n } = useHandlerCallbacks({\n layout,\n question,\n questions,\n learnosity,\n questionIndex,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n onResponseChange,\n onTeacherValidation,\n onHelp,\n behavior,\n loggerRef,\n setSkipped,\n getTimeSpentOnQuestion,\n });\n\n useEffect(() => {\n if (skipped) {\n setSkipped(false);\n setShowSkipButton(false);\n handleNextButtonClick();\n if (onSkip) {\n onSkip(question.item_display_number, question.question_number);\n }\n }\n }, [\n handleNextButtonClick,\n onSkip,\n question.item_display_number,\n question.question_number,\n skipped,\n ]);\n\n useEffect(() => {\n const questionInstance = isQuestionAppended ? learnosity.question(response_id) : undefined;\n\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.on('changed', handleResponseChange);\n questionInstance.enable();\n }\n\n return () => {\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.off('changed', handleResponseChange);\n questionInstance.disable();\n }\n };\n }, [\n canAttempt,\n checkButton,\n handleResponseChange,\n isQuestionAppended,\n learnosity,\n response_id,\n validation,\n ]);\n\n return (\n <FlexView\n $background=\"WHITE\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"flex-end\"\n >\n {hintsButton && (\n <IconButton\n Icon={QuestionIcon}\n analyticsLabel=\"Hint\"\n renderAs=\"secondary\"\n disabled={!isQuestionAppended}\n onClick={handleHintButtonClick}\n />\n )}\n {!hintsButton && handleHelpButtonClick && (checkButton || retryButton) && (\n <IconButton\n Icon={HandIcon}\n analyticsLabel=\"Ask for help\"\n renderAs=\"secondary\"\n onClick={handleHelpButtonClick}\n />\n )}\n {handleBackButtonClick && (\n <Button\n widthX={6}\n renderAs=\"secondary\"\n size=\"small\"\n label=\"Back\"\n disabled={questionIndex === 0}\n onClick={handleBackButtonClick}\n />\n )}\n {skipButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Skip\"\n onClick={handleSkipButtonClick}\n />\n )}\n {nextButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Next\"\n onClick={handleNextButtonClick}\n disabled={nextButtonDisabled === true}\n />\n )}\n {retryButton && (\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label={retryButtonLabel}\n disabled={!isQuestionAppended}\n onClick={handleRetryButtonClick}\n />\n )}\n {checkButton && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={checkButtonLabel}\n disabled={checkButtonDisabled === true || !isQuestionAppended}\n onClick={handleCheckButtonClick}\n />\n )}\n {startButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Start\" onClick={handleStartButtonClick} />\n )}\n {readyButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Submit\" onClick={handleReadyButtonClick} />\n )}\n {skipSectionButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={SkipIcon}\n analyticsLabel=\"Skip Section\"\n onClick={handleSkipSectionButtonClick}\n />\n )}\n {!submitAttemptButton && validateButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={Check2Icon}\n disabled={response?.validatedByTeacher}\n analyticsLabel=\"Validate\"\n onClick={handleValidateButtonClick}\n />\n )}\n {submitAttemptButton && (\n <ArrowTooltip\n position=\"top\"\n renderAs=\"primary\"\n tooltipItem={submitAttemptButtonTooltipText ?? ''}\n hidden={!submitAttemptButtonTooltip}\n >\n <div ref={isPuzzleCard ? puzzleAttemptCtaRef : undefined}>\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={isPuzzleCard ? 'I have solved' : 'Submit'}\n onClick={onSubmit}\n disabled={submitAttemptButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n {unassignButton && (\n <div ref={puzzleUnassignRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Unassign\"\n onClick={onUnassign}\n />\n </div>\n )}\n {reviewButton && (\n <ArrowTooltip\n tooltipItem=\"Review this in class with student.\"\n position=\"top\"\n renderAs=\"primary\"\n hidden={!reviewButtonDisabled}\n >\n <div ref={puzzleReviewCtaRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Review\"\n onClick={onReview}\n disabled={reviewButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n </FlexView>\n );\n});\n\nexport default WorksheetQuestionsController;\n"],"names":["WorksheetQuestionsController","memo","props","layout","learnosity","question","questions","responses","questionIndex","canSubmitWorksheet","isQuestionUnlocked","isQuestionAppended","response","behavior","userType","setActiveQuestionId","setSummaryVisible","setBlocker","setResponses","getTimeSpentOnQuestion","onSubmit","onSkip","onUnassign","onReview","onHelp","onResponseChange","onTeacherValidation","loggerRef","navigationMode","canAttempt","hints","checkButtonLabel","retryButtonLabel","validation","maximumAttempts","canExceedAttempts","teacherValidationEnabled","canTeacherValidate","hintsTimer","skippableTime","skippable","canUnAssign","canTeacherValidateDisabled","response_id","item_type","type","instructor_stimulus","is_optional","hintsAvailable","_c","_b","_a","isSystemIntro","isExitTicket","hintsRemaining","isPuzzleCard","useMemo","showHintsButton","setShowHintsButton","useState","skipped","setSkipped","showSkipButton","setShowSkipButton","puzzleAttemptCtaRef","puzzleReviewCtaRef","puzzleUnassignRef","useWorksheetJourney","useEffect","timeoutId","canShowSkip","checkButton","checkButtonDisabled","hintsButton","retryButton","nextButton","nextButtonDisabled","startButton","readyButton","validateButton","skipSectionButton","submitAttemptButton","skipButton","unassignButton","reviewButton","submitAttemptButtonDisabled","submitAttemptButtonTooltip","submitAttemptButtonTooltipText","reviewButtonDisabled","showSkipSectionButton","getSystemValidationButtons","responseEdited","score","attemptsHistory","maximumAttemptsReached","lastAttemptResponse","deepEqual","isPendingTeacherValidation","questionId","assignStatus","validatedByTeacher","handleResponseChange","handleHelpButtonClick","handleBackButtonClick","handleNextButtonClick","handleCheckButtonClick","handleRetryButtonClick","handleHintButtonClick","handleValidateButtonClick","handleStartButtonClick","handleSkipSectionButtonClick","handleReadyButtonClick","handleSkipButtonClick","useHandlerCallbacks","questionInstance","jsxs","FlexView","jsx","IconButton","QuestionIcon","HandIcon","Button","SkipIcon","Check2Icon","ArrowTooltip"],"mappings":";;;;;;;;;;;;;AAoBM,MAAAA,KAAuEC,GAAK,CAASC,MAAA;;AACnF,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC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KAAA,gBAAAA,EAAU;AAAA,YACpB,gBAAe;AAAA,YACf,SAASgG;AAAA,UAAA;AAAA,QACX;AAAA,QAED3B,MACC,gBAAAoC;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,aAAarC,MAAkC;AAAA,YAC/C,QAAQ,CAACD;AAAA,YAET,UAAC,gBAAA+B,EAAA,OAAA,EAAI,KAAK9D,IAAeS,KAAsB,QAC7C,UAAA,gBAAAqD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAOlE,IAAe,kBAAkB;AAAA,gBACxC,SAASnC;AAAA,gBACT,UAAUiE;AAAA,cAAA;AAAA,YAAA,GAEd;AAAA,UAAA;AAAA,QACF;AAAA,QAEDF,MACC,gBAAAkC,EAAC,OAAI,EAAA,KAAKnD,IACR,UAAA,gBAAAmD;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,QAAQ;AAAA,YACR,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAASnG;AAAA,UAAA;AAAA,QAAA,GAEb;AAAA,QAED8D,MACC,gBAAAiC;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,aAAY;AAAA,YACZ,UAAS;AAAA,YACT,UAAS;AAAA,YACT,QAAQ,CAACpC;AAAA,YAET,UAAA,gBAAA6B,EAAC,OAAI,EAAA,KAAKpD,IACR,UAAA,gBAAAoD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,QAAQ;AAAA,gBACR,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,SAASlG;AAAA,gBACT,UAAUiE;AAAA,cAAA;AAAA,YAAA,GAEd;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
1
|
+
{"version":3,"file":"worksheet-questions-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.tsx"],"sourcesContent":["import type {\n IButtonTypes,\n IWorksheetQuestionsControllerProps,\n} from './worksheet-questions-controller-types';\nimport type { FC } from 'react';\n\nimport { deepEqual } from 'fast-equals';\nimport { memo, useEffect, useMemo, useState } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport HandIcon from '../../../../assets/line-icons/icons/hand';\nimport QuestionIcon from '../../../../assets/line-icons/icons/question';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { useWorksheetJourney } from '../hooks/use-worksheet-journey';\nimport useHandlerCallbacks from './use-handler-callbacks';\n\nconst WorksheetQuestionsController: FC<IWorksheetQuestionsControllerProps> = memo(props => {\n const {\n layout,\n learnosity,\n question,\n questions,\n responses,\n questionIndex,\n canSubmitWorksheet,\n isQuestionUnlocked,\n isQuestionAppended,\n response,\n behavior,\n userType,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n getTimeSpentOnQuestion,\n onSubmit,\n onSkip,\n onUnassign,\n onReview,\n } = props;\n\n const { onHelp, onResponseChange, onTeacherValidation, loggerRef } = props;\n const {\n navigationMode,\n canAttempt,\n hints,\n checkButtonLabel,\n retryButtonLabel,\n validation,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n canTeacherValidate,\n hintsTimer,\n skippableTime,\n skippable,\n canUnAssign,\n canTeacherValidateDisabled,\n } = behavior;\n\n const { response_id, item_type, type, instructor_stimulus, is_optional } = question;\n const hintsAvailable = !hints\n ? 0\n : learnosity.question(response_id)?.getMetadata()?.hints?.length ?? 0;\n\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isExitTicket = item_type === 'exit-ticket';\n const hintsRemaining = canAttempt && hintsAvailable - (response?.hintsUsed ?? 0) > 0;\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n const [showHintsButton, setShowHintsButton] = useState(false);\n const [skipped, setSkipped] = useState(false);\n const [showSkipButton, setShowSkipButton] = useState(false);\n\n const { puzzleAttemptCtaRef, puzzleReviewCtaRef, puzzleUnassignRef } = useWorksheetJourney({\n behavior,\n });\n\n useEffect(() => {\n if (hintsTimer && hintsRemaining) {\n const timeoutId = setTimeout(() => {\n setShowHintsButton(true);\n }, hintsTimer * 1000);\n\n return () => clearTimeout(timeoutId);\n }\n setShowHintsButton(hintsRemaining);\n }, [hintsTimer, hintsRemaining]);\n\n useEffect(() => {\n const canShowSkip = !response?.response && !response?.skipped;\n\n //* If hints are available and user has exhausted all hints then we show skip button.\n //* If hints are not available and user has not given any response or have not skipped a question then we show skip button after skippableTime/ 90 seconds.\n //* Else skip button is hidden.\n if (skippable) {\n if (hintsAvailable > 0 && !hintsRemaining) {\n setShowSkipButton(canShowSkip);\n } else if (hintsAvailable === 0 && canShowSkip) {\n const timeoutId = setTimeout(\n () => {\n setShowSkipButton(canShowSkip);\n },\n (skippableTime ?? 0) * 1000,\n );\n\n return () => clearTimeout(timeoutId);\n } else {\n setShowSkipButton(false);\n }\n }\n }, [hintsAvailable, hintsRemaining, response, skippable, skippableTime]);\n\n const {\n checkButton,\n checkButtonDisabled,\n hintsButton,\n retryButton,\n nextButton,\n nextButtonDisabled,\n startButton,\n readyButton,\n validateButton,\n skipSectionButton,\n submitAttemptButton,\n skipButton,\n unassignButton,\n reviewButton,\n submitAttemptButtonDisabled,\n submitAttemptButtonTooltip,\n submitAttemptButtonTooltipText,\n reviewButtonDisabled,\n } = useMemo<IButtonTypes>(() => {\n const showSkipSectionButton =\n canTeacherValidate && is_optional && response?.assignStatus === 'assigned';\n\n const getSystemValidationButtons = (): IButtonTypes => {\n //* maximumAttempts = -2 means this is a puzzle card.\n if (maximumAttempts === -2) {\n if (userType === 'STUDENT') {\n if (canAttempt) {\n return {\n submitAttemptButton: true,\n };\n }\n\n return {\n submitAttemptButton: true,\n submitAttemptButtonDisabled: true,\n submitAttemptButtonTooltip: true,\n submitAttemptButtonTooltipText: canTeacherValidate\n ? 'To be discussed with tutor'\n : 'Already solved',\n };\n }\n\n if (canUnAssign) {\n return {\n unassignButton: true,\n };\n }\n\n return {\n reviewButton: canTeacherValidate,\n reviewButtonDisabled: canTeacherValidateDisabled,\n };\n }\n\n if (!canAttempt) {\n return {\n nextButton: true,\n };\n }\n\n if (!validation && behavior.navigationMode === 'LINEAR') {\n return {\n nextButton: true,\n nextButtonDisabled: !response?.response,\n hintsButton: showHintsButton,\n skipButton: showSkipButton,\n };\n }\n\n if (!validation) {\n return {\n nextButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if (!response || !response.response || !response.score) {\n return {\n checkButton: true,\n checkButtonDisabled: true,\n hintsButton: showHintsButton,\n };\n }\n\n const { responseEdited, score, attemptsHistory } = response;\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n if (maximumAttemptsReached && !canExceedAttempts) {\n return {\n nextButton: true,\n };\n }\n\n if (responseEdited) {\n const lastAttemptResponse = attemptsHistory?.slice(-1)[0]?.response;\n\n return {\n nextButton: maximumAttemptsReached,\n checkButton: true,\n checkButtonDisabled: deepEqual(response.response, lastAttemptResponse),\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) < score.max_score) {\n return {\n nextButton: maximumAttemptsReached,\n retryButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) === score.max_score) {\n return {\n nextButton: true,\n };\n }\n\n return {};\n };\n\n const isPendingTeacherValidation = () =>\n questions.some(({ response_id: questionId }) => {\n const { assignStatus, validatedByTeacher } = responses[questionId] ?? {};\n\n return assignStatus === 'skipped' ? false : validatedByTeacher !== true;\n });\n\n if (teacherValidationEnabled) {\n const { validatedByTeacher } = response ?? {};\n\n // TODO: change the condition to if teacher validator is needed or not\n if (navigationMode === 'ADAPTIVE' || navigationMode === 'CURRENT') {\n if (userType === 'STUDENT') {\n return {\n hintsButton: showHintsButton,\n validateButton: false,\n };\n }\n\n return {\n validateButton: false,\n };\n }\n\n if (validatedByTeacher) {\n return {\n validateButton: true,\n submitAttemptButton:\n canTeacherValidate && canAttempt && userType === 'STUDENT' && canSubmitWorksheet\n ? !isPendingTeacherValidation()\n : false,\n };\n }\n\n if (!isQuestionUnlocked) {\n return {};\n }\n\n if (userType === 'STUDENT') {\n if (isSystemIntro) {\n return {\n startButton: canTeacherValidate && canAttempt,\n };\n }\n\n if (type !== 'clozetext') {\n return {\n ...getSystemValidationButtons(),\n nextButton: false,\n };\n }\n\n return {\n hintsButton: showHintsButton,\n readyButton: canTeacherValidate && isExitTicket && !response?.submittedByStudent,\n };\n }\n\n if (isSystemIntro) {\n return {\n skipSectionButton: showSkipSectionButton,\n };\n }\n\n if (type !== 'clozetext') {\n const { responseEdited, score } = response ?? {};\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton:\n responseEdited || !canTeacherValidate\n ? false\n : !!(score?.score && score?.max_score && !((score.score ?? 0) < score.max_score)),\n };\n }\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton: canTeacherValidate && (isExitTicket ? response?.submittedByStudent : true),\n };\n }\n\n return getSystemValidationButtons();\n }, [\n canTeacherValidate,\n is_optional,\n response,\n teacherValidationEnabled,\n canAttempt,\n validation,\n behavior.navigationMode,\n maximumAttempts,\n canExceedAttempts,\n showHintsButton,\n showSkipButton,\n questions,\n responses,\n canUnAssign,\n navigationMode,\n isQuestionUnlocked,\n userType,\n isSystemIntro,\n type,\n isExitTicket,\n canSubmitWorksheet,\n canTeacherValidateDisabled,\n ]);\n\n const {\n handleResponseChange,\n handleHelpButtonClick,\n handleBackButtonClick,\n handleNextButtonClick,\n handleCheckButtonClick,\n handleRetryButtonClick,\n handleHintButtonClick,\n handleValidateButtonClick,\n handleStartButtonClick,\n handleSkipSectionButtonClick,\n handleReadyButtonClick,\n handleSkipButtonClick,\n } = useHandlerCallbacks({\n layout,\n question,\n questions,\n learnosity,\n questionIndex,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n onResponseChange,\n onTeacherValidation,\n onHelp,\n behavior,\n loggerRef,\n setSkipped,\n getTimeSpentOnQuestion,\n });\n\n useEffect(() => {\n if (skipped) {\n setSkipped(false);\n setShowSkipButton(false);\n handleNextButtonClick();\n if (onSkip) {\n onSkip(question.item_display_number, question.question_number);\n }\n }\n }, [\n handleNextButtonClick,\n onSkip,\n question.item_display_number,\n question.question_number,\n skipped,\n ]);\n\n useEffect(() => {\n const questionInstance = isQuestionAppended ? learnosity.question(response_id) : undefined;\n\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.on('changed', handleResponseChange);\n questionInstance.enable();\n }\n\n return () => {\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.off('changed', handleResponseChange);\n questionInstance.disable();\n }\n };\n }, [\n canAttempt,\n checkButton,\n handleResponseChange,\n isQuestionAppended,\n learnosity,\n response_id,\n validation,\n ]);\n\n return (\n <FlexView\n $background=\"WHITE\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"flex-end\"\n >\n {hintsButton && (\n <IconButton\n Icon={QuestionIcon}\n analyticsLabel=\"Hint\"\n renderAs=\"secondary\"\n disabled={!isQuestionAppended}\n onClick={handleHintButtonClick}\n />\n )}\n {!hintsButton && handleHelpButtonClick && (checkButton || retryButton) && (\n <IconButton\n Icon={HandIcon}\n analyticsLabel=\"Ask for help\"\n renderAs=\"secondary\"\n onClick={handleHelpButtonClick}\n />\n )}\n {handleBackButtonClick && (\n <Button\n widthX={6}\n renderAs=\"secondary\"\n size=\"small\"\n label=\"Back\"\n disabled={questionIndex === 0}\n onClick={handleBackButtonClick}\n />\n )}\n {skipButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Skip\"\n onClick={handleSkipButtonClick}\n />\n )}\n {nextButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Next\"\n onClick={handleNextButtonClick}\n disabled={nextButtonDisabled === true}\n />\n )}\n {retryButton && (\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label={retryButtonLabel}\n disabled={!isQuestionAppended}\n onClick={handleRetryButtonClick}\n />\n )}\n {checkButton && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={checkButtonLabel}\n disabled={checkButtonDisabled === true || !isQuestionAppended}\n onClick={handleCheckButtonClick}\n />\n )}\n {startButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Start\" onClick={handleStartButtonClick} />\n )}\n {readyButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Submit\" onClick={handleReadyButtonClick} />\n )}\n {skipSectionButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={SkipIcon}\n analyticsLabel=\"Skip Section\"\n onClick={handleSkipSectionButtonClick}\n />\n )}\n {!submitAttemptButton && validateButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={Check2Icon}\n disabled={response?.validatedByTeacher}\n analyticsLabel=\"Validate\"\n onClick={handleValidateButtonClick}\n />\n )}\n {submitAttemptButton && (\n <ArrowTooltip\n position=\"top\"\n renderAs=\"primary\"\n tooltipItem={submitAttemptButtonTooltipText ?? ''}\n hidden={!submitAttemptButtonTooltip}\n >\n <div ref={isPuzzleCard ? puzzleAttemptCtaRef : undefined}>\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={isPuzzleCard ? 'I have solved' : 'Submit'}\n onClick={onSubmit}\n disabled={submitAttemptButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n {unassignButton && (\n <div ref={puzzleUnassignRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Unassign\"\n onClick={onUnassign}\n />\n </div>\n )}\n {reviewButton && (\n <ArrowTooltip\n tooltipItem=\"Review this in class with student.\"\n position=\"top\"\n renderAs=\"primary\"\n hidden={!reviewButtonDisabled}\n >\n <div ref={puzzleReviewCtaRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Review\"\n onClick={onReview}\n disabled={reviewButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n </FlexView>\n );\n});\n\nexport default WorksheetQuestionsController;\n"],"names":["WorksheetQuestionsController","memo","props","layout","learnosity","question","questions","responses","questionIndex","canSubmitWorksheet","isQuestionUnlocked","isQuestionAppended","response","behavior","userType","setActiveQuestionId","setSummaryVisible","setBlocker","setResponses","getTimeSpentOnQuestion","onSubmit","onSkip","onUnassign","onReview","onHelp","onResponseChange","onTeacherValidation","loggerRef","navigationMode","canAttempt","hints","checkButtonLabel","retryButtonLabel","validation","maximumAttempts","canExceedAttempts","teacherValidationEnabled","canTeacherValidate","hintsTimer","skippableTime","skippable","canUnAssign","canTeacherValidateDisabled","response_id","item_type","type","instructor_stimulus","is_optional","hintsAvailable","_c","_b","_a","isSystemIntro","isExitTicket","hintsRemaining","isPuzzleCard","useMemo","showHintsButton","setShowHintsButton","useState","skipped","setSkipped","showSkipButton","setShowSkipButton","puzzleAttemptCtaRef","puzzleReviewCtaRef","puzzleUnassignRef","useWorksheetJourney","useEffect","timeoutId","canShowSkip","checkButton","checkButtonDisabled","hintsButton","retryButton","nextButton","nextButtonDisabled","startButton","readyButton","validateButton","skipSectionButton","submitAttemptButton","skipButton","unassignButton","reviewButton","submitAttemptButtonDisabled","submitAttemptButtonTooltip","submitAttemptButtonTooltipText","reviewButtonDisabled","showSkipSectionButton","getSystemValidationButtons","responseEdited","score","attemptsHistory","maximumAttemptsReached","lastAttemptResponse","deepEqual","isPendingTeacherValidation","questionId","assignStatus","validatedByTeacher","handleResponseChange","handleHelpButtonClick","handleBackButtonClick","handleNextButtonClick","handleCheckButtonClick","handleRetryButtonClick","handleHintButtonClick","handleValidateButtonClick","handleStartButtonClick","handleSkipSectionButtonClick","handleReadyButtonClick","handleSkipButtonClick","useHandlerCallbacks","questionInstance","jsxs","FlexView","jsx","IconButton","QuestionIcon","HandIcon","Button","SkipIcon","Check2Icon","ArrowTooltip"],"mappings":";;;;;;;;;;;;;AAoBM,MAAAA,KAAuEC,GAAK,CAASC,MAAA;;AACnF,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAArB,GAEE,EAAE,QAAAsB,IAAQ,kBAAAC,IAAkB,qBAAAC,IAAqB,WAAAC,OAAczB,GAC/D;AAAA,IACJ,gBAAA0B;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,4BAAAC;AAAA,EACE,IAAA7B,GAEE,EAAE,aAAA8B,GAAa,WAAAC,IAAW,MAAAC,GAAM,qBAAAC,IAAqB,aAAAC,EAAgB,IAAA1C,GACrE2C,IAAkBlB,OAEpBmB,MAAAC,MAAAC,KAAA/C,EAAW,SAASuC,CAAW,MAA/B,gBAAAQ,GAAkC,kBAAlC,gBAAAD,GAAiD,UAAjD,gBAAAD,GAAwD,WAAU,IADlE,GAGEG,IAAgB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