@cuemath/leap 3.5.47-gg6 → 3.5.48-link.0

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 (126) hide show
  1. package/dist/assets/line-icons/icons/bulb.js +10 -10
  2. package/dist/assets/line-icons/icons/bulb.js.map +1 -1
  3. package/dist/assets/line-icons/icons/hand.js.map +1 -1
  4. package/dist/assets/line-icons/icons/scribble.js +36 -13
  5. package/dist/assets/line-icons/icons/scribble.js.map +1 -1
  6. package/dist/assets/line-icons/icons/sticker.js +9 -9
  7. package/dist/assets/line-icons/icons/sticker.js.map +1 -1
  8. package/dist/features/analytics-events/whitelist-events.js +14 -16
  9. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  10. package/dist/features/circle-games/games/web-view/web-view-analytics-events.js.map +1 -1
  11. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -1
  12. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +6 -6
  13. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
  14. package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +2 -2
  15. package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -1
  16. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +29 -64
  17. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  18. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +9 -9
  19. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
  20. package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +8 -5
  21. package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
  22. package/dist/features/trial-session/comps/school-goals/school-goals-view.js +35 -32
  23. package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
  24. package/dist/features/trial-session/comps/school-goals/school-goals.js +47 -45
  25. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  26. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +44 -51
  27. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
  28. package/dist/features/trial-session/comps/test-prep/test-prep.js +39 -46
  29. package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
  30. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +120 -144
  31. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  32. package/dist/features/trial-session/helper.js +49 -54
  33. package/dist/features/trial-session/helper.js.map +1 -1
  34. package/dist/features/trial-session/hooks/use-slide-config-update.js +65 -62
  35. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -1
  36. package/dist/features/trial-session/trial-session-view.js +45 -48
  37. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  38. package/dist/features/ui/tabs/tabs.js +15 -15
  39. package/dist/features/ui/tabs/tabs.js.map +1 -1
  40. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +1 -0
  41. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
  42. package/dist/features/worksheet/worksheet/constants.js +13 -12
  43. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  44. package/dist/features/worksheet/worksheet/question-tips.js +100 -0
  45. package/dist/features/worksheet/worksheet/question-tips.js.map +1 -0
  46. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +109 -40
  47. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
  48. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +7 -7
  49. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
  50. package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js +4 -4
  51. package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js.map +1 -1
  52. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  53. package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js +22 -17
  54. package/dist/features/worksheet/worksheet/worksheet-question/subjective-styled.js.map +1 -1
  55. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +24 -23
  56. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  57. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +220 -192
  58. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  59. package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js +53 -0
  60. package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js.map +1 -0
  61. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +103 -73
  62. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
  63. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +251 -213
  64. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  65. package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js +20 -33
  66. package/dist/features/worksheet/worksheet/worksheet-sidebar/navigator.js.map +1 -1
  67. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +112 -0
  68. package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +1 -0
  69. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +61 -0
  70. package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -0
  71. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js +91 -0
  72. package/dist/features/worksheet/worksheet/worksheet-sidebar/worksheet-sidebar-styled.js.map +1 -0
  73. package/dist/features/worksheet/worksheet/worksheet-store.js +132 -138
  74. package/dist/features/worksheet/worksheet/worksheet-store.js.map +1 -1
  75. package/dist/features/worksheet/worksheet/worksheet-styled.js +83 -29
  76. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  77. package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js +24 -45
  78. package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
  79. package/dist/features/worksheet/worksheet/worksheet-types.js +2 -3
  80. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  81. package/dist/features/worksheet/worksheet/worksheet-view.js +99 -88
  82. package/dist/features/worksheet/worksheet/worksheet-view.js.map +1 -1
  83. package/dist/features/worksheet/worksheet/worksheet.js +95 -96
  84. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  85. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +29 -29
  86. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  87. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  88. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  89. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +24 -24
  90. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  91. package/dist/index.d.ts +14 -32
  92. package/dist/index.js +745 -760
  93. package/dist/index.js.map +1 -1
  94. package/dist/types/models/worksheet.js +1 -2
  95. package/dist/types/models/worksheet.js.map +1 -1
  96. package/package.json +1 -1
  97. package/dist/assets/line-icons/icons/chevron-up.js +0 -28
  98. package/dist/assets/line-icons/icons/chevron-up.js.map +0 -1
  99. package/dist/assets/line-icons/icons/close.js +0 -28
  100. package/dist/assets/line-icons/icons/close.js.map +0 -1
  101. package/dist/assets/line-icons/icons/cursor2.js +0 -24
  102. package/dist/assets/line-icons/icons/cursor2.js.map +0 -1
  103. package/dist/assets/line-icons/icons/hints.js +0 -25
  104. package/dist/assets/line-icons/icons/hints.js.map +0 -1
  105. package/dist/assets/line-icons/icons/question-feedback.js +0 -30
  106. package/dist/assets/line-icons/icons/question-feedback.js.map +0 -1
  107. package/dist/assets/line-icons/icons/teaching-tools.js +0 -40
  108. package/dist/assets/line-icons/icons/teaching-tools.js.map +0 -1
  109. package/dist/assets/line-icons/icons/tval-question.js +0 -32
  110. package/dist/assets/line-icons/icons/tval-question.js.map +0 -1
  111. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game-analytics-events.js +0 -11
  112. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game-analytics-events.js.map +0 -1
  113. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js +0 -49
  114. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar-styled.js.map +0 -1
  115. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js +0 -184
  116. package/dist/features/worksheet/worksheet/worksheet-questions-tools/questions-toolbar/questions-toolbar.js.map +0 -1
  117. package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js +0 -65
  118. package/dist/features/worksheet/worksheet/worksheet-questions-tools/scribble-switch.js.map +0 -1
  119. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js +0 -9
  120. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-styled.js.map +0 -1
  121. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js +0 -38
  122. package/dist/features/worksheet/worksheet/worksheet-questions-tools/worksheet-questions-tools.js.map +0 -1
  123. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js +0 -19
  124. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools-styled.js.map +0 -1
  125. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js +0 -66
  126. package/dist/features/worksheet/worksheet/worksheet-teaching-tools/worksheet-teaching-tools.js.map +0 -1
@@ -1,321 +1,359 @@
1
- import { jsxs as ht, jsx as i } from "react/jsx-runtime";
2
- import { deepEqual as bt } from "../../../../node_modules/fast-equals/dist/esm/index.js";
3
- import { memo as St, useState as xt, useCallback as yt, useMemo as Ct, useEffect as j } from "react";
4
- import vt from "../../../../assets/line-icons/icons/check2.js";
5
- import At from "../../../../assets/line-icons/icons/skip.js";
6
- import s from "../../../ui/buttons/button/button.js";
7
- import P from "../../../ui/buttons/icon-button/icon-button.js";
8
- import It from "../../../ui/layout/flex-view.js";
9
- import gt from "./use-handler-callbacks.js";
10
- import { useWorksheetStore as Tt } from "../hooks/use-worksheet-store.js";
11
- import Et from "../worksheet-sidebar/navigator.js";
12
- const Xt = St(
13
- function(F) {
1
+ import { jsxs as Rt, jsx as i } from "react/jsx-runtime";
2
+ import { deepEqual as Dt } from "../../../../node_modules/fast-equals/dist/esm/index.js";
3
+ import { memo as zt, useState as Q, useEffect as y, useMemo as Qt } from "react";
4
+ import Ut from "../../../../assets/line-icons/icons/check2.js";
5
+ import Nt from "../../../../assets/line-icons/icons/hand.js";
6
+ import Vt from "../../../../assets/line-icons/icons/question.js";
7
+ import Lt from "../../../../assets/line-icons/icons/skip.js";
8
+ import r from "../../../ui/buttons/button/button.js";
9
+ import x from "../../../ui/buttons/icon-button/icon-button.js";
10
+ import Wt from "../../../ui/layout/flex-view.js";
11
+ import Ht from "./use-handler-callbacks.js";
12
+ import { useWorksheetStore as Mt } from "../hooks/use-worksheet-store.js";
13
+ const ne = zt(
14
+ function(st) {
15
+ var et, nt, it;
14
16
  const {
15
- behavior: h,
16
- question: u,
17
- questions: E,
18
- userType: m,
19
- response: t,
20
- responses: p,
21
- questionIndex: _,
22
- lastUnlockedQuestionIndex: G,
23
- learnosity: q,
24
- onSkip: b,
25
- canSubmitWorksheet: Q,
26
- actionBarRightElement: R,
27
- onSubmit: k,
28
- isQuestionAppended: B
29
- } = Tt((e) => {
30
- const c = e.questions[e.activeQuestionIndex];
31
- return {
32
- behavior: e.behavior,
33
- question: c,
34
- questions: e.questions,
35
- userType: e.userType,
36
- response: e.responses[c.response_id],
37
- responses: e.responses,
38
- questionIndex: e.activeQuestionIndex,
39
- lastUnlockedQuestionIndex: e.lastUnlockedQuestionIndex,
40
- learnosity: e.learnosity,
41
- onSkip: e.onSkip,
42
- canSubmitWorksheet: e.canSubmitWorksheet,
43
- actionBarRightElement: e.actionBarRightElement,
44
- isQuestionAppended: e.appendedQuestionIds.includes(c.response_id),
45
- onSubmit: e.onSubmit
46
- };
47
- }), z = _ <= G, { getTimeSpentOnQuestion: O } = F, {
48
- navigationMode: S,
49
- canAttempt: a,
50
- checkButtonLabel: J,
51
- retryButtonLabel: K,
52
- validation: l,
53
- maximumAttempts: x,
54
- canExceedAttempts: D,
55
- teacherValidationEnabled: N,
56
- canTeacherValidate: r,
57
- skippable: U
58
- } = h, { response_id: V, item_type: Y, type: y, instructor_stimulus: Z, is_optional: w } = u, C = Z === "SystemIntro", v = Y === "exit-ticket", [W, L] = xt(!1), H = yt(() => {
59
- k == null || k(p);
60
- }, [k, p]), {
61
- checkButton: f,
62
- checkButtonDisabled: tt,
63
- retryButton: A,
64
- nextButton: et,
65
- nextButtonDisabled: nt,
66
- startButton: it,
67
- readyButton: ot,
68
- validateButton: st,
69
- skipSectionButton: at,
70
- submitAttemptButton: X,
71
- skipButton: rt
72
- } = Ct(() => {
73
- const e = r && w && (t == null ? void 0 : t.assignStatus) === "assigned", c = () => {
74
- var $;
75
- if (x === -2)
76
- return {};
77
- if (!a)
17
+ behavior: C,
18
+ questions: U,
19
+ userType: d,
20
+ responses: N,
21
+ questionIndex: V,
22
+ lastUnlockedQuestionIndex: at,
23
+ learnosity: T,
24
+ onSkip: A,
25
+ canSubmitWorksheet: L,
26
+ actionBarRightElement: W
27
+ } = Mt((e) => ({
28
+ behavior: e.behavior,
29
+ questions: e.questions,
30
+ userType: e.userType,
31
+ responses: e.responses,
32
+ questionIndex: e.activeQuestionIndex,
33
+ lastUnlockedQuestionIndex: e.lastUnlockedQuestionIndex,
34
+ learnosity: e.learnosity,
35
+ onSkip: e.onSkip,
36
+ canSubmitWorksheet: e.canSubmitWorksheet,
37
+ actionBarRightElement: e.actionBarRightElement
38
+ })), H = V <= at, { question: l, isQuestionAppended: m, response: t, getTimeSpentOnQuestion: rt, onSubmit: ut } = st, {
39
+ navigationMode: I,
40
+ canAttempt: o,
41
+ hints: lt,
42
+ checkButtonLabel: ct,
43
+ retryButtonLabel: dt,
44
+ validation: c,
45
+ maximumAttempts: g,
46
+ canExceedAttempts: M,
47
+ teacherValidationEnabled: X,
48
+ canTeacherValidate: u,
49
+ hintsTimer: v,
50
+ skippableTime: $,
51
+ skippable: j
52
+ } = C, { response_id: E, item_type: mt, type: _, instructor_stimulus: Bt, is_optional: P } = l, p = lt ? ((it = (nt = (et = T.question(E)) == null ? void 0 : et.getMetadata()) == null ? void 0 : nt.hints) == null ? void 0 : it.length) ?? 0 : 0, q = Bt === "SystemIntro", w = mt === "exit-ticket", B = o && p - ((t == null ? void 0 : t.hintsUsed) ?? 0) > 0, [s, F] = Q(!1), [G, O] = Q(!1), [J, f] = Q(!1);
53
+ y(() => {
54
+ if (v && B) {
55
+ const e = setTimeout(() => {
56
+ F(!0);
57
+ }, v * 1e3);
58
+ return () => clearTimeout(e);
59
+ }
60
+ F(B);
61
+ }, [v, B]), y(() => {
62
+ const e = !(t != null && t.response) && !(t != null && t.skipped);
63
+ if (j)
64
+ if (p > 0 && !B)
65
+ f(e);
66
+ else if (p === 0 && e) {
67
+ const S = setTimeout(
68
+ () => {
69
+ f(e);
70
+ },
71
+ ($ ?? 0) * 1e3
72
+ );
73
+ return () => clearTimeout(S);
74
+ } else
75
+ f(!1);
76
+ }, [p, B, t, j, $]);
77
+ const {
78
+ checkButton: k,
79
+ checkButtonDisabled: kt,
80
+ hintsButton: K,
81
+ retryButton: b,
82
+ nextButton: ht,
83
+ nextButtonDisabled: pt,
84
+ startButton: ft,
85
+ readyButton: bt,
86
+ validateButton: St,
87
+ skipSectionButton: yt,
88
+ submitAttemptButton: Y,
89
+ skipButton: xt
90
+ } = Qt(() => {
91
+ const e = u && P && (t == null ? void 0 : t.assignStatus) === "assigned", S = () => {
92
+ var ot;
93
+ if (g === -2)
94
+ return d === "STUDENT" && o ? {
95
+ hintsButton: s
96
+ } : {};
97
+ if (!o)
78
98
  return {
79
99
  nextButton: !0
80
100
  };
81
- if (!l && h.navigationMode === "LINEAR")
101
+ if (!c && C.navigationMode === "LINEAR")
82
102
  return {
83
103
  nextButton: !0,
84
- nextButtonDisabled: t != null && t.skipped ? !1 : !(t != null && t.response),
85
- skipButton: U && !(t != null && t.response) && !(t != null && t.skipped)
104
+ nextButtonDisabled: !(t != null && t.response),
105
+ hintsButton: s,
106
+ skipButton: J
86
107
  };
87
- if (!l)
108
+ if (!c)
88
109
  return {
89
- nextButton: !0
110
+ nextButton: !0,
111
+ hintsButton: s
90
112
  };
91
113
  if (!t || !t.response || !t.score)
92
114
  return {
93
115
  checkButton: !0,
94
- checkButtonDisabled: !0
116
+ checkButtonDisabled: !0,
117
+ hintsButton: s
95
118
  };
96
- const { responseEdited: d, score: o, attemptsHistory: n } = t, T = ((n == null ? void 0 : n.length) ?? 0) >= x;
97
- if (T && !D)
119
+ const { responseEdited: h, score: a, attemptsHistory: n } = t, z = ((n == null ? void 0 : n.length) ?? 0) >= g;
120
+ if (z && !M)
98
121
  return {
99
122
  nextButton: !0
100
123
  };
101
- if (d) {
102
- const ft = ($ = n == null ? void 0 : n.slice(-1)[0]) == null ? void 0 : $.response;
124
+ if (h) {
125
+ const wt = (ot = n == null ? void 0 : n.slice(-1)[0]) == null ? void 0 : ot.response;
103
126
  return {
104
- nextButton: T,
127
+ nextButton: z,
105
128
  checkButton: !0,
106
- checkButtonDisabled: bt(t.response, ft)
129
+ checkButtonDisabled: Dt(t.response, wt),
130
+ hintsButton: s
107
131
  };
108
132
  }
109
- return (o.score ?? 0) < o.max_score ? {
110
- nextButton: T,
111
- retryButton: !0
112
- } : (o.score ?? 0) === o.max_score ? {
133
+ return (a.score ?? 0) < a.max_score ? {
134
+ nextButton: z,
135
+ retryButton: !0,
136
+ hintsButton: s
137
+ } : (a.score ?? 0) === a.max_score ? {
113
138
  nextButton: !0
114
139
  } : {};
115
- }, Bt = () => E.some(({ response_id: d }) => {
116
- const { assignStatus: o, validatedByTeacher: n } = p[d] ?? {};
117
- return o === "skipped" ? !1 : n !== !0;
140
+ }, qt = () => U.some(({ response_id: h }) => {
141
+ const { assignStatus: a, validatedByTeacher: n } = N[h] ?? {};
142
+ return a === "skipped" ? !1 : n !== !0;
118
143
  });
119
- if (N) {
120
- const { validatedByTeacher: d } = t ?? {};
121
- if (S === "ADAPTIVE" || S === "CURRENT")
122
- return m === "STUDENT" ? {
144
+ if (X) {
145
+ const { validatedByTeacher: h } = t ?? {};
146
+ if (I === "ADAPTIVE" || I === "CURRENT")
147
+ return d === "STUDENT" ? {
148
+ hintsButton: s,
123
149
  validateButton: !1
124
150
  } : {
125
151
  validateButton: !1
126
152
  };
127
- if (d)
153
+ if (h)
128
154
  return {
129
155
  validateButton: !0,
130
- submitAttemptButton: r && a && m === "STUDENT" && Q ? !Bt() : !1
156
+ submitAttemptButton: u && o && d === "STUDENT" && L ? !qt() : !1
131
157
  };
132
- if (!z)
158
+ if (!H)
133
159
  return {};
134
- if (m === "STUDENT")
135
- return C ? {
136
- startButton: r && a
137
- } : y !== "clozetext" ? {
138
- ...c(),
160
+ if (d === "STUDENT")
161
+ return q ? {
162
+ startButton: u && o
163
+ } : _ !== "clozetext" ? {
164
+ ...S(),
139
165
  nextButton: !1
140
166
  } : {
141
- readyButton: r && v && !(t != null && t.submittedByStudent)
167
+ hintsButton: s,
168
+ readyButton: u && w && !(t != null && t.submittedByStudent)
142
169
  };
143
- if (C)
170
+ if (q)
144
171
  return {
145
172
  skipSectionButton: e
146
173
  };
147
- if (y !== "clozetext") {
148
- const { responseEdited: o, score: n } = t ?? {};
174
+ if (_ !== "clozetext") {
175
+ const { responseEdited: a, score: n } = t ?? {};
149
176
  return {
150
177
  skipSectionButton: e,
151
- validateButton: o || !r ? !1 : !!(n != null && n.score && (n != null && n.max_score) && !((n.score ?? 0) < n.max_score))
178
+ validateButton: a || !u ? !1 : !!(n != null && n.score && (n != null && n.max_score) && !((n.score ?? 0) < n.max_score))
152
179
  };
153
180
  }
154
181
  return {
155
182
  skipSectionButton: e,
156
- validateButton: r && (v ? t == null ? void 0 : t.submittedByStudent : !0)
183
+ validateButton: u && (w ? t == null ? void 0 : t.submittedByStudent : !0)
157
184
  };
158
185
  }
159
- return c();
186
+ return S();
160
187
  }, [
161
- r,
162
- w,
188
+ u,
189
+ P,
163
190
  t,
164
- N,
165
- a,
166
- l,
167
- h.navigationMode,
168
- x,
169
- D,
191
+ X,
192
+ o,
193
+ c,
194
+ C.navigationMode,
195
+ g,
196
+ M,
197
+ s,
198
+ J,
170
199
  U,
171
- E,
172
- p,
173
- S,
174
- z,
175
- m,
176
- C,
177
- y,
178
- v,
179
- Q
200
+ N,
201
+ I,
202
+ H,
203
+ d,
204
+ q,
205
+ _,
206
+ w,
207
+ L
180
208
  ]), {
181
- handleResponseChange: I,
182
- handleBackButtonClick: M,
183
- handleNextButtonClick: g,
184
- handleCheckButtonClick: ut,
185
- handleRetryButtonClick: lt,
186
- handleValidateButtonClick: ct,
187
- handleStartButtonClick: dt,
188
- handleSkipSectionButtonClick: mt,
189
- handleReadyButtonClick: pt,
190
- handleSkipButtonClick: kt
191
- } = gt({
192
- question: u,
193
- setSkipped: L,
194
- getTimeSpentOnQuestion: O
209
+ handleResponseChange: R,
210
+ handleHelpButtonClick: Z,
211
+ handleBackButtonClick: tt,
212
+ handleNextButtonClick: D,
213
+ handleCheckButtonClick: Ct,
214
+ handleRetryButtonClick: Tt,
215
+ handleHintButtonClick: At,
216
+ handleValidateButtonClick: It,
217
+ handleStartButtonClick: gt,
218
+ handleSkipSectionButtonClick: vt,
219
+ handleReadyButtonClick: Et,
220
+ handleSkipButtonClick: _t
221
+ } = Ht({
222
+ question: l,
223
+ setSkipped: O,
224
+ getTimeSpentOnQuestion: rt
195
225
  });
196
- return j(() => {
197
- W && (L(!1), g(), b && b(u.item_display_number, u.question_number));
226
+ return y(() => {
227
+ G && (O(!1), f(!1), D(), A && A(l.item_display_number, l.question_number));
198
228
  }, [
199
- g,
200
- b,
201
- u.item_display_number,
202
- u.question_number,
203
- W
204
- ]), j(() => {
205
- const e = B ? q.question(V) : void 0;
206
- return e && a && (!l || f) && (e.on("changed", I), e.enable()), () => {
207
- e && a && (!l || f) && (e.off("changed", I), e.disable());
229
+ D,
230
+ A,
231
+ l.item_display_number,
232
+ l.question_number,
233
+ G
234
+ ]), y(() => {
235
+ const e = m ? T.question(E) : void 0;
236
+ return e && o && (!c || k) && (e.on("changed", R), e.enable()), () => {
237
+ e && o && (!c || k) && (e.off("changed", R), e.disable());
208
238
  };
209
239
  }, [
210
- a,
211
- f,
212
- I,
213
- B,
214
- q,
215
- V,
216
- l
217
- ]), /* @__PURE__ */ ht(
218
- It,
240
+ o,
241
+ k,
242
+ R,
243
+ m,
244
+ T,
245
+ E,
246
+ c
247
+ ]), /* @__PURE__ */ Rt(
248
+ Wt,
219
249
  {
250
+ $background: "WHITE",
220
251
  $flexDirection: "row",
221
252
  $flexGapX: 0.5,
222
253
  $alignItems: "center",
223
254
  $justifyContent: "flex-end",
224
- style: {
225
- pointerEvents: "all"
226
- },
227
255
  children: [
228
- M && /* @__PURE__ */ i(
229
- s,
256
+ K && /* @__PURE__ */ i(
257
+ x,
258
+ {
259
+ Icon: Vt,
260
+ analyticsLabel: "Hint",
261
+ renderAs: "secondary",
262
+ disabled: !m,
263
+ onClick: At
264
+ }
265
+ ),
266
+ !K && Z && (k || b) && /* @__PURE__ */ i(
267
+ x,
268
+ {
269
+ Icon: Nt,
270
+ analyticsLabel: "Ask for help",
271
+ renderAs: "secondary",
272
+ onClick: Z
273
+ }
274
+ ),
275
+ tt && /* @__PURE__ */ i(
276
+ r,
230
277
  {
231
278
  widthX: 6,
232
279
  renderAs: "secondary",
233
280
  size: "small",
234
281
  label: "Back",
235
- disabled: _ === 0,
236
- onClick: M
282
+ disabled: V === 0,
283
+ onClick: tt
237
284
  }
238
285
  ),
239
- rt && /* @__PURE__ */ i(
240
- s,
286
+ xt && /* @__PURE__ */ i(
287
+ r,
241
288
  {
242
289
  widthX: 6,
243
- renderAs: A ? "secondary" : "primary",
290
+ renderAs: b ? "secondary" : "primary",
244
291
  size: "small",
245
292
  label: "Skip",
246
- onClick: kt
293
+ onClick: _t
247
294
  }
248
295
  ),
249
- et && /* @__PURE__ */ i(
250
- s,
296
+ ht && /* @__PURE__ */ i(
297
+ r,
251
298
  {
252
299
  widthX: 6,
253
- renderAs: A ? "secondary" : "primary",
300
+ renderAs: b ? "secondary" : "primary",
254
301
  size: "small",
255
302
  label: "Next",
256
- onClick: g,
257
- disabled: nt === !0
303
+ onClick: D,
304
+ disabled: pt === !0
258
305
  }
259
306
  ),
260
- A && /* @__PURE__ */ i(
261
- s,
307
+ b && /* @__PURE__ */ i(
308
+ r,
262
309
  {
263
310
  widthX: 6,
264
311
  renderAs: "primary",
265
312
  size: "small",
266
- label: K,
267
- disabled: !B,
268
- onClick: lt
313
+ label: dt,
314
+ disabled: !m,
315
+ onClick: Tt
269
316
  }
270
317
  ),
271
- f && /* @__PURE__ */ i(
272
- s,
318
+ k && /* @__PURE__ */ i(
319
+ r,
273
320
  {
274
321
  renderAs: "primary",
275
322
  size: "small",
276
- label: J,
277
- disabled: tt === !0 || !B,
278
- onClick: ut
323
+ label: ct,
324
+ disabled: kt === !0 || !m,
325
+ onClick: Ct
279
326
  }
280
327
  ),
281
- it && /* @__PURE__ */ i(s, { renderAs: "primary", size: "small", label: "Start", onClick: dt }),
282
- ot && /* @__PURE__ */ i(s, { renderAs: "primary", size: "small", label: "Submit", onClick: pt }),
283
- at && /* @__PURE__ */ i(
284
- P,
328
+ ft && /* @__PURE__ */ i(r, { renderAs: "primary", size: "small", label: "Start", onClick: gt }),
329
+ bt && /* @__PURE__ */ i(r, { renderAs: "primary", size: "small", label: "Submit", onClick: Et }),
330
+ yt && /* @__PURE__ */ i(
331
+ x,
285
332
  {
286
333
  renderAs: "primary",
287
- Icon: At,
334
+ Icon: Lt,
288
335
  analyticsLabel: "Skip Section",
289
- onClick: mt
336
+ onClick: vt
290
337
  }
291
338
  ),
292
- !X && st && /* @__PURE__ */ i(
293
- P,
339
+ !Y && St && /* @__PURE__ */ i(
340
+ x,
294
341
  {
295
342
  renderAs: "primary",
296
- Icon: vt,
343
+ Icon: Ut,
297
344
  disabled: t == null ? void 0 : t.validatedByTeacher,
298
345
  analyticsLabel: "Validate",
299
- onClick: ct
300
- }
301
- ),
302
- X && /* @__PURE__ */ i(
303
- s,
304
- {
305
- renderAs: "primary",
306
- size: "small",
307
- label: "Submit",
308
- onClick: H
346
+ onClick: It
309
347
  }
310
348
  ),
311
- R && R,
312
- /* @__PURE__ */ i(Et, {})
349
+ Y && /* @__PURE__ */ i(r, { renderAs: "primary", size: "small", label: "Submit", onClick: ut }),
350
+ W && W
313
351
  ]
314
352
  }
315
353
  );
316
354
  }
317
355
  );
318
356
  export {
319
- Xt as default
357
+ ne as default
320
358
  };
321
359
  //# sourceMappingURL=worksheet-questions-controller.js.map