@cuemath/leap 3.2.15-beta-0.1 → 3.2.15

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