@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.
Files changed (51) hide show
  1. package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -14
  2. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  3. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +7 -7
  4. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  5. package/dist/features/auth/login/login-styled.js +9 -9
  6. package/dist/features/auth/login/login-styled.js.map +1 -1
  7. package/dist/features/hooks/use-viewport/use-viewport.js +8 -16
  8. package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -1
  9. package/dist/features/ui/theme/constants.js +11 -0
  10. package/dist/features/ui/theme/constants.js.map +1 -0
  11. package/dist/features/ui/theme/get-device.js +6 -0
  12. package/dist/features/ui/theme/get-device.js.map +1 -0
  13. package/dist/features/ui/theme/get-theme.js +23 -21
  14. package/dist/features/ui/theme/get-theme.js.map +1 -1
  15. package/dist/features/ui/theme/layout.js +5 -3
  16. package/dist/features/ui/theme/layout.js.map +1 -1
  17. package/dist/features/ui/theme/media-queries.js +11 -0
  18. package/dist/features/ui/theme/media-queries.js.map +1 -0
  19. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +43 -45
  20. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
  21. package/dist/features/worksheet/worksheet/worksheet-helpers.js +84 -98
  22. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  23. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +66 -66
  24. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  25. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +75 -78
  26. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
  27. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +202 -268
  28. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  29. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +20 -21
  30. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -1
  31. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  32. package/dist/features/worksheet/worksheet/worksheet.js +354 -378
  33. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  34. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +18 -20
  35. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  36. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +25 -33
  37. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  38. package/dist/features/worksheet/worksheet-preview/worksheet-preview-styled.js +15 -22
  39. package/dist/features/worksheet/worksheet-preview/worksheet-preview-styled.js.map +1 -1
  40. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +66 -85
  41. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  42. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +32 -51
  43. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  44. package/dist/index.d.ts +7 -26
  45. package/dist/index.js +32 -34
  46. package/dist/index.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/features/ui/theme/device.js +0 -5
  49. package/dist/features/ui/theme/device.js.map +0 -1
  50. package/dist/features/utils/media.js +0 -16
  51. package/dist/features/utils/media.js.map +0 -1
@@ -1,153 +1,149 @@
1
- import { jsxs as D, Fragment as ft, jsx as r } from "react/jsx-runtime";
2
- import { captureMessage as ee } from "@sentry/browser";
3
- import { memo as ht, forwardRef as pt, useMemo as te, useState as $, useCallback as y, useEffect as b, useLayoutEffect as gt } from "react";
4
- import bt from "../../../assets/line-icons/icons/check2.js";
5
- import It from "../../../assets/line-icons/icons/info2.js";
6
- import St from "../../../helpers/get-device-details.js";
7
- import Ct from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
8
- import ie from "../../ui/layout/flex-view.js";
9
- import fe from "../../ui/text/text.js";
10
- import $t from "../constants/events.js";
11
- import yt from "../user-pointer-pin/user-pin.js";
12
- import { WORKSHEET_NUDGE_BANNER_HEIGHT as he, TOP_NAVIGATION_HEIGHT as Tt, DESMOS_CALC_POSITION as _t } from "./constants.js";
13
- import vt from "./hooks/use-create-imperative-handle.js";
14
- import kt from "./hooks/use-get-active-question-id.js";
15
- import Et 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 pe, getInitialQuestionId as Rt, getQuestionMetadata as ge, scrollToQuestion as G, getRenderableQuestions as Dt, getWorksheetNudgeBannerInfo as Vt } from "./worksheet-helpers.js";
20
- import Ht from "./worksheet-navigation/worksheet-navigation.js";
21
- import Mt from "./worksheet-question/worksheet-question.js";
22
- import xt from "./worksheet-sidebar/navigator.js";
23
- import qt from "./worksheet-sidebar/sidebar.js";
24
- import { NudgeBannerWrapper as Qt, NudgeBannerIcon as be, WorksheetContainer as Pt, NavigationContainer as Gt, NavigationWrapper as Lt, BlockerWrapper as Ft, DesmosCalcWrapper as jt, ActionbarContainer as Ut, ActionbarWrapper as Xt, StudentWorksheetSideBar as Kt, QuestionsWrapper as zt } from "./worksheet-styled.js";
25
- import Jt from "./worksheet-summary/worksheet-summary.js";
26
- const Yt = (Ie, Se) => {
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: Ce = "Student",
30
- questionsSignedRequest: $e,
31
- worksheetName: L,
32
- initialResponseId: ye,
33
- initialItemIndex: Te,
34
- learnosityActivityRef: E,
35
- learnosityItems: w,
36
- learnosityResponses: _e,
37
- layout: T,
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: F,
41
- showNudgeBanner: ke,
42
- markedAsCompleted: ne,
40
+ updatedResponses: G,
41
+ showNudgeBanner: $e,
42
+ markedAsCompleted: te,
43
43
  onResponseChange: I,
44
44
  onBulkResponsesChange: Ee,
45
- onResponsesChange: j,
46
- onMediaStateChange: U,
47
- onTeacherValidation: re,
48
- onOptionalItemAssignment: we,
49
- onOptionalItemSkip: Ne,
50
- onExitTicketStart: V,
51
- onExitTicketSubmit: H,
52
- onSubmit: Ae,
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: oe,
55
- worksheetCompleted: Be,
56
- userId: We,
57
- onPublishStrokes: Oe,
58
- onReceiveStrokes: Re,
59
- initialStrokesData: De,
60
- isCanvasEnabled: se,
61
- onHelp: Ve,
62
- onPublishMouseMove: He,
63
- onSubscribeMouseMove: Me,
64
- onActiveQuestionChange: X,
65
- openQuestionFeedbackModal: xe,
66
- summaryDescription: qe,
67
- canSubmitWorksheet: Qe,
68
- loggerRef: N,
69
- canResolveDoubt: Pe,
70
- onResolveDoubt: Ge,
71
- onSkip: Le,
72
- onUnassign: Fe,
73
- canToggleScribbling: je = !0,
74
- studentId: Ue,
75
- subjectiveProps: Xe,
76
- canShowActionBar: Ke = !0
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: Je,
80
- minQuestionHeight: ae,
81
- minSummaryHeight: Ye,
82
- questionsScrollable: x,
83
- navigationBar: Ze,
84
- topOffset: q,
85
- renderSideBar: et,
86
- showUserPointer: tt = !0,
87
- imageHue: _,
88
- renderSheetHeader: it,
89
- renderQuestionFeedback: nt
90
- } = T, { actionbarHeight: C, maxQuestionWidth: z, questionsContainerWidth: J } = te(
91
- () => Bt(w, T),
92
- [T, w]
93
- ), [t] = $(
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, A] = $(
99
- () => _e ?? Ot(t)
100
- ), [ce, rt] = $(!1), p = te(
101
- () => h !== "OPEN" ? pe({
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, h, t, c, s]
108
- ), l = t[p], o = c[(l == null ? void 0 : l.response_id) ?? ""], { bannerBackgroundColor: ot, label: st } = Vt(s, !!ne), [B] = $(
109
- () => Rt({
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: ze,
112
- lastUnlockedQuestionIndex: pe({
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: ye,
119
- initialItemIndex: Te
114
+ initialResponseId: Ce,
115
+ initialItemIndex: ye
120
116
  })
121
- ), { activeQuestionId: W, setActiveQuestionId: Q, intersectionObserver: Y } = kt(B), f = te(
122
- () => t.findIndex((e) => e.response_id === W),
123
- [W, t]
124
- ), [g, Z] = $(!1), [le, O] = $(), [de, ue] = $(!1), me = Et(a, c, W), at = y(
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 ? A((u) => {
128
- const m = e.response_id, v = ge(t, m);
129
- if (!v) return u;
130
- const k = {
131
- ...v,
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: k,
133
+ response: E,
138
134
  isNewAttempt: !1,
139
135
  question: e
140
136
  }), {
141
137
  ...u,
142
- [m]: k
138
+ [m]: E
143
139
  };
144
- }) : U && U(e, i, n));
140
+ }) : F && F(e, i, n));
145
141
  },
146
- [U, I, t]
147
- ), ct = y(
142
+ [F, I, t]
143
+ ), nt = T(
148
144
  (e, i) => {
149
- A((n) => {
150
- const d = ge(t, e);
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
- ), R = y(() => {
163
- O((e) => {
158
+ ), O = T(() => {
159
+ W((e) => {
164
160
  var i;
165
161
  if (e) {
166
- const n = (i = t[p]) == null ? void 0 : i.response_id;
162
+ const n = (i = t[h]) == null ? void 0 : i.response_id;
167
163
  n && setTimeout(() => {
168
- G(n);
164
+ Q(n);
169
165
  }, 50);
170
166
  }
171
167
  });
172
- }, [p, t]), P = y(
168
+ }, [h, t]), P = T(
173
169
  (e) => {
174
- Z(!1), x ? requestAnimationFrame(() => G(e)) : Q(e);
170
+ J(!1), H ? requestAnimationFrame(() => Q(e)) : q(e);
175
171
  },
176
- [x, Q]
177
- ), lt = y(() => {
178
- ue(!1);
179
- }, []), dt = y(() => {
180
- ue(!0);
181
- }, []), ut = y(() => {
182
- Z(!0);
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 && X && X(e);
187
- }, [X, t, f]), vt(Se, {
182
+ e && j && j(e);
183
+ }, [j, t, f]), yt(be, {
188
184
  behavior: a,
189
185
  questions: t,
190
- setResponses: A,
186
+ setResponses: N,
191
187
  onResponseChange: I,
192
188
  onBulkResponsesChange: Ee,
193
- getTimeSpentOnQuestion: me
189
+ getTimeSpentOnQuestion: de
194
190
  }), b(() => () => {
195
- Y.disconnect();
196
- }, [Y]), b(() => {
197
- j && c && j(c);
198
- }, [j, c]), b(() => {
199
- F && A(F);
200
- }, [F]), gt(() => {
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 && B && (St().browser_name === "Safari" ? e = setTimeout(() => {
203
- G(B);
204
- }, 400) : G(B)), () => {
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, B, q]), b(() => {
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" ? o != null && o.submittedByStudent && !(o != null && o.validatedByTeacher) ? O("exit-ticket-review-available") : o != null && o.validatedByTeacher ? R() : O("exit-ticket-teacher-intervention") : n ? o != null && o.assignStatus ? R() : O("optional-items-assignment") : n || R());
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
- R,
210
+ O,
215
211
  l,
216
- o,
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" && (o != null && o.submittedByStudent ? H == null || H() : V == null || V());
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
- o == null ? void 0 : o.submittedByStudent,
222
+ r == null ? void 0 : r.submittedByStudent,
223
+ D,
227
224
  V,
228
- H,
229
225
  s
230
226
  ]), b(() => {
231
- h === "CURRENT" && w.forEach(({ reference: e, questions: i }) => {
227
+ p === "CURRENT" && k.forEach(({ reference: e, questions: i }) => {
232
228
  var n, d, u;
233
- i.length < 3 ? ee(`Diagnostics item has Less than 3 questions: ${e}`, {
229
+ i.length < 3 ? Y(`Diagnostics item has Less than 3 questions: ${e}`, {
234
230
  tags: {
235
231
  "content-type": "learnosity",
236
- "activity-reference": E,
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") && ee(
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": E,
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
- }, [E, w, h]), b(() => {
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 k = i.valid_response.value ?? [];
259
- (k == null ? void 0 : k.length) === 0 && ((i.alt_responses ?? []).some((mt) => mt.value.length > 0) || (ee(`Question has no valid response: ${m.widget_reference}`, {
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": E,
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
- }), N.current($t.WORKSHEET_V3_QUESTION_MISSING_VALIDATION, {
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
- }, [E, N, t, K]), S ? /* @__PURE__ */ D(ft, { children: [
278
- ke && /* @__PURE__ */ D(
279
- Qt,
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: he,
282
+ $height: me,
287
283
  $gap: 8,
288
284
  $gutter: 8,
289
285
  $flexGap: 8,
290
- $background: ot,
291
- $topOffset: T.topOffset - he,
286
+ $background: et,
287
+ $topOffset: v.topOffset - me,
292
288
  children: [
293
- ne ? /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(bt, { width: 16, height: 16 }) }) : /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(It, { width: 16, height: 16 }) }),
294
- /* @__PURE__ */ r(fe, { $renderAs: "ub3", children: st })
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__ */ D(
299
- Pt,
300
- {
301
- $background: _ ? `${_}_1` : "WHITE",
302
- $width: Je,
303
- children: [
304
- it && /* @__PURE__ */ r(
305
- ie,
306
- {
307
- $background: _ && `${_}_3`,
308
- $heightX: 3.75,
309
- $alignItems: "center",
310
- $justifyContent: "center",
311
- $borderColor: _ && `${_}_4`,
312
- children: /* @__PURE__ */ r(fe, { $renderAs: "ab2", children: L })
313
- }
314
- ),
315
- Ze === "top" && /* @__PURE__ */ r(Gt, { $topOffset: q, $height: Tt, children: /* @__PURE__ */ r(Lt, { children: /* @__PURE__ */ r(
316
- Ht,
317
- {
318
- placement: "top",
319
- questions: t,
320
- responses: c,
321
- activeQuestionIndex: f,
322
- lastUnlockedQuestionIndex: p,
323
- behavior: a,
324
- onItemNumberClick: P,
325
- userType: s,
326
- summaryVisible: g
327
- }
328
- ) }) }),
329
- le && l && /* @__PURE__ */ r(Ft, { $minHeight: ae, $topOffset: q, children: /* @__PURE__ */ r(ie, { $width: z, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ r(
330
- At,
331
- {
332
- blocker: le,
333
- lastUnlockedQuestion: l,
334
- studentName: Ce,
335
- onBlockerClose: R,
336
- onOptionalItemAssignment: we,
337
- onOptionalItemSkip: Ne,
338
- onTeacherValidation: re
339
- }
340
- ) }) }),
341
- tt && /* @__PURE__ */ r(
342
- yt,
343
- {
344
- activeQuestionIndex: f,
345
- onClick: P,
346
- questions: t,
347
- bottomOffset: C,
348
- topOffset: q,
349
- userType: s
350
- }
351
- ),
352
- de && /* @__PURE__ */ r(jt, { children: /* @__PURE__ */ r(Ct, { initialPosition: _t, onClose: lt }) }),
353
- /* @__PURE__ */ D(
354
- Ut,
355
- {
356
- $marginTop: s === "TEACHER" && g ? "0" : C,
357
- $height: C,
358
- $isCardView: M === "card",
359
- children: [
360
- /* @__PURE__ */ r(
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
- $height: C,
373
- $width: M === "card" ? J - 32 : "100%",
374
- $isCardView: M === "card",
375
- children: /* @__PURE__ */ r(
376
- ie,
377
- {
378
- $gutterX: 1,
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
- worksheetCompleted: Be,
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
- layout: T,
456
- actionbarHeight: C,
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
- loggerRef: N
475
- },
476
- n
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
- g && /* @__PURE__ */ r(
481
- Jt,
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
- worksheetName: L,
484
- questions: t,
485
- responses: c,
486
- activeQuestionIndex: f,
487
- lastUnlockedQuestionIndex: p,
488
- onItemNumberClick: P,
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
- minHeight: Ye,
491
- summaryDescription: qe,
492
- summaryVisible: g
493
- }
494
- )
495
- ]
496
- }
497
- ),
498
- !g && et && /* @__PURE__ */ r(
499
- qt,
500
- {
501
- questionWidth: z,
502
- questions: t,
503
- activeQuestionIndex: f,
504
- learnosity: S,
505
- userType: s,
506
- height: ae,
507
- actionbarHeight: C,
508
- openQuestionFeedbackModal: xe,
509
- loggerRef: N,
510
- renderQuestionFeedback: nt
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
- }, ki = ht(pt(Yt));
493
+ }, Ti = lt(dt(Ut));
518
494
  export {
519
- ki as default
495
+ Ti as default
520
496
  };
521
497
  //# sourceMappingURL=worksheet.js.map