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