@cuemath/leap 3.2.27 → 3.2.28
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 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +5 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +2 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +6 -4
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +9 -7
- 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 +7 -4
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +85 -97
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -42
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
- 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 +54 -48
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +33 -27
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
- 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/api/puzzle-dashboard.js +10 -0
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js +10 -6
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +79 -30
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/constants/puzzle-container.js +8 -0
- package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
- package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
- package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +107 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
- 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 +28 -13
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +16 -12
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +166 -163
- 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 +242 -207
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
- 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 +303 -309
- 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 +44 -35
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +87 -4
- package/dist/index.js +285 -275
- package/dist/index.js.map +1 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
- package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
- package/dist/static/puzzle-orange-lottie.0a105c42.json +21206 -0
- package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
- package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
- package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
- package/package.json +1 -1
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
|
@@ -1,130 +1,129 @@
|
|
|
1
|
-
import { jsxs as R, Fragment as
|
|
1
|
+
import { jsxs as R, Fragment as mt, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { captureMessage as Y } from "@sentry/browser";
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { WORKSHEET_NUDGE_BANNER_HEIGHT as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { getWorksheetDimensions as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { NudgeBannerWrapper as qt, NudgeBannerIcon as
|
|
25
|
-
import
|
|
26
|
-
const
|
|
3
|
+
import { memo as ft, forwardRef as pt, useMemo as Z, useState as v, useCallback as y, useEffect as b, useLayoutEffect as ht } from "react";
|
|
4
|
+
import gt from "../../../assets/line-icons/icons/check2.js";
|
|
5
|
+
import bt from "../../../assets/line-icons/icons/info2.js";
|
|
6
|
+
import It from "../../../helpers/get-device-details.js";
|
|
7
|
+
import St from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
|
|
8
|
+
import fe from "../../ui/layout/flex-view.js";
|
|
9
|
+
import Ct from "../../ui/text/text.js";
|
|
10
|
+
import vt from "../constants/events.js";
|
|
11
|
+
import yt from "../user-pointer-pin/user-pin.js";
|
|
12
|
+
import { WORKSHEET_NUDGE_BANNER_HEIGHT as pe, TOP_NAVIGATION_HEIGHT as Tt, DESMOS_CALC_POSITION as $t } from "./constants.js";
|
|
13
|
+
import _t from "./hooks/use-create-imperative-handle.js";
|
|
14
|
+
import Et from "./hooks/use-get-active-question-id.js";
|
|
15
|
+
import kt from "./hooks/use-time-on-questions.js";
|
|
16
|
+
import wt from "./question-tips.js";
|
|
17
|
+
import Nt from "./worksheet-action-bar/worksheet-action-bar.js";
|
|
18
|
+
import At from "./worksheet-blocker/worksheet-blocker.js";
|
|
19
|
+
import { getWorksheetDimensions as Bt, getQuestionsFromItems as Wt, getInitialResponses as Ot, getLastUnlockedQuestionIndex as he, getInitialQuestionId as Rt, getQuestionMetadata as ge, scrollToQuestion as Q, getRenderableQuestions as Dt, getWorksheetNudgeBannerInfo as Vt } from "./worksheet-helpers.js";
|
|
20
|
+
import Mt from "./worksheet-navigation/worksheet-navigation.js";
|
|
21
|
+
import xt from "./worksheet-question/worksheet-question.js";
|
|
22
|
+
import Ht from "./worksheet-sidebar/navigator.js";
|
|
23
|
+
import Pt from "./worksheet-sidebar/sidebar.js";
|
|
24
|
+
import { NudgeBannerWrapper as qt, NudgeBannerIcon as be, WorksheetContainer as Qt, NavigationContainer as Gt, NavigationWrapper as Lt, BlockerWrapper as zt, DesmosCalcWrapper as Ft, ActionbarContainer as jt, ActionbarWrapper as Ut, StudentWorksheetSideBar as Kt, QuestionsWrapper as Xt } from "./worksheet-styled.js";
|
|
25
|
+
import Jt from "./worksheet-summary/worksheet-summary.js";
|
|
26
|
+
const Yt = (Ie, Se) => {
|
|
27
27
|
const {
|
|
28
28
|
userType: s,
|
|
29
|
-
studentName:
|
|
30
|
-
questionsSignedRequest:
|
|
29
|
+
studentName: Ce = "Student",
|
|
30
|
+
questionsSignedRequest: ve,
|
|
31
31
|
worksheetName: ee,
|
|
32
|
-
initialResponseId:
|
|
33
|
-
initialItemIndex:
|
|
32
|
+
initialResponseId: ye,
|
|
33
|
+
initialItemIndex: Te,
|
|
34
34
|
learnosityActivityRef: E,
|
|
35
35
|
learnosityItems: k,
|
|
36
|
-
learnosityResponses:
|
|
36
|
+
learnosityResponses: $e,
|
|
37
37
|
layout: T,
|
|
38
|
-
background:
|
|
38
|
+
background: _e,
|
|
39
39
|
behavior: a,
|
|
40
40
|
updatedResponses: G,
|
|
41
|
-
showNudgeBanner:
|
|
41
|
+
showNudgeBanner: Ee,
|
|
42
42
|
markedAsCompleted: te,
|
|
43
43
|
onResponseChange: I,
|
|
44
|
-
onBulkResponsesChange:
|
|
44
|
+
onBulkResponsesChange: ke,
|
|
45
45
|
onResponsesChange: L,
|
|
46
|
-
onMediaStateChange:
|
|
46
|
+
onMediaStateChange: z,
|
|
47
47
|
onTeacherValidation: ie,
|
|
48
|
-
onOptionalItemAssignment:
|
|
49
|
-
onOptionalItemSkip:
|
|
48
|
+
onOptionalItemAssignment: we,
|
|
49
|
+
onOptionalItemSkip: Ne,
|
|
50
50
|
onExitTicketStart: D,
|
|
51
51
|
onExitTicketSubmit: V,
|
|
52
|
-
onSubmit:
|
|
52
|
+
onSubmit: Ae,
|
|
53
53
|
learnosity: S,
|
|
54
54
|
appendedQuestionIds: ne,
|
|
55
|
-
worksheetCompleted:
|
|
56
|
-
userId:
|
|
57
|
-
onPublishStrokes:
|
|
58
|
-
onReceiveStrokes:
|
|
59
|
-
initialStrokesData:
|
|
55
|
+
worksheetCompleted: Be,
|
|
56
|
+
userId: We,
|
|
57
|
+
onPublishStrokes: Oe,
|
|
58
|
+
onReceiveStrokes: Re,
|
|
59
|
+
initialStrokesData: De,
|
|
60
60
|
isCanvasEnabled: oe,
|
|
61
|
-
onHelp:
|
|
62
|
-
onPublishMouseMove:
|
|
63
|
-
onSubscribeMouseMove:
|
|
64
|
-
onActiveQuestionChange:
|
|
65
|
-
openQuestionFeedbackModal:
|
|
66
|
-
summaryDescription:
|
|
61
|
+
onHelp: Ve,
|
|
62
|
+
onPublishMouseMove: Me,
|
|
63
|
+
onSubscribeMouseMove: xe,
|
|
64
|
+
onActiveQuestionChange: F,
|
|
65
|
+
openQuestionFeedbackModal: He,
|
|
66
|
+
summaryDescription: Pe,
|
|
67
67
|
canSubmitWorksheet: qe,
|
|
68
68
|
loggerRef: w,
|
|
69
|
-
canResolveDoubt:
|
|
70
|
-
onResolveDoubt:
|
|
71
|
-
onSkip:
|
|
72
|
-
onUnassign:
|
|
69
|
+
canResolveDoubt: Qe,
|
|
70
|
+
onResolveDoubt: Ge,
|
|
71
|
+
onSkip: Le,
|
|
72
|
+
onUnassign: ze,
|
|
73
73
|
onReview: Fe,
|
|
74
74
|
canToggleScribbling: je = !0,
|
|
75
75
|
studentId: Ue,
|
|
76
76
|
subjectiveProps: Ke,
|
|
77
77
|
canShowActionBar: Xe = !0
|
|
78
|
-
} =
|
|
79
|
-
containerStyle:
|
|
80
|
-
containerWidth:
|
|
81
|
-
minQuestionHeight:
|
|
82
|
-
minSummaryHeight:
|
|
83
|
-
questionsScrollable:
|
|
84
|
-
navigationBar:
|
|
85
|
-
topOffset:
|
|
86
|
-
renderSideBar:
|
|
87
|
-
showUserPointer:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
() => At(k, T),
|
|
78
|
+
} = Ie, { initialQuestion: Je, navigationMode: p, teacherValidationEnabled: j, maximumAttempts: re } = a, {
|
|
79
|
+
containerStyle: M,
|
|
80
|
+
containerWidth: Ye,
|
|
81
|
+
minQuestionHeight: se,
|
|
82
|
+
minSummaryHeight: Ze,
|
|
83
|
+
questionsScrollable: x,
|
|
84
|
+
navigationBar: et,
|
|
85
|
+
topOffset: H,
|
|
86
|
+
renderSideBar: tt,
|
|
87
|
+
showUserPointer: it = !0
|
|
88
|
+
} = T, ae = re === -2, { actionbarHeight: C, maxQuestionWidth: U, questionsContainerWidth: K } = Z(
|
|
89
|
+
() => Bt(k, T),
|
|
91
90
|
[T, k]
|
|
92
91
|
), [t] = v(
|
|
93
|
-
() =>
|
|
94
|
-
sectioned:
|
|
92
|
+
() => Wt(k, {
|
|
93
|
+
sectioned: j && p !== "ADAPTIVE" && p !== "CURRENT",
|
|
95
94
|
adaptive: p === "ADAPTIVE"
|
|
96
95
|
})
|
|
97
96
|
), [c, N] = v(
|
|
98
|
-
() =>
|
|
99
|
-
), [
|
|
100
|
-
() => p !== "OPEN" ?
|
|
97
|
+
() => $e ?? Ot(t)
|
|
98
|
+
), [ce, nt] = v(!1), h = Z(
|
|
99
|
+
() => p !== "OPEN" ? he({
|
|
101
100
|
questions: t,
|
|
102
101
|
responses: c,
|
|
103
102
|
behavior: a,
|
|
104
103
|
userType: s
|
|
105
104
|
}) : t.length - 1,
|
|
106
105
|
[a, p, t, c, s]
|
|
107
|
-
), l = t[h], r = c[(l == null ? void 0 : l.response_id) ?? ""], { bannerBackgroundColor:
|
|
108
|
-
() =>
|
|
106
|
+
), l = t[h], r = c[(l == null ? void 0 : l.response_id) ?? ""], { bannerBackgroundColor: ot, label: rt } = Vt(s, !!te), [A] = v(
|
|
107
|
+
() => Rt({
|
|
109
108
|
questions: t,
|
|
110
|
-
initialQuestion:
|
|
111
|
-
lastUnlockedQuestionIndex:
|
|
109
|
+
initialQuestion: Je,
|
|
110
|
+
lastUnlockedQuestionIndex: he({
|
|
112
111
|
questions: t,
|
|
113
112
|
responses: c,
|
|
114
113
|
behavior: a,
|
|
115
114
|
userType: s
|
|
116
115
|
}),
|
|
117
|
-
initialResponseId:
|
|
118
|
-
initialItemIndex:
|
|
116
|
+
initialResponseId: ye,
|
|
117
|
+
initialItemIndex: Te
|
|
119
118
|
})
|
|
120
|
-
), { activeQuestionId: B, setActiveQuestionId:
|
|
119
|
+
), { activeQuestionId: B, setActiveQuestionId: P, intersectionObserver: X } = Et(A), f = Z(
|
|
121
120
|
() => t.findIndex((e) => e.response_id === B),
|
|
122
121
|
[B, t]
|
|
123
|
-
), [g, J] = v(!1), [
|
|
122
|
+
), [g, J] = v(!1), [le, W] = v(), [de, ue] = v(!1), me = kt(a, c, B), st = y(
|
|
124
123
|
(e, i, n) => {
|
|
125
124
|
const d = i === "SIMULATION" ? "simState" : void 0;
|
|
126
125
|
d && (I ? N((u) => {
|
|
127
|
-
const m = e.response_id, $ =
|
|
126
|
+
const m = e.response_id, $ = ge(t, m);
|
|
128
127
|
if (!$) return u;
|
|
129
128
|
const _ = {
|
|
130
129
|
...$,
|
|
@@ -140,13 +139,13 @@ const Jt = (be, Ie) => {
|
|
|
140
139
|
...u,
|
|
141
140
|
[m]: _
|
|
142
141
|
};
|
|
143
|
-
}) :
|
|
142
|
+
}) : z && z(e, i, n));
|
|
144
143
|
},
|
|
145
|
-
[
|
|
146
|
-
),
|
|
144
|
+
[z, I, t]
|
|
145
|
+
), at = y(
|
|
147
146
|
(e, i) => {
|
|
148
147
|
N((n) => {
|
|
149
|
-
const d =
|
|
148
|
+
const d = ge(t, e);
|
|
150
149
|
return d ? {
|
|
151
150
|
...n,
|
|
152
151
|
[e]: {
|
|
@@ -168,42 +167,42 @@ const Jt = (be, Ie) => {
|
|
|
168
167
|
}, 50);
|
|
169
168
|
}
|
|
170
169
|
});
|
|
171
|
-
}, [h, t]),
|
|
170
|
+
}, [h, t]), q = y(
|
|
172
171
|
(e) => {
|
|
173
|
-
J(!1),
|
|
172
|
+
J(!1), x ? requestAnimationFrame(() => Q(e)) : P(e);
|
|
174
173
|
},
|
|
175
|
-
[
|
|
176
|
-
),
|
|
177
|
-
|
|
178
|
-
}, []), ct = y(() => {
|
|
179
|
-
de(!0);
|
|
174
|
+
[x, P]
|
|
175
|
+
), ct = y(() => {
|
|
176
|
+
ue(!1);
|
|
180
177
|
}, []), lt = y(() => {
|
|
178
|
+
ue(!0);
|
|
179
|
+
}, []), dt = y(() => {
|
|
181
180
|
J(!0);
|
|
182
181
|
}, []);
|
|
183
182
|
return b(() => {
|
|
184
183
|
const e = t[f];
|
|
185
|
-
e &&
|
|
186
|
-
}, [
|
|
184
|
+
e && F && F(e);
|
|
185
|
+
}, [F, t, f]), _t(Se, {
|
|
187
186
|
behavior: a,
|
|
188
187
|
questions: t,
|
|
189
188
|
setResponses: N,
|
|
190
189
|
onResponseChange: I,
|
|
191
|
-
onBulkResponsesChange:
|
|
192
|
-
getTimeSpentOnQuestion:
|
|
190
|
+
onBulkResponsesChange: ke,
|
|
191
|
+
getTimeSpentOnQuestion: me
|
|
193
192
|
}), b(() => () => {
|
|
194
|
-
|
|
195
|
-
}, [
|
|
193
|
+
X.disconnect();
|
|
194
|
+
}, [X]), b(() => {
|
|
196
195
|
L && c && L(c);
|
|
197
196
|
}, [L, c]), b(() => {
|
|
198
197
|
G && N(G);
|
|
199
|
-
}, [G]),
|
|
198
|
+
}, [G]), ht(() => {
|
|
200
199
|
let e;
|
|
201
|
-
return S && A && (
|
|
200
|
+
return S && A && (It().browser_name === "Safari" ? e = setTimeout(() => {
|
|
202
201
|
Q(A);
|
|
203
202
|
}, 400) : Q(A)), () => {
|
|
204
203
|
clearTimeout(e);
|
|
205
204
|
};
|
|
206
|
-
}, [S, A,
|
|
205
|
+
}, [S, A, H]), b(() => {
|
|
207
206
|
if (a.teacherValidationEnabled && l) {
|
|
208
207
|
const { item_type: e, instructor_stimulus: i, is_optional: n } = l;
|
|
209
208
|
s === "TEACHER" && (e === "exit-ticket" && i !== "SystemIntro" ? r != null && r.submittedByStudent && !(r != null && r.validatedByTeacher) ? W("exit-ticket-review-available") : r != null && r.validatedByTeacher ? O() : W("exit-ticket-teacher-intervention") : n ? r != null && r.assignStatus ? O() : W("optional-items-assignment") : n || O());
|
|
@@ -253,9 +252,9 @@ const Jt = (be, Ie) => {
|
|
|
253
252
|
}, [E, k, p]), b(() => {
|
|
254
253
|
t.forEach((e) => {
|
|
255
254
|
const { validation: i, item_reference: n, type: d, question_number: u, metadata: m } = e;
|
|
256
|
-
if ((
|
|
255
|
+
if ((j ? d !== "clozetext" : !0) && (i != null && i.valid_response)) {
|
|
257
256
|
const _ = i.valid_response.value ?? [];
|
|
258
|
-
(_ == null ? void 0 : _.length) === 0 && ((i.alt_responses ?? []).some((
|
|
257
|
+
(_ == null ? void 0 : _.length) === 0 && ((i.alt_responses ?? []).some((ut) => ut.value.length > 0) || (Y(`Question has no valid response: ${m.widget_reference}`, {
|
|
259
258
|
tags: {
|
|
260
259
|
"content-type": "learnosity",
|
|
261
260
|
"activity-reference": E,
|
|
@@ -265,7 +264,7 @@ const Jt = (be, Ie) => {
|
|
|
265
264
|
},
|
|
266
265
|
fingerprint: [`no-valid-response-${m.widget_reference}`]
|
|
267
266
|
// Add unique fingerprint
|
|
268
|
-
}), w.current(
|
|
267
|
+
}), w.current(vt.WORKSHEET_V3_QUESTION_MISSING_VALIDATION, {
|
|
269
268
|
item_reference: n,
|
|
270
269
|
widget_reference: m.widget_reference,
|
|
271
270
|
question_type: d,
|
|
@@ -273,8 +272,8 @@ const Jt = (be, Ie) => {
|
|
|
273
272
|
})));
|
|
274
273
|
}
|
|
275
274
|
});
|
|
276
|
-
}, [E, w, t,
|
|
277
|
-
|
|
275
|
+
}, [E, w, t, j]), S ? /* @__PURE__ */ R(mt, { children: [
|
|
276
|
+
Ee && /* @__PURE__ */ R(
|
|
278
277
|
qt,
|
|
279
278
|
{
|
|
280
279
|
$flexDirection: "row",
|
|
@@ -282,228 +281,223 @@ const Jt = (be, Ie) => {
|
|
|
282
281
|
$alignItems: "center",
|
|
283
282
|
$width: "100%",
|
|
284
283
|
$heightX: 1.75,
|
|
285
|
-
$height:
|
|
284
|
+
$height: pe,
|
|
286
285
|
$gap: 8,
|
|
287
286
|
$gutter: 8,
|
|
288
287
|
$flexGap: 8,
|
|
289
|
-
$background:
|
|
290
|
-
$topOffset: T.topOffset -
|
|
288
|
+
$background: ot,
|
|
289
|
+
$topOffset: T.topOffset - pe,
|
|
291
290
|
children: [
|
|
292
|
-
te ? /* @__PURE__ */ o(
|
|
293
|
-
/* @__PURE__ */ o(
|
|
291
|
+
te ? /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(gt, { width: 16, height: 16 }) }) : /* @__PURE__ */ o(be, { children: /* @__PURE__ */ o(bt, { width: 16, height: 16 }) }),
|
|
292
|
+
/* @__PURE__ */ o(Ct, { $renderAs: "ub3", children: rt })
|
|
294
293
|
]
|
|
295
294
|
}
|
|
296
295
|
),
|
|
297
|
-
/* @__PURE__ */ R(
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
296
|
+
/* @__PURE__ */ R(Qt, { $background: "WHITE_1", $width: Ye, children: [
|
|
297
|
+
et === "top" && /* @__PURE__ */ o(Gt, { $topOffset: H, $height: Tt, children: /* @__PURE__ */ o(Lt, { children: /* @__PURE__ */ o(
|
|
298
|
+
Mt,
|
|
299
|
+
{
|
|
300
|
+
placement: "top",
|
|
301
|
+
questions: t,
|
|
302
|
+
responses: c,
|
|
303
|
+
activeQuestionIndex: f,
|
|
304
|
+
lastUnlockedQuestionIndex: h,
|
|
305
|
+
behavior: a,
|
|
306
|
+
onItemNumberClick: q,
|
|
307
|
+
userType: s,
|
|
308
|
+
summaryVisible: g
|
|
309
|
+
}
|
|
310
|
+
) }) }),
|
|
311
|
+
le && l && /* @__PURE__ */ o(zt, { $minHeight: se, $topOffset: H, children: /* @__PURE__ */ o(fe, { $width: U, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ o(
|
|
312
|
+
At,
|
|
313
|
+
{
|
|
314
|
+
blocker: le,
|
|
315
|
+
lastUnlockedQuestion: l,
|
|
316
|
+
studentName: Ce,
|
|
317
|
+
onBlockerClose: O,
|
|
318
|
+
onOptionalItemAssignment: we,
|
|
319
|
+
onOptionalItemSkip: Ne,
|
|
320
|
+
onTeacherValidation: ie
|
|
321
|
+
}
|
|
322
|
+
) }) }),
|
|
323
|
+
it && /* @__PURE__ */ o(
|
|
324
|
+
yt,
|
|
325
|
+
{
|
|
326
|
+
activeQuestionIndex: f,
|
|
327
|
+
onClick: q,
|
|
328
|
+
questions: t,
|
|
329
|
+
bottomOffset: C,
|
|
330
|
+
topOffset: H,
|
|
331
|
+
userType: s
|
|
332
|
+
}
|
|
333
|
+
),
|
|
334
|
+
de && /* @__PURE__ */ o(Ft, { children: /* @__PURE__ */ o(St, { initialPosition: $t, onClose: ct }) }),
|
|
335
|
+
/* @__PURE__ */ R(
|
|
336
|
+
jt,
|
|
337
|
+
{
|
|
338
|
+
$marginTop: s === "TEACHER" && g ? "0" : C,
|
|
339
|
+
$height: C,
|
|
340
|
+
$isCardView: M === "card",
|
|
341
|
+
$isPuzzleCard: ae,
|
|
342
|
+
children: [
|
|
343
|
+
re !== -2 && /* @__PURE__ */ o(
|
|
344
|
+
wt,
|
|
345
|
+
{
|
|
346
|
+
width: K - 32,
|
|
347
|
+
question: t[f],
|
|
348
|
+
learnosity: S,
|
|
349
|
+
userType: s
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
Xe && /* @__PURE__ */ o(
|
|
353
|
+
Ut,
|
|
354
|
+
{
|
|
355
|
+
$height: C,
|
|
356
|
+
$width: M === "card" ? K - 32 : "100%",
|
|
357
|
+
$isCardView: M === "card",
|
|
358
|
+
children: /* @__PURE__ */ o(
|
|
359
|
+
fe,
|
|
359
360
|
{
|
|
360
|
-
$
|
|
361
|
-
$
|
|
362
|
-
$
|
|
361
|
+
$gutterX: 1,
|
|
362
|
+
$flexDirection: "row",
|
|
363
|
+
$justifyContent: "space-between",
|
|
364
|
+
$alignItems: "center",
|
|
365
|
+
$width: K - 32,
|
|
363
366
|
children: /* @__PURE__ */ o(
|
|
364
|
-
|
|
367
|
+
Nt,
|
|
365
368
|
{
|
|
366
|
-
$gutterX: 1,
|
|
367
|
-
$flexDirection: "row",
|
|
368
|
-
$justifyContent: "space-between",
|
|
369
|
-
$alignItems: "center",
|
|
370
|
-
$width: X - 32,
|
|
371
|
-
children: /* @__PURE__ */ o(
|
|
372
|
-
wt,
|
|
373
|
-
{
|
|
374
|
-
userType: s,
|
|
375
|
-
layout: T,
|
|
376
|
-
behavior: a,
|
|
377
|
-
worksheetName: ee,
|
|
378
|
-
questions: t,
|
|
379
|
-
responses: c,
|
|
380
|
-
onCalculatorOpen: ct,
|
|
381
|
-
activeQuestionIndex: f,
|
|
382
|
-
lastUnlockedQuestionIndex: h,
|
|
383
|
-
appendedQuestionIds: ne,
|
|
384
|
-
learnosity: S,
|
|
385
|
-
isCanvasEnabled: oe,
|
|
386
|
-
canSubmitWorksheet: qe,
|
|
387
|
-
isScribblingEnabled: ae,
|
|
388
|
-
isSummaryVisible: g,
|
|
389
|
-
setResponses: N,
|
|
390
|
-
getTimeSpentOnQuestion: ue,
|
|
391
|
-
setSummaryVisible: J,
|
|
392
|
-
setBlocker: W,
|
|
393
|
-
setIsScribblingEnabled: it,
|
|
394
|
-
setActiveQuestionId: q,
|
|
395
|
-
onItemNumberClick: P,
|
|
396
|
-
onGoToReview: lt,
|
|
397
|
-
onResponseChange: I,
|
|
398
|
-
onHelp: De,
|
|
399
|
-
onTeacherValidation: ie,
|
|
400
|
-
onSubmit: Ne,
|
|
401
|
-
showCalculator: le,
|
|
402
|
-
loggerRef: w,
|
|
403
|
-
onSkip: Ge,
|
|
404
|
-
onUnassign: Le,
|
|
405
|
-
onReview: Fe,
|
|
406
|
-
canToggleScribbling: je
|
|
407
|
-
}
|
|
408
|
-
)
|
|
409
|
-
}
|
|
410
|
-
)
|
|
411
|
-
}
|
|
412
|
-
),
|
|
413
|
-
!g && M && s === "STUDENT" && /* @__PURE__ */ o(Kt, { children: /* @__PURE__ */ o(Mt, {}) })
|
|
414
|
-
]
|
|
415
|
-
}
|
|
416
|
-
),
|
|
417
|
-
/* @__PURE__ */ R(
|
|
418
|
-
Xt,
|
|
419
|
-
{
|
|
420
|
-
$actionbarHeight: C,
|
|
421
|
-
$isCardView: H === "card",
|
|
422
|
-
children: [
|
|
423
|
-
Rt({ questions: t, lastUnlockedQuestionIndex: h, userType: s }).map(
|
|
424
|
-
(e, i) => {
|
|
425
|
-
var m, $;
|
|
426
|
-
const { response_id: n, is_optional: d } = e, u = (m = c[n]) == null ? void 0 : m.assignStatus;
|
|
427
|
-
return a.teacherValidationEnabled && (u === "skipped" || d && u !== "assigned" && s === "STUDENT") ? null : /* @__PURE__ */ o(
|
|
428
|
-
Ht,
|
|
429
|
-
{
|
|
430
|
-
signedRequest: Ce,
|
|
431
369
|
userType: s,
|
|
432
|
-
worksheetCompleted: Ae,
|
|
433
|
-
question: e,
|
|
434
|
-
response: c[n],
|
|
435
|
-
nextQuestionId: p === "ADAPTIVE" || p === "CURRENT" ? l == null ? void 0 : l.response_id : i < h ? ($ = t[i + 1]) == null ? void 0 : $.response_id : void 0,
|
|
436
|
-
maxQuestionWidth: K,
|
|
437
|
-
learnosity: S,
|
|
438
|
-
isActive: n === B,
|
|
439
|
-
isHidden: !M && n !== B || g,
|
|
440
|
-
canRender: f > -1 && (i === f || p !== "CURRENT" && i === f + 1),
|
|
441
|
-
background: $e,
|
|
442
|
-
appended: ne.includes(n),
|
|
443
|
-
behavior: a,
|
|
444
370
|
layout: T,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
onMediaStateChange: rt,
|
|
449
|
-
userId: Be,
|
|
450
|
-
isScribblingEnabled: ae,
|
|
451
|
-
onPublishStrokes: We,
|
|
452
|
-
onReceiveStrokes: Oe,
|
|
453
|
-
initialStrokesData: Re,
|
|
454
|
-
isCanvasEnabled: oe,
|
|
455
|
-
onPublishMouseMove: Ve,
|
|
456
|
-
onSubscribeMouseMove: He,
|
|
457
|
-
setActiveQuestionId: q,
|
|
458
|
-
canResolveDoubt: Pe,
|
|
459
|
-
onResolveDoubt: Qe,
|
|
460
|
-
studentId: Ue,
|
|
461
|
-
subjectiveProps: Ke,
|
|
371
|
+
behavior: a,
|
|
372
|
+
worksheetName: ee,
|
|
373
|
+
questions: t,
|
|
462
374
|
responses: c,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
375
|
+
onCalculatorOpen: lt,
|
|
376
|
+
activeQuestionIndex: f,
|
|
377
|
+
lastUnlockedQuestionIndex: h,
|
|
378
|
+
appendedQuestionIds: ne,
|
|
379
|
+
learnosity: S,
|
|
380
|
+
isCanvasEnabled: oe,
|
|
381
|
+
canSubmitWorksheet: qe,
|
|
382
|
+
isScribblingEnabled: ce,
|
|
383
|
+
isSummaryVisible: g,
|
|
384
|
+
setResponses: N,
|
|
385
|
+
getTimeSpentOnQuestion: me,
|
|
386
|
+
setSummaryVisible: J,
|
|
387
|
+
setBlocker: W,
|
|
388
|
+
setIsScribblingEnabled: nt,
|
|
389
|
+
setActiveQuestionId: P,
|
|
390
|
+
onItemNumberClick: q,
|
|
391
|
+
onGoToReview: dt,
|
|
392
|
+
onResponseChange: I,
|
|
393
|
+
onHelp: Ve,
|
|
394
|
+
onTeacherValidation: ie,
|
|
395
|
+
onSubmit: Ae,
|
|
396
|
+
showCalculator: de,
|
|
397
|
+
loggerRef: w,
|
|
398
|
+
onSkip: Le,
|
|
399
|
+
onUnassign: ze,
|
|
400
|
+
onReview: Fe,
|
|
401
|
+
canToggleScribbling: je
|
|
402
|
+
}
|
|
403
|
+
)
|
|
467
404
|
}
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
),
|
|
408
|
+
!g && x && s === "STUDENT" && /* @__PURE__ */ o(Kt, { children: /* @__PURE__ */ o(Ht, {}) })
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ R(
|
|
413
|
+
Xt,
|
|
414
|
+
{
|
|
415
|
+
$actionbarHeight: C,
|
|
416
|
+
$isCardView: M === "card",
|
|
417
|
+
$isPuzzleCard: ae,
|
|
418
|
+
children: [
|
|
419
|
+
Dt({ questions: t, lastUnlockedQuestionIndex: h, userType: s }).map(
|
|
420
|
+
(e, i) => {
|
|
421
|
+
var m, $;
|
|
422
|
+
const { response_id: n, is_optional: d } = e, u = (m = c[n]) == null ? void 0 : m.assignStatus;
|
|
423
|
+
return a.teacherValidationEnabled && (u === "skipped" || d && u !== "assigned" && s === "STUDENT") ? null : /* @__PURE__ */ o(
|
|
424
|
+
xt,
|
|
471
425
|
{
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
426
|
+
signedRequest: ve,
|
|
427
|
+
userType: s,
|
|
428
|
+
worksheetCompleted: Be,
|
|
429
|
+
question: e,
|
|
430
|
+
response: c[n],
|
|
431
|
+
nextQuestionId: p === "ADAPTIVE" || p === "CURRENT" ? l == null ? void 0 : l.response_id : i < h ? ($ = t[i + 1]) == null ? void 0 : $.response_id : void 0,
|
|
432
|
+
maxQuestionWidth: U,
|
|
433
|
+
learnosity: S,
|
|
434
|
+
isActive: n === B,
|
|
435
|
+
isHidden: !x && n !== B || g,
|
|
436
|
+
canRender: f > -1 && (i === f || p !== "CURRENT" && i === f + 1),
|
|
437
|
+
background: _e,
|
|
438
|
+
appended: ne.includes(n),
|
|
478
439
|
behavior: a,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
440
|
+
layout: T,
|
|
441
|
+
actionbarHeight: C,
|
|
442
|
+
intersectionObserver: X,
|
|
443
|
+
onMarkForReview: at,
|
|
444
|
+
onMediaStateChange: st,
|
|
445
|
+
userId: We,
|
|
446
|
+
isScribblingEnabled: ce,
|
|
447
|
+
onPublishStrokes: Oe,
|
|
448
|
+
onReceiveStrokes: Re,
|
|
449
|
+
initialStrokesData: De,
|
|
450
|
+
isCanvasEnabled: oe,
|
|
451
|
+
onPublishMouseMove: Me,
|
|
452
|
+
onSubscribeMouseMove: xe,
|
|
453
|
+
setActiveQuestionId: P,
|
|
454
|
+
canResolveDoubt: Qe,
|
|
455
|
+
onResolveDoubt: Ge,
|
|
456
|
+
studentId: Ue,
|
|
457
|
+
subjectiveProps: Ke,
|
|
458
|
+
responses: c,
|
|
459
|
+
loggerRef: w
|
|
460
|
+
},
|
|
461
|
+
n
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
),
|
|
465
|
+
g && /* @__PURE__ */ o(
|
|
466
|
+
Jt,
|
|
467
|
+
{
|
|
468
|
+
worksheetName: ee,
|
|
469
|
+
questions: t,
|
|
470
|
+
responses: c,
|
|
471
|
+
activeQuestionIndex: f,
|
|
472
|
+
lastUnlockedQuestionIndex: h,
|
|
473
|
+
onItemNumberClick: q,
|
|
474
|
+
behavior: a,
|
|
475
|
+
minHeight: Ze,
|
|
476
|
+
summaryDescription: Pe,
|
|
477
|
+
summaryVisible: g
|
|
478
|
+
}
|
|
479
|
+
)
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
),
|
|
483
|
+
!g && tt && /* @__PURE__ */ o(
|
|
484
|
+
Pt,
|
|
485
|
+
{
|
|
486
|
+
questionWidth: U,
|
|
487
|
+
questions: t,
|
|
488
|
+
activeQuestionIndex: f,
|
|
489
|
+
learnosity: S,
|
|
490
|
+
userType: s,
|
|
491
|
+
height: se,
|
|
492
|
+
actionbarHeight: C,
|
|
493
|
+
openQuestionFeedbackModal: He,
|
|
494
|
+
loggerRef: w
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
] })
|
|
504
498
|
] }) : null;
|
|
505
|
-
},
|
|
499
|
+
}, Ei = ft(pt(Yt));
|
|
506
500
|
export {
|
|
507
|
-
|
|
501
|
+
Ei as default
|
|
508
502
|
};
|
|
509
503
|
//# sourceMappingURL=worksheet.js.map
|