@cuemath/leap 3.2.19-beta-0.1 → 3.2.19-link.1

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 (143) hide show
  1. package/dist/assets/illustrations/illustrations.js +6 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/star3.js +32 -0
  4. package/dist/assets/line-icons/icons/star3.js.map +1 -0
  5. package/dist/assets/lottie/lottie.js +0 -5
  6. package/dist/assets/lottie/lottie.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-student.js +1 -2
  8. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  9. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  10. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  11. package/dist/features/analytics-events/whitelist-events.js +8 -10
  12. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  13. package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
  14. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  15. package/dist/features/communication/pub-sub/constants.js +4 -7
  16. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  17. package/dist/features/homework/homework-card-view.js +97 -85
  18. package/dist/features/homework/homework-card-view.js.map +1 -1
  19. package/dist/features/homework/homework-card.js +42 -44
  20. package/dist/features/homework/homework-card.js.map +1 -1
  21. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  22. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  23. package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
  24. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  25. package/dist/features/homework/utils.js +27 -33
  26. package/dist/features/homework/utils.js.map +1 -1
  27. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  28. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  29. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  30. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  31. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  32. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  33. package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
  34. package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
  35. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  36. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  37. package/dist/features/puzzles/comps/puzzle-card.js +30 -79
  38. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  39. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  40. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  41. package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
  42. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  43. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  44. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  45. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  46. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  47. package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
  48. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
  49. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
  50. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
  51. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  52. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
  53. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
  54. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
  55. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
  56. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
  57. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
  58. package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
  59. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
  60. package/dist/features/ui/accordion/accordion.js +62 -0
  61. package/dist/features/ui/accordion/accordion.js.map +1 -0
  62. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  63. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  64. package/dist/features/ui/inputs/text-input/text-input.js +19 -18
  65. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  66. package/dist/features/ui/modals/modal-styled.js +42 -8
  67. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  68. package/dist/features/ui/modals/modal.js +37 -27
  69. package/dist/features/ui/modals/modal.js.map +1 -1
  70. package/dist/features/ui/text/text.js +31 -29
  71. package/dist/features/ui/text/text.js.map +1 -1
  72. package/dist/features/ui/theme/clrs.js +2 -0
  73. package/dist/features/ui/theme/clrs.js.map +1 -1
  74. package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
  75. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  76. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
  77. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  78. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
  79. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  80. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
  81. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  82. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  83. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  84. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
  85. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  86. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  87. package/dist/features/worksheet/worksheet/worksheet.js +313 -307
  88. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  89. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  90. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  91. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  92. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  93. package/dist/index.d.ts +71 -89
  94. package/dist/index.js +626 -626
  95. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
  96. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
  97. package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
  98. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
  99. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
  100. package/dist/static/stripe-blurple.6abf422f.svg +1 -0
  101. package/package.json +1 -1
  102. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  103. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  104. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  105. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  106. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  107. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  108. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  109. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  110. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  111. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  112. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  113. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  114. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  115. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  116. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  117. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  118. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  119. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  120. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  121. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  122. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  123. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  124. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  125. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  126. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  127. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  128. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
  129. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  130. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  131. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  132. package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
  133. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  134. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  135. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  136. package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
  137. package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
  138. package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
  139. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
  140. package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
  141. package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
  142. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  143. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +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