@cuemath/leap 3.2.19-beta-0.1 → 3.2.19-link.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +6 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/assets/lottie/lottie.js +0 -5
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +8 -10
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.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/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -79
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +42 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +2 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +313 -307
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +71 -89
- package/dist/index.js +626 -626
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/package.json +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
- package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
- package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,107 +1,102 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { deepEqual as
|
3
|
-
import { memo as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
1
|
+
import { jsxs as Ft, jsx as i } from "react/jsx-runtime";
|
2
|
+
import { deepEqual as Gt } from "../../../../node_modules/fast-equals/dist/esm/index.js";
|
3
|
+
import { memo as Ot, useState as q, useEffect as T, useMemo as Jt } from "react";
|
4
|
+
import Kt from "../../../../assets/line-icons/icons/check2.js";
|
5
|
+
import Yt from "../../../../assets/line-icons/icons/hand.js";
|
6
|
+
import Zt from "../../../../assets/line-icons/icons/question.js";
|
7
|
+
import te from "../../../../assets/line-icons/icons/skip.js";
|
8
|
+
import ee from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
9
9
|
import o from "../../../ui/buttons/button/button.js";
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
|
14
|
-
|
15
|
-
var st, rt, at;
|
10
|
+
import C from "../../../ui/buttons/icon-button/icon-button.js";
|
11
|
+
import ne from "../../../ui/layout/flex-view.js";
|
12
|
+
import ie from "./use-handler-callbacks.js";
|
13
|
+
const ke = Ot((N) => {
|
14
|
+
var nt, it, ot;
|
16
15
|
const {
|
17
|
-
layout:
|
18
|
-
learnosity:
|
16
|
+
layout: rt,
|
17
|
+
learnosity: k,
|
19
18
|
question: l,
|
20
|
-
questions:
|
19
|
+
questions: g,
|
21
20
|
responses: L,
|
22
21
|
questionIndex: X,
|
23
22
|
canSubmitWorksheet: H,
|
24
23
|
isQuestionUnlocked: Q,
|
25
|
-
isQuestionAppended:
|
24
|
+
isQuestionAppended: d,
|
26
25
|
response: t,
|
27
|
-
behavior:
|
28
|
-
userType:
|
29
|
-
setActiveQuestionId:
|
30
|
-
setSummaryVisible:
|
31
|
-
setBlocker:
|
32
|
-
setResponses:
|
33
|
-
getTimeSpentOnQuestion:
|
34
|
-
onSubmit:
|
35
|
-
onSkip:
|
36
|
-
onUnassign:
|
37
|
-
onReview:
|
38
|
-
} = N, { onHelp:
|
39
|
-
navigationMode:
|
26
|
+
behavior: f,
|
27
|
+
userType: m,
|
28
|
+
setActiveQuestionId: at,
|
29
|
+
setSummaryVisible: ut,
|
30
|
+
setBlocker: lt,
|
31
|
+
setResponses: ct,
|
32
|
+
getTimeSpentOnQuestion: dt,
|
33
|
+
onSubmit: mt,
|
34
|
+
onSkip: v,
|
35
|
+
onUnassign: Bt,
|
36
|
+
onReview: pt
|
37
|
+
} = N, { onHelp: ht, onResponseChange: kt, onTeacherValidation: ft, loggerRef: bt } = N, {
|
38
|
+
navigationMode: I,
|
40
39
|
canAttempt: s,
|
41
|
-
hints:
|
42
|
-
checkButtonLabel:
|
43
|
-
retryButtonLabel:
|
44
|
-
validation:
|
45
|
-
maximumAttempts:
|
40
|
+
hints: yt,
|
41
|
+
checkButtonLabel: St,
|
42
|
+
retryButtonLabel: At,
|
43
|
+
validation: c,
|
44
|
+
maximumAttempts: b,
|
46
45
|
canExceedAttempts: M,
|
47
46
|
teacherValidationEnabled: $,
|
48
47
|
canTeacherValidate: r,
|
49
|
-
hintsTimer:
|
50
|
-
skippableTime:
|
51
|
-
skippable:
|
52
|
-
canUnAssign: P
|
53
|
-
|
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
|
-
behavior: m
|
56
|
-
});
|
48
|
+
hintsTimer: w,
|
49
|
+
skippableTime: j,
|
50
|
+
skippable: W,
|
51
|
+
canUnAssign: P
|
52
|
+
} = f, { response_id: E, item_type: xt, type: _, instructor_stimulus: Tt, is_optional: F } = l, y = yt ? ((ot = (it = (nt = k.question(E)) == null ? void 0 : nt.getMetadata()) == null ? void 0 : it.hints) == null ? void 0 : ot.length) ?? 0 : 0, R = Tt === "SystemIntro", D = xt === "exit-ticket", B = s && y - ((t == null ? void 0 : t.hintsUsed) ?? 0) > 0, [a, G] = q(!1), [O, J] = q(!1), [K, S] = q(!1);
|
57
53
|
T(() => {
|
58
|
-
if (
|
59
|
-
const
|
60
|
-
|
61
|
-
},
|
62
|
-
return () => clearTimeout(
|
54
|
+
if (w && B) {
|
55
|
+
const n = setTimeout(() => {
|
56
|
+
G(!0);
|
57
|
+
}, w * 1e3);
|
58
|
+
return () => clearTimeout(n);
|
63
59
|
}
|
64
|
-
|
65
|
-
}, [
|
66
|
-
const
|
67
|
-
if (
|
68
|
-
if (y > 0 && !
|
69
|
-
|
70
|
-
else if (y === 0 &&
|
71
|
-
const
|
60
|
+
G(B);
|
61
|
+
}, [w, B]), T(() => {
|
62
|
+
const n = !(t != null && t.response) && !(t != null && t.skipped);
|
63
|
+
if (W)
|
64
|
+
if (y > 0 && !B)
|
65
|
+
S(n);
|
66
|
+
else if (y === 0 && n) {
|
67
|
+
const x = setTimeout(
|
72
68
|
() => {
|
73
|
-
|
69
|
+
S(n);
|
74
70
|
},
|
75
|
-
(
|
71
|
+
(j ?? 0) * 1e3
|
76
72
|
);
|
77
|
-
return () => clearTimeout(
|
73
|
+
return () => clearTimeout(x);
|
78
74
|
} else
|
79
|
-
|
80
|
-
}, [y,
|
75
|
+
S(!1);
|
76
|
+
}, [y, B, t, W, j]);
|
81
77
|
const {
|
82
|
-
checkButton:
|
83
|
-
checkButtonDisabled:
|
84
|
-
hintsButton:
|
85
|
-
retryButton:
|
86
|
-
nextButton:
|
87
|
-
nextButtonDisabled:
|
88
|
-
startButton:
|
89
|
-
readyButton:
|
90
|
-
validateButton:
|
91
|
-
skipSectionButton:
|
92
|
-
submitAttemptButton:
|
93
|
-
skipButton:
|
94
|
-
unassignButton:
|
95
|
-
reviewButton:
|
96
|
-
submitAttemptButtonDisabled:
|
97
|
-
submitAttemptButtonTooltip:
|
98
|
-
submitAttemptButtonTooltipText:
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
return p === "STUDENT" ? s ? {
|
78
|
+
checkButton: p,
|
79
|
+
checkButtonDisabled: Ct,
|
80
|
+
hintsButton: Y,
|
81
|
+
retryButton: A,
|
82
|
+
nextButton: gt,
|
83
|
+
nextButtonDisabled: vt,
|
84
|
+
startButton: It,
|
85
|
+
readyButton: wt,
|
86
|
+
validateButton: Et,
|
87
|
+
skipSectionButton: _t,
|
88
|
+
submitAttemptButton: Z,
|
89
|
+
skipButton: Rt,
|
90
|
+
unassignButton: Dt,
|
91
|
+
reviewButton: zt,
|
92
|
+
submitAttemptButtonDisabled: Ut,
|
93
|
+
submitAttemptButtonTooltip: Vt,
|
94
|
+
submitAttemptButtonTooltipText: qt
|
95
|
+
} = Jt(() => {
|
96
|
+
const n = r && F && (t == null ? void 0 : t.assignStatus) === "assigned", x = () => {
|
97
|
+
var st;
|
98
|
+
if (b === -2)
|
99
|
+
return m === "STUDENT" ? s ? {
|
105
100
|
submitAttemptButton: !0
|
106
101
|
} : {
|
107
102
|
submitAttemptButton: !0,
|
@@ -111,21 +106,20 @@ const xe = ie((N) => {
|
|
111
106
|
} : P ? {
|
112
107
|
unassignButton: !0
|
113
108
|
} : {
|
114
|
-
reviewButton: r
|
115
|
-
reviewButtonDisabled: F
|
109
|
+
reviewButton: r
|
116
110
|
};
|
117
111
|
if (!s)
|
118
112
|
return {
|
119
113
|
nextButton: !0
|
120
114
|
};
|
121
|
-
if (!
|
115
|
+
if (!c && f.navigationMode === "LINEAR")
|
122
116
|
return {
|
123
117
|
nextButton: !0,
|
124
118
|
nextButtonDisabled: !(t != null && t.response),
|
125
119
|
hintsButton: a,
|
126
|
-
skipButton:
|
120
|
+
skipButton: K
|
127
121
|
};
|
128
|
-
if (!
|
122
|
+
if (!c)
|
129
123
|
return {
|
130
124
|
nextButton: !0,
|
131
125
|
hintsButton: a
|
@@ -136,17 +130,17 @@ const xe = ie((N) => {
|
|
136
130
|
checkButtonDisabled: !0,
|
137
131
|
hintsButton: a
|
138
132
|
};
|
139
|
-
const { responseEdited:
|
133
|
+
const { responseEdited: h, score: u, attemptsHistory: e } = t, V = ((e == null ? void 0 : e.length) ?? 0) >= b;
|
140
134
|
if (V && !M)
|
141
135
|
return {
|
142
136
|
nextButton: !0
|
143
137
|
};
|
144
|
-
if (
|
145
|
-
const
|
138
|
+
if (h) {
|
139
|
+
const Pt = (st = e == null ? void 0 : e.slice(-1)[0]) == null ? void 0 : st.response;
|
146
140
|
return {
|
147
141
|
nextButton: V,
|
148
142
|
checkButton: !0,
|
149
|
-
checkButtonDisabled:
|
143
|
+
checkButtonDisabled: Gt(t.response, Pt),
|
150
144
|
hintsButton: a
|
151
145
|
};
|
152
146
|
}
|
@@ -157,130 +151,129 @@ const xe = ie((N) => {
|
|
157
151
|
} : (u.score ?? 0) === u.max_score ? {
|
158
152
|
nextButton: !0
|
159
153
|
} : {};
|
160
|
-
},
|
161
|
-
const { assignStatus: u, validatedByTeacher:
|
162
|
-
return u === "skipped" ? !1 :
|
154
|
+
}, Wt = () => g.some(({ response_id: h }) => {
|
155
|
+
const { assignStatus: u, validatedByTeacher: e } = L[h] ?? {};
|
156
|
+
return u === "skipped" ? !1 : e !== !0;
|
163
157
|
});
|
164
158
|
if ($) {
|
165
|
-
const { validatedByTeacher:
|
166
|
-
if (
|
167
|
-
return
|
159
|
+
const { validatedByTeacher: h } = t ?? {};
|
160
|
+
if (I === "ADAPTIVE" || I === "CURRENT")
|
161
|
+
return m === "STUDENT" ? {
|
168
162
|
hintsButton: a,
|
169
163
|
validateButton: !1
|
170
164
|
} : {
|
171
165
|
validateButton: !1
|
172
166
|
};
|
173
|
-
if (
|
167
|
+
if (h)
|
174
168
|
return {
|
175
169
|
validateButton: !0,
|
176
|
-
submitAttemptButton: r && s &&
|
170
|
+
submitAttemptButton: r && s && m === "STUDENT" && H ? !Wt() : !1
|
177
171
|
};
|
178
172
|
if (!Q)
|
179
173
|
return {};
|
180
|
-
if (
|
181
|
-
return
|
174
|
+
if (m === "STUDENT")
|
175
|
+
return R ? {
|
182
176
|
startButton: r && s
|
183
|
-
} :
|
184
|
-
...
|
177
|
+
} : _ !== "clozetext" ? {
|
178
|
+
...x(),
|
185
179
|
nextButton: !1
|
186
180
|
} : {
|
187
181
|
hintsButton: a,
|
188
|
-
readyButton: r &&
|
182
|
+
readyButton: r && D && !(t != null && t.submittedByStudent)
|
189
183
|
};
|
190
|
-
if (
|
184
|
+
if (R)
|
191
185
|
return {
|
192
|
-
skipSectionButton:
|
186
|
+
skipSectionButton: n
|
193
187
|
};
|
194
|
-
if (
|
195
|
-
const { responseEdited: u, score:
|
188
|
+
if (_ !== "clozetext") {
|
189
|
+
const { responseEdited: u, score: e } = t ?? {};
|
196
190
|
return {
|
197
|
-
skipSectionButton:
|
198
|
-
validateButton: u || !r ? !1 : !!(
|
191
|
+
skipSectionButton: n,
|
192
|
+
validateButton: u || !r ? !1 : !!(e != null && e.score && (e != null && e.max_score) && !((e.score ?? 0) < e.max_score))
|
199
193
|
};
|
200
194
|
}
|
201
195
|
return {
|
202
|
-
skipSectionButton:
|
203
|
-
validateButton: r && (
|
196
|
+
skipSectionButton: n,
|
197
|
+
validateButton: r && (D ? t == null ? void 0 : t.submittedByStudent : !0)
|
204
198
|
};
|
205
199
|
}
|
206
|
-
return
|
200
|
+
return x();
|
207
201
|
}, [
|
208
202
|
r,
|
209
|
-
|
203
|
+
F,
|
210
204
|
t,
|
211
205
|
$,
|
212
206
|
s,
|
213
|
-
|
214
|
-
|
215
|
-
|
207
|
+
c,
|
208
|
+
f.navigationMode,
|
209
|
+
b,
|
216
210
|
M,
|
217
211
|
a,
|
218
|
-
|
219
|
-
|
212
|
+
K,
|
213
|
+
g,
|
220
214
|
L,
|
221
215
|
P,
|
222
|
-
|
216
|
+
I,
|
223
217
|
Q,
|
224
|
-
|
225
|
-
D,
|
218
|
+
m,
|
226
219
|
R,
|
227
|
-
|
228
|
-
|
229
|
-
|
220
|
+
_,
|
221
|
+
D,
|
222
|
+
H
|
230
223
|
]), {
|
231
|
-
handleResponseChange:
|
232
|
-
handleHelpButtonClick:
|
233
|
-
handleBackButtonClick:
|
224
|
+
handleResponseChange: z,
|
225
|
+
handleHelpButtonClick: tt,
|
226
|
+
handleBackButtonClick: et,
|
234
227
|
handleNextButtonClick: U,
|
235
|
-
handleCheckButtonClick:
|
236
|
-
handleRetryButtonClick:
|
237
|
-
handleHintButtonClick:
|
238
|
-
handleValidateButtonClick:
|
239
|
-
handleStartButtonClick:
|
240
|
-
handleSkipSectionButtonClick:
|
241
|
-
handleReadyButtonClick:
|
242
|
-
handleSkipButtonClick:
|
243
|
-
} =
|
244
|
-
layout:
|
228
|
+
handleCheckButtonClick: Nt,
|
229
|
+
handleRetryButtonClick: Lt,
|
230
|
+
handleHintButtonClick: Xt,
|
231
|
+
handleValidateButtonClick: Ht,
|
232
|
+
handleStartButtonClick: Qt,
|
233
|
+
handleSkipSectionButtonClick: Mt,
|
234
|
+
handleReadyButtonClick: $t,
|
235
|
+
handleSkipButtonClick: jt
|
236
|
+
} = ie({
|
237
|
+
layout: rt,
|
245
238
|
question: l,
|
246
|
-
questions:
|
247
|
-
learnosity:
|
239
|
+
questions: g,
|
240
|
+
learnosity: k,
|
248
241
|
questionIndex: X,
|
249
|
-
setActiveQuestionId:
|
250
|
-
setSummaryVisible:
|
251
|
-
setBlocker:
|
252
|
-
setResponses:
|
253
|
-
onResponseChange:
|
254
|
-
onTeacherValidation:
|
255
|
-
onHelp:
|
256
|
-
behavior:
|
257
|
-
loggerRef:
|
258
|
-
setSkipped:
|
259
|
-
getTimeSpentOnQuestion:
|
242
|
+
setActiveQuestionId: at,
|
243
|
+
setSummaryVisible: ut,
|
244
|
+
setBlocker: lt,
|
245
|
+
setResponses: ct,
|
246
|
+
onResponseChange: kt,
|
247
|
+
onTeacherValidation: ft,
|
248
|
+
onHelp: ht,
|
249
|
+
behavior: f,
|
250
|
+
loggerRef: bt,
|
251
|
+
setSkipped: J,
|
252
|
+
getTimeSpentOnQuestion: dt
|
260
253
|
});
|
261
254
|
return T(() => {
|
262
|
-
|
255
|
+
O && (J(!1), S(!1), U(), v && v(l.item_display_number, l.question_number));
|
263
256
|
}, [
|
264
257
|
U,
|
265
|
-
|
258
|
+
v,
|
266
259
|
l.item_display_number,
|
267
260
|
l.question_number,
|
268
|
-
|
261
|
+
O
|
269
262
|
]), T(() => {
|
270
|
-
const
|
271
|
-
return
|
272
|
-
|
263
|
+
const n = d ? k.question(E) : void 0;
|
264
|
+
return n && s && (!c || p) && (n.on("changed", z), n.enable()), () => {
|
265
|
+
n && s && (!c || p) && (n.off("changed", z), n.disable());
|
273
266
|
};
|
274
267
|
}, [
|
275
268
|
s,
|
276
|
-
|
277
|
-
_,
|
278
|
-
c,
|
279
|
-
b,
|
269
|
+
p,
|
280
270
|
z,
|
281
|
-
d
|
282
|
-
|
283
|
-
|
271
|
+
d,
|
272
|
+
k,
|
273
|
+
E,
|
274
|
+
c
|
275
|
+
]), /* @__PURE__ */ Ft(
|
276
|
+
ne,
|
284
277
|
{
|
285
278
|
$background: "WHITE",
|
286
279
|
$flexDirection: "row",
|
@@ -288,26 +281,26 @@ const xe = ie((N) => {
|
|
288
281
|
$alignItems: "center",
|
289
282
|
$justifyContent: "flex-end",
|
290
283
|
children: [
|
291
|
-
|
292
|
-
|
284
|
+
Y && /* @__PURE__ */ i(
|
285
|
+
C,
|
293
286
|
{
|
294
|
-
Icon:
|
287
|
+
Icon: Zt,
|
295
288
|
analyticsLabel: "Hint",
|
296
289
|
renderAs: "secondary",
|
297
|
-
disabled: !
|
298
|
-
onClick:
|
290
|
+
disabled: !d,
|
291
|
+
onClick: Xt
|
299
292
|
}
|
300
293
|
),
|
301
|
-
!
|
302
|
-
|
294
|
+
!Y && tt && (p || A) && /* @__PURE__ */ i(
|
295
|
+
C,
|
303
296
|
{
|
304
|
-
Icon:
|
297
|
+
Icon: Yt,
|
305
298
|
analyticsLabel: "Ask for help",
|
306
299
|
renderAs: "secondary",
|
307
|
-
onClick:
|
300
|
+
onClick: tt
|
308
301
|
}
|
309
302
|
),
|
310
|
-
|
303
|
+
et && /* @__PURE__ */ i(
|
311
304
|
o,
|
312
305
|
{
|
313
306
|
widthX: 6,
|
@@ -315,126 +308,98 @@ const xe = ie((N) => {
|
|
315
308
|
size: "small",
|
316
309
|
label: "Back",
|
317
310
|
disabled: X === 0,
|
318
|
-
onClick:
|
311
|
+
onClick: et
|
319
312
|
}
|
320
313
|
),
|
321
|
-
|
314
|
+
Rt && /* @__PURE__ */ i(
|
322
315
|
o,
|
323
316
|
{
|
324
317
|
widthX: 6,
|
325
|
-
renderAs:
|
318
|
+
renderAs: A ? "secondary" : "primary",
|
326
319
|
size: "small",
|
327
320
|
label: "Skip",
|
328
|
-
onClick:
|
321
|
+
onClick: jt
|
329
322
|
}
|
330
323
|
),
|
331
|
-
|
324
|
+
gt && /* @__PURE__ */ i(
|
332
325
|
o,
|
333
326
|
{
|
334
327
|
widthX: 6,
|
335
|
-
renderAs:
|
328
|
+
renderAs: A ? "secondary" : "primary",
|
336
329
|
size: "small",
|
337
330
|
label: "Next",
|
338
331
|
onClick: U,
|
339
|
-
disabled:
|
332
|
+
disabled: vt === !0
|
340
333
|
}
|
341
334
|
),
|
342
|
-
|
335
|
+
A && /* @__PURE__ */ i(
|
343
336
|
o,
|
344
337
|
{
|
345
338
|
widthX: 6,
|
346
339
|
renderAs: "primary",
|
347
340
|
size: "small",
|
348
|
-
label:
|
349
|
-
disabled: !
|
350
|
-
onClick:
|
341
|
+
label: At,
|
342
|
+
disabled: !d,
|
343
|
+
onClick: Lt
|
351
344
|
}
|
352
345
|
),
|
353
|
-
|
346
|
+
p && /* @__PURE__ */ i(
|
354
347
|
o,
|
355
348
|
{
|
356
349
|
renderAs: "primary",
|
357
350
|
size: "small",
|
358
|
-
label:
|
359
|
-
disabled:
|
360
|
-
onClick:
|
351
|
+
label: St,
|
352
|
+
disabled: Ct === !0 || !d,
|
353
|
+
onClick: Nt
|
361
354
|
}
|
362
355
|
),
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
356
|
+
It && /* @__PURE__ */ i(o, { renderAs: "primary", size: "small", label: "Start", onClick: Qt }),
|
357
|
+
wt && /* @__PURE__ */ i(o, { renderAs: "primary", size: "small", label: "Submit", onClick: $t }),
|
358
|
+
_t && /* @__PURE__ */ i(
|
359
|
+
C,
|
367
360
|
{
|
368
361
|
renderAs: "primary",
|
369
|
-
Icon:
|
362
|
+
Icon: te,
|
370
363
|
analyticsLabel: "Skip Section",
|
371
|
-
onClick:
|
364
|
+
onClick: Mt
|
372
365
|
}
|
373
366
|
),
|
374
|
-
!
|
375
|
-
|
367
|
+
!Z && Et && /* @__PURE__ */ i(
|
368
|
+
C,
|
376
369
|
{
|
377
370
|
renderAs: "primary",
|
378
|
-
Icon:
|
371
|
+
Icon: Kt,
|
379
372
|
disabled: t == null ? void 0 : t.validatedByTeacher,
|
380
373
|
analyticsLabel: "Validate",
|
381
|
-
onClick:
|
374
|
+
onClick: Ht
|
382
375
|
}
|
383
376
|
),
|
384
|
-
|
385
|
-
|
377
|
+
Z && /* @__PURE__ */ i(
|
378
|
+
ee,
|
386
379
|
{
|
387
380
|
position: "top",
|
388
381
|
renderAs: "primary",
|
389
|
-
tooltipItem:
|
390
|
-
hidden:
|
391
|
-
children: /* @__PURE__ */
|
382
|
+
tooltipItem: qt ?? "",
|
383
|
+
hidden: !Vt,
|
384
|
+
children: /* @__PURE__ */ i(
|
392
385
|
o,
|
393
386
|
{
|
394
387
|
renderAs: "primary",
|
395
388
|
size: "small",
|
396
|
-
label:
|
397
|
-
onClick:
|
398
|
-
disabled:
|
389
|
+
label: b === -2 ? "I have solved" : "Submit",
|
390
|
+
onClick: mt,
|
391
|
+
disabled: Ut
|
399
392
|
}
|
400
|
-
)
|
393
|
+
)
|
401
394
|
}
|
402
395
|
),
|
403
|
-
|
404
|
-
|
405
|
-
{
|
406
|
-
widthX: 6,
|
407
|
-
renderAs: "primary",
|
408
|
-
size: "small",
|
409
|
-
label: "Unassign",
|
410
|
-
onClick: bt
|
411
|
-
}
|
412
|
-
) }),
|
413
|
-
Qt && /* @__PURE__ */ e(
|
414
|
-
dt,
|
415
|
-
{
|
416
|
-
tooltipItem: "Review this in class with student.",
|
417
|
-
position: "top",
|
418
|
-
renderAs: "primary",
|
419
|
-
hidden: !nt,
|
420
|
-
children: /* @__PURE__ */ e("div", { ref: Rt, children: /* @__PURE__ */ e(
|
421
|
-
o,
|
422
|
-
{
|
423
|
-
widthX: 6,
|
424
|
-
renderAs: "primary",
|
425
|
-
size: "small",
|
426
|
-
label: "Review",
|
427
|
-
onClick: yt,
|
428
|
-
disabled: nt
|
429
|
-
}
|
430
|
-
) })
|
431
|
-
}
|
432
|
-
)
|
396
|
+
Dt && /* @__PURE__ */ i(o, { widthX: 6, renderAs: "primary", size: "small", label: "Unassign", onClick: Bt }),
|
397
|
+
zt && /* @__PURE__ */ i(o, { widthX: 6, renderAs: "primary", size: "small", label: "Review", onClick: pt })
|
433
398
|
]
|
434
399
|
}
|
435
400
|
);
|
436
401
|
});
|
437
402
|
export {
|
438
|
-
|
403
|
+
ke as default
|
439
404
|
};
|
440
405
|
//# sourceMappingURL=worksheet-questions-controller.js.map
|