@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.
Files changed (113) hide show
  1. package/dist/assets/illustrations/illustrations.js +6 -5
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +5 -0
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +2 -1
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +6 -4
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +9 -7
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
  12. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  13. package/dist/features/communication/pub-sub/constants.js +7 -4
  14. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  15. package/dist/features/homework/homework-card-view.js +85 -97
  16. package/dist/features/homework/homework-card-view.js.map +1 -1
  17. package/dist/features/homework/homework-card.js +44 -42
  18. package/dist/features/homework/homework-card.js.map +1 -1
  19. package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
  20. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  21. package/dist/features/homework/hw-card-list/hw-card-list.js +54 -48
  22. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  23. package/dist/features/homework/utils.js +33 -27
  24. package/dist/features/homework/utils.js.map +1 -1
  25. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
  26. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  27. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
  28. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
  29. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
  30. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
  31. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
  32. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
  33. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
  34. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
  35. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
  36. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
  37. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
  38. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
  39. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
  40. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
  41. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
  42. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
  43. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  44. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  45. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  46. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  47. package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
  48. package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
  49. package/dist/features/puzzles/app/puzzle-app-styled.js +10 -6
  50. package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
  51. package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
  52. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  53. package/dist/features/puzzles/comps/puzzle-card.js +79 -30
  54. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  55. package/dist/features/puzzles/constants/puzzle-container.js +8 -0
  56. package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
  57. package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
  58. package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
  59. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
  60. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  61. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
  62. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
  63. package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
  64. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  65. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
  66. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
  67. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +107 -0
  68. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
  69. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  70. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  71. package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
  72. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  73. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
  74. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
  75. package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
  76. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  77. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +16 -12
  78. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  79. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
  80. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  81. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +166 -163
  82. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  83. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
  84. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  85. package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
  86. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  87. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  88. package/dist/features/worksheet/worksheet/worksheet.js +303 -309
  89. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  90. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  91. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  92. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
  93. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  94. package/dist/index.d.ts +87 -4
  95. package/dist/index.js +285 -275
  96. package/dist/index.js.map +1 -1
  97. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
  98. package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
  99. package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
  100. package/dist/static/puzzle-orange-lottie.0a105c42.json +21206 -0
  101. package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
  102. package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
  103. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
  104. package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
  105. package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
  106. package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
  107. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
  108. package/package.json +1 -1
  109. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
  110. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
  111. package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
  112. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
  113. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -1,130 +1,129 @@
1
- import { jsxs as R, Fragment as ut, jsx as o } from "react/jsx-runtime";
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 mt, forwardRef as ft, useMemo as Z, useState as v, useCallback as y, useEffect as b, useLayoutEffect as pt } from "react";
4
- import ht from "../../../assets/line-icons/icons/check2.js";
5
- import gt from "../../../assets/line-icons/icons/info2.js";
6
- import bt from "../../../helpers/get-device-details.js";
7
- import It from "../../sheet-tools/desmos-calculator/desmos-calculator.js";
8
- import me from "../../ui/layout/flex-view.js";
9
- import St from "../../ui/text/text.js";
10
- import Ct from "../constants/events.js";
11
- import vt from "../user-pointer-pin/user-pin.js";
12
- import { WORKSHEET_NUDGE_BANNER_HEIGHT as fe, TOP_NAVIGATION_HEIGHT as yt, DESMOS_CALC_POSITION as Tt } from "./constants.js";
13
- import $t from "./hooks/use-create-imperative-handle.js";
14
- import _t from "./hooks/use-get-active-question-id.js";
15
- import Et from "./hooks/use-time-on-questions.js";
16
- import kt from "./question-tips.js";
17
- import wt from "./worksheet-action-bar/worksheet-action-bar.js";
18
- import Nt from "./worksheet-blocker/worksheet-blocker.js";
19
- import { getWorksheetDimensions as At, getQuestionsFromItems as Bt, getInitialResponses as Wt, getLastUnlockedQuestionIndex as pe, getInitialQuestionId as Ot, getQuestionMetadata as he, scrollToQuestion as Q, getRenderableQuestions as Rt, getWorksheetNudgeBannerInfo as Dt } from "./worksheet-helpers.js";
20
- import Vt from "./worksheet-navigation/worksheet-navigation.js";
21
- import Ht from "./worksheet-question/worksheet-question.js";
22
- import Mt from "./worksheet-sidebar/navigator.js";
23
- import xt from "./worksheet-sidebar/sidebar.js";
24
- import { NudgeBannerWrapper as qt, NudgeBannerIcon as ge, WorksheetContainer as Pt, NavigationContainer as Qt, NavigationWrapper as Gt, BlockerWrapper as Lt, DesmosCalcWrapper as Ft, ActionbarContainer as jt, ActionbarWrapper as Ut, StudentWorksheetSideBar as Kt, QuestionsWrapper as Xt } from "./worksheet-styled.js";
25
- import zt from "./worksheet-summary/worksheet-summary.js";
26
- const Jt = (be, Ie) => {
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: Se = "Student",
30
- questionsSignedRequest: Ce,
29
+ studentName: Ce = "Student",
30
+ questionsSignedRequest: ve,
31
31
  worksheetName: ee,
32
- initialResponseId: ve,
33
- initialItemIndex: ye,
32
+ initialResponseId: ye,
33
+ initialItemIndex: Te,
34
34
  learnosityActivityRef: E,
35
35
  learnosityItems: k,
36
- learnosityResponses: Te,
36
+ learnosityResponses: $e,
37
37
  layout: T,
38
- background: $e,
38
+ background: _e,
39
39
  behavior: a,
40
40
  updatedResponses: G,
41
- showNudgeBanner: _e,
41
+ showNudgeBanner: Ee,
42
42
  markedAsCompleted: te,
43
43
  onResponseChange: I,
44
- onBulkResponsesChange: Ee,
44
+ onBulkResponsesChange: ke,
45
45
  onResponsesChange: L,
46
- onMediaStateChange: F,
46
+ onMediaStateChange: z,
47
47
  onTeacherValidation: ie,
48
- onOptionalItemAssignment: ke,
49
- onOptionalItemSkip: we,
48
+ onOptionalItemAssignment: we,
49
+ onOptionalItemSkip: Ne,
50
50
  onExitTicketStart: D,
51
51
  onExitTicketSubmit: V,
52
- onSubmit: Ne,
52
+ onSubmit: Ae,
53
53
  learnosity: S,
54
54
  appendedQuestionIds: ne,
55
- worksheetCompleted: Ae,
56
- userId: Be,
57
- onPublishStrokes: We,
58
- onReceiveStrokes: Oe,
59
- initialStrokesData: Re,
55
+ worksheetCompleted: Be,
56
+ userId: We,
57
+ onPublishStrokes: Oe,
58
+ onReceiveStrokes: Re,
59
+ initialStrokesData: De,
60
60
  isCanvasEnabled: oe,
61
- onHelp: De,
62
- onPublishMouseMove: Ve,
63
- onSubscribeMouseMove: He,
64
- onActiveQuestionChange: j,
65
- openQuestionFeedbackModal: Me,
66
- summaryDescription: xe,
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: Pe,
70
- onResolveDoubt: Qe,
71
- onSkip: Ge,
72
- onUnassign: Le,
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
- } = be, { initialQuestion: ze, navigationMode: p, teacherValidationEnabled: U } = a, {
79
- containerStyle: H,
80
- containerWidth: Je,
81
- minQuestionHeight: re,
82
- minSummaryHeight: Ye,
83
- questionsScrollable: M,
84
- navigationBar: Ze,
85
- topOffset: x,
86
- renderSideBar: et,
87
- showUserPointer: tt = !0,
88
- imageHue: se
89
- } = T, { actionbarHeight: C, maxQuestionWidth: K, questionsContainerWidth: X } = Z(
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
- () => Bt(k, {
94
- sectioned: U && p !== "ADAPTIVE" && p !== "CURRENT",
92
+ () => Wt(k, {
93
+ sectioned: j && p !== "ADAPTIVE" && p !== "CURRENT",
95
94
  adaptive: p === "ADAPTIVE"
96
95
  })
97
96
  ), [c, N] = v(
98
- () => Te ?? Wt(t)
99
- ), [ae, it] = v(!1), h = Z(
100
- () => p !== "OPEN" ? pe({
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: nt, label: ot } = Dt(s, !!te), [A] = v(
108
- () => Ot({
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: ze,
111
- lastUnlockedQuestionIndex: pe({
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: ve,
118
- initialItemIndex: ye
116
+ initialResponseId: ye,
117
+ initialItemIndex: Te
119
118
  })
120
- ), { activeQuestionId: B, setActiveQuestionId: q, intersectionObserver: z } = _t(A), f = Z(
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), [ce, W] = v(), [le, de] = v(!1), ue = Et(a, c, B), rt = y(
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, $ = he(t, m);
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
- }) : F && F(e, i, n));
142
+ }) : z && z(e, i, n));
144
143
  },
145
- [F, I, t]
146
- ), st = y(
144
+ [z, I, t]
145
+ ), at = y(
147
146
  (e, i) => {
148
147
  N((n) => {
149
- const d = he(t, e);
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]), P = y(
170
+ }, [h, t]), q = y(
172
171
  (e) => {
173
- J(!1), M ? requestAnimationFrame(() => Q(e)) : q(e);
172
+ J(!1), x ? requestAnimationFrame(() => Q(e)) : P(e);
174
173
  },
175
- [M, q]
176
- ), at = y(() => {
177
- de(!1);
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 && j && j(e);
186
- }, [j, t, f]), $t(Ie, {
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: Ee,
192
- getTimeSpentOnQuestion: ue
190
+ onBulkResponsesChange: ke,
191
+ getTimeSpentOnQuestion: me
193
192
  }), b(() => () => {
194
- z.disconnect();
195
- }, [z]), b(() => {
193
+ X.disconnect();
194
+ }, [X]), b(() => {
196
195
  L && c && L(c);
197
196
  }, [L, c]), b(() => {
198
197
  G && N(G);
199
- }, [G]), pt(() => {
198
+ }, [G]), ht(() => {
200
199
  let e;
201
- return S && A && (bt().browser_name === "Safari" ? e = setTimeout(() => {
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, x]), b(() => {
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 ((U ? d !== "clozetext" : !0) && (i != null && i.valid_response)) {
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((dt) => dt.value.length > 0) || (Y(`Question has no valid response: ${m.widget_reference}`, {
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(Ct.WORKSHEET_V3_QUESTION_MISSING_VALIDATION, {
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, U]), S ? /* @__PURE__ */ R(ut, { children: [
277
- _e && /* @__PURE__ */ R(
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: fe,
284
+ $height: pe,
286
285
  $gap: 8,
287
286
  $gutter: 8,
288
287
  $flexGap: 8,
289
- $background: nt,
290
- $topOffset: T.topOffset - fe,
288
+ $background: ot,
289
+ $topOffset: T.topOffset - pe,
291
290
  children: [
292
- te ? /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(ht, { width: 16, height: 16 }) }) : /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(gt, { width: 16, height: 16 }) }),
293
- /* @__PURE__ */ o(St, { $renderAs: "ub3", children: ot })
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
- Pt,
299
- {
300
- $background: se ? `${se}_1` : "WHITE",
301
- $width: Je,
302
- children: [
303
- Ze === "top" && /* @__PURE__ */ o(Qt, { $topOffset: x, $height: yt, children: /* @__PURE__ */ o(Gt, { children: /* @__PURE__ */ o(
304
- Vt,
305
- {
306
- placement: "top",
307
- questions: t,
308
- responses: c,
309
- activeQuestionIndex: f,
310
- lastUnlockedQuestionIndex: h,
311
- behavior: a,
312
- onItemNumberClick: P,
313
- userType: s,
314
- summaryVisible: g
315
- }
316
- ) }) }),
317
- ce && l && /* @__PURE__ */ o(Lt, { $minHeight: re, $topOffset: x, children: /* @__PURE__ */ o(me, { $width: K, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ o(
318
- Nt,
319
- {
320
- blocker: ce,
321
- lastUnlockedQuestion: l,
322
- studentName: Se,
323
- onBlockerClose: O,
324
- onOptionalItemAssignment: ke,
325
- onOptionalItemSkip: we,
326
- onTeacherValidation: ie
327
- }
328
- ) }) }),
329
- tt && /* @__PURE__ */ o(
330
- vt,
331
- {
332
- activeQuestionIndex: f,
333
- onClick: P,
334
- questions: t,
335
- bottomOffset: C,
336
- topOffset: x,
337
- userType: s
338
- }
339
- ),
340
- le && /* @__PURE__ */ o(Ft, { children: /* @__PURE__ */ o(It, { initialPosition: Tt, onClose: at }) }),
341
- /* @__PURE__ */ R(
342
- jt,
343
- {
344
- $marginTop: s === "TEACHER" && g ? "0" : C,
345
- $height: C,
346
- $isCardView: H === "card",
347
- children: [
348
- /* @__PURE__ */ o(
349
- kt,
350
- {
351
- width: X - 32,
352
- question: t[f],
353
- learnosity: S,
354
- userType: s
355
- }
356
- ),
357
- Xe && /* @__PURE__ */ o(
358
- Ut,
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
- $height: C,
361
- $width: H === "card" ? X - 32 : "100%",
362
- $isCardView: H === "card",
361
+ $gutterX: 1,
362
+ $flexDirection: "row",
363
+ $justifyContent: "space-between",
364
+ $alignItems: "center",
365
+ $width: K - 32,
363
366
  children: /* @__PURE__ */ o(
364
- me,
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
- actionbarHeight: C,
446
- intersectionObserver: z,
447
- onMarkForReview: st,
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
- loggerRef: w
464
- },
465
- n
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
- g && /* @__PURE__ */ o(
470
- zt,
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
- worksheetName: ee,
473
- questions: t,
474
- responses: c,
475
- activeQuestionIndex: f,
476
- lastUnlockedQuestionIndex: h,
477
- onItemNumberClick: P,
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
- minHeight: Ye,
480
- summaryDescription: xe,
481
- summaryVisible: g
482
- }
483
- )
484
- ]
485
- }
486
- ),
487
- !g && et && /* @__PURE__ */ o(
488
- xt,
489
- {
490
- questionWidth: K,
491
- questions: t,
492
- activeQuestionIndex: f,
493
- learnosity: S,
494
- userType: s,
495
- height: re,
496
- actionbarHeight: C,
497
- openQuestionFeedbackModal: Me,
498
- loggerRef: w
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
- }, _i = mt(ft(Jt));
499
+ }, Ei = ft(pt(Yt));
506
500
  export {
507
- _i as default
501
+ Ei as default
508
502
  };
509
503
  //# sourceMappingURL=worksheet.js.map