@cuemath/leap 3.1.12-as1 → 3.1.12

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.
@@ -1,6 +1,6 @@
1
1
  import o from "styled-components";
2
2
  const s = o.div(
3
- ({ theme: { colors: a, zIndex: t }, $isClosing: i }) => `
3
+ ({ theme: { colors: a }, $isClosing: t }) => `
4
4
  position: fixed;
5
5
  top: 0;
6
6
  left: 0;
@@ -9,9 +9,8 @@ const s = o.div(
9
9
  background-color: ${a.BLACK_T_60};
10
10
  backdrop-filter: blur(40px);
11
11
  display: flex;
12
- animation: ${i ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
13
- z-index: ${t.MODAL};
14
-
12
+ animation: ${t ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
13
+
15
14
  @keyframes backdropFadeIn {
16
15
  from {
17
16
  opacity: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO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 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n \n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":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AiBX,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAE,EAAA,MAAiB;AAAA;AAAA,WAEXM,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDP,IACI;AAAA;AAAA,4BAEoBQ,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as T, jsx as e, Fragment as Kt } from "react/jsx-runtime";
2
- import { memo as Vt, useMemo as R, useState as A, useRef as U, useCallback as Xt, useEffect as E, useLayoutEffect as Pt } from "react";
2
+ import { memo as Vt, useMemo as R, useState as A, useRef as K, useCallback as Xt, useEffect as E, useLayoutEffect as Pt } from "react";
3
3
  import { IMAGES as jt } from "../../../../assets/images/images.js";
4
4
  import Gt from "../../../cue-canvas/cue-canvas.js";
5
5
  import Yt from "../../../pointer-sync/pointer.js";
@@ -26,55 +26,55 @@ const Ai = Vt(
26
26
  nextQuestionId: v,
27
27
  isActive: S,
28
28
  isHidden: M,
29
- canRender: K,
29
+ canRender: V,
30
30
  loggerRef: O,
31
31
  appended: a,
32
- maxQuestionWidth: V,
33
- behavior: X,
34
- layout: P,
32
+ maxQuestionWidth: X,
33
+ behavior: P,
34
+ layout: j,
35
35
  actionbarHeight: yt,
36
36
  learnosity: w,
37
- intersectionObserver: j,
38
- background: G = "paper",
37
+ intersectionObserver: G,
38
+ background: Y = "paper",
39
39
  onMediaStateChange: Bt,
40
40
  onMarkForReview: xt,
41
41
  userId: It,
42
- onPublishStrokes: Y,
43
- onReceiveStrokes: Z,
44
- isScribblingEnabled: J,
42
+ onPublishStrokes: Z,
43
+ onReceiveStrokes: J,
44
+ isScribblingEnabled: q,
45
45
  initialStrokesData: N,
46
- isCanvasEnabled: q,
47
- onPublishMouseMove: k,
48
- onSubscribeMouseMove: tt,
49
- setActiveQuestionId: it,
46
+ isCanvasEnabled: k,
47
+ onPublishMouseMove: tt,
48
+ onSubscribeMouseMove: it,
49
+ setActiveQuestionId: et,
50
50
  canResolveDoubt: Lt,
51
51
  onResolveDoubt: Tt,
52
52
  studentId: At,
53
53
  responses: Mt,
54
- subjectiveProps: et
54
+ subjectiveProps: rt
55
55
  }) => {
56
56
  const C = R(
57
- () => G === "paper" ? qt(n) : void 0,
58
- [G, n]
59
- ), [y, Ot] = A(), [rt, Nt] = A(), {
60
- validation: ot,
57
+ () => Y === "paper" ? qt(n) : void 0,
58
+ [Y, n]
59
+ ), [y, Ot] = A(), [ot, Nt] = A(), {
60
+ validation: nt,
61
61
  review: Q,
62
- maximumAttempts: nt,
63
- canExceedAttempts: ct,
62
+ maximumAttempts: ct,
63
+ canExceedAttempts: at,
64
64
  teacherValidationEnabled: H,
65
- solutionHidden: at
66
- } = X, { minQuestionHeight: Qt, topOffset: st, questionsScrollable: B } = P, {
65
+ solutionHidden: st
66
+ } = P, { minQuestionHeight: Qt, topOffset: mt, questionsScrollable: B } = j, {
67
67
  type: _,
68
68
  response_id: r,
69
69
  stimulus_review: $,
70
70
  item_type: h,
71
- instructor_stimulus: mt,
72
- metadata: { hints: d, solution: b, widget_reference: lt },
73
- item_reference: ut,
74
- question_number: ft,
75
- item_number: ht,
76
- item_display_number: dt
77
- } = n, gt = !!$, x = h === "overview", l = kt(mt), g = mt === "SystemIntro", Et = l || g, _t = i == null ? void 0 : i.responseEdited, Ft = R(() => {
71
+ instructor_stimulus: lt,
72
+ metadata: { hints: d, solution: b, widget_reference: ut },
73
+ item_reference: ft,
74
+ question_number: ht,
75
+ item_number: dt,
76
+ item_display_number: gt
77
+ } = n, Et = !!$, x = h === "overview", l = kt(lt), g = lt === "SystemIntro", F = l || g, _t = i == null ? void 0 : i.responseEdited, Ft = R(() => {
78
78
  const t = [];
79
79
  return _t && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), _ === "hotspot" && t.push("correct-answers-hidden"), a && H && _ === "clozetext" && (!l || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), l && t.push("concept-intro"), g && t.push("system-intro"), t.join(" ");
80
80
  }, [
@@ -86,16 +86,16 @@ const Ai = Vt(
86
86
  _t,
87
87
  H,
88
88
  c
89
- ]), F = U({}), I = (i == null ? void 0 : i.hintsUsed) ?? 0, [$t] = A((i == null ? void 0 : i.validatedByTeacher) ?? !1), L = U(null), z = U(null), D = R(() => d == null ? void 0 : d.slice(0, I), [d, I]), pt = R(() => c === "TEACHER" || f ? !0 : !i || !i.response || i.responseEdited ? !1 : ot, [i, c, ot, f]), Rt = R(() => {
89
+ ]), z = K({}), I = (i == null ? void 0 : i.hintsUsed) ?? 0, [$t] = A((i == null ? void 0 : i.validatedByTeacher) ?? !1), L = K(null), D = K(null), U = R(() => d == null ? void 0 : d.slice(0, I), [d, I]), pt = R(() => c === "TEACHER" || f ? !0 : !i || !i.response || i.responseEdited ? !1 : nt, [i, c, nt, f]), Rt = R(() => {
90
90
  if (c === "TEACHER") return !0;
91
91
  if (Q) {
92
92
  const { attemptsHistory: t } = i ?? {};
93
- return ((t == null ? void 0 : t.length) ?? 0) >= nt && !ct;
93
+ return ((t == null ? void 0 : t.length) ?? 0) >= ct && !at;
94
94
  }
95
95
  return !1;
96
- }, [ct, nt, i, Q, c]), zt = R(
97
- () => b && f && !at,
98
- [at, b, f]
96
+ }, [at, ct, i, Q, c]), zt = R(
97
+ () => b && f && !st,
98
+ [st, b, f]
99
99
  ), [vt, Dt] = A({
100
100
  width: 0,
101
101
  height: 0
@@ -103,8 +103,8 @@ const Ai = Vt(
103
103
  Nt(t);
104
104
  }, []);
105
105
  return E(() => {
106
- L.current && j.observe(L.current);
107
- }, [j]), E(() => {
106
+ L.current && G.observe(L.current);
107
+ }, [G]), E(() => {
108
108
  if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
109
109
  const t = document.querySelectorAll(
110
110
  `.widget-${n.response_id} .lrn_draggable`
@@ -125,44 +125,44 @@ const Ai = Vt(
125
125
  });
126
126
  }
127
127
  }, [a, w, r, Q, Rt, c, pt]), E(() => {
128
- const t = z.current;
129
- if (a && t && O.current && F.current[r] === void 0 && !l && !g) {
128
+ const t = D.current;
129
+ if (a && t && O.current && z.current[r] === void 0 && !l && !g) {
130
130
  const s = t.clientWidth, o = t.querySelectorAll("*");
131
131
  for (let m = 0; m < o.length; m++) {
132
132
  const u = o[m];
133
133
  if (u != null && u.closest(".resize-sensor"))
134
134
  continue;
135
135
  if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
136
- F.current[r] = !0, O.current(Zt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
- item_reference: ut,
138
- widget_reference: lt,
136
+ z.current[r] = !0, O.current(Zt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
+ item_reference: ft,
138
+ widget_reference: ut,
139
139
  question_type: _,
140
- question_number: ft,
140
+ question_number: ht,
141
141
  responseId: r,
142
- item_number: ht,
143
- item_display_number: dt
142
+ item_number: dt,
143
+ item_display_number: gt
144
144
  });
145
145
  break;
146
146
  }
147
147
  }
148
- F.current[r] = !1;
148
+ z.current[r] = !1;
149
149
  }
150
150
  }, [
151
151
  a,
152
152
  l,
153
153
  g,
154
+ gt,
154
155
  dt,
155
- ht,
156
- ut,
156
+ ft,
157
157
  O,
158
158
  _,
159
- ft,
159
+ ht,
160
160
  r,
161
- lt
161
+ ut
162
162
  ]), E(() => {
163
163
  const t = L.current, s = (o) => {
164
164
  const m = o.querySelector(".lrn_response_wrapper");
165
- if (!m)
165
+ if (F || !m)
166
166
  return 0;
167
167
  const u = o.getBoundingClientRect().bottom, W = m.getBoundingClientRect().bottom, p = Math.abs(u - W);
168
168
  return p < bt ? bt - p : 0;
@@ -183,12 +183,12 @@ const Ai = Vt(
183
183
  });
184
184
  }), Pt(() => {
185
185
  !B && !M && Wt(r);
186
- }, [M, B, r, st]), E(() => {
187
- (I || gt || b && f) && w.renderMath("mathjax");
188
- }, [gt, I, w, b, f]), E(() => {
186
+ }, [M, B, r, mt]), E(() => {
187
+ (I || Et || b && f) && w.renderMath("mathjax");
188
+ }, [Et, I, w, b, f]), E(() => {
189
189
  if (H && v && !$t && (i != null && i.validatedByTeacher)) {
190
190
  const t = setTimeout(() => {
191
- B ? Wt(v) : it(v);
191
+ B ? Wt(v) : et(v);
192
192
  }, 1e3);
193
193
  return () => {
194
194
  clearTimeout(t);
@@ -199,7 +199,7 @@ const Ai = Vt(
199
199
  H,
200
200
  $t,
201
201
  B,
202
- it,
202
+ et,
203
203
  i == null ? void 0 : i.validatedByTeacher
204
204
  ]), /* @__PURE__ */ T(
205
205
  si,
@@ -207,7 +207,7 @@ const Ai = Vt(
207
207
  "data-response-id": r,
208
208
  className: `widget-${r}`,
209
209
  ref: L,
210
- $topOffset: st,
210
+ $topOffset: mt,
211
211
  $flexDirection: $ ? "row" : "column",
212
212
  $alignItems: $ ? "flex-start" : "center",
213
213
  $hidden: M,
@@ -224,19 +224,19 @@ const Ai = Vt(
224
224
  /* @__PURE__ */ T(
225
225
  li,
226
226
  {
227
- ref: z,
228
- $width: $ ? "50%" : `${V}px`,
229
- $minHeight: y ? Math.max(y - 72, rt ?? 0) : Qt,
227
+ ref: D,
228
+ $width: $ ? "50%" : `${X}px`,
229
+ $minHeight: y ? Math.max(y - 72, ot ?? 0) : Qt,
230
230
  $isActive: S,
231
231
  $paperColor: C,
232
232
  $opacity: S ? 1 : 0.2,
233
233
  children: [
234
- S && !!k && !!tt && q && /* @__PURE__ */ e(
234
+ S && !!tt && !!it && k && /* @__PURE__ */ e(
235
235
  Yt,
236
236
  {
237
- containerRef: z,
238
- onPublish: k,
239
- onSubscribe: tt,
237
+ containerRef: D,
238
+ onPublish: tt,
239
+ onSubscribe: it,
240
240
  responseId: r
241
241
  }
242
242
  ),
@@ -253,8 +253,8 @@ const Ai = Vt(
253
253
  userType: c,
254
254
  question: n,
255
255
  response: i,
256
- behavior: X,
257
- layout: P,
256
+ behavior: P,
257
+ layout: j,
258
258
  paperColor: C,
259
259
  onMarkForReview: xt,
260
260
  actionbarHeight: yt,
@@ -278,7 +278,7 @@ const Ai = Vt(
278
278
  appended: a,
279
279
  question: n,
280
280
  response: i == null ? void 0 : i.response,
281
- canRender: K || S,
281
+ canRender: V || S,
282
282
  learnosity: w,
283
283
  canForceAppend: c === "TEACHER",
284
284
  isConceptIntro: l,
@@ -286,24 +286,24 @@ const Ai = Vt(
286
286
  onMediaStateChange: Bt
287
287
  }
288
288
  ),
289
- !Et && q && Y && Z && y !== void 0 && /* @__PURE__ */ e(hi, { $canScribble: J, children: /* @__PURE__ */ e(
289
+ !F && k && Z && J && y !== void 0 && /* @__PURE__ */ e(hi, { $canScribble: q, children: /* @__PURE__ */ e(
290
290
  Gt,
291
291
  {
292
- canRender: K,
293
- canScribble: J && S,
292
+ canRender: V,
293
+ canScribble: q && S,
294
294
  appended: a,
295
295
  canvasId: r,
296
- width: V,
297
- height: Math.max(y, rt ?? 0),
296
+ width: X,
297
+ height: Math.max(y, ot ?? 0),
298
298
  onUpdateHeight: Ut,
299
- onPublish: Y,
300
- onSubscribe: Z,
299
+ onPublish: Z,
300
+ onSubscribe: J,
301
301
  userId: It,
302
302
  initialData: N == null ? void 0 : N[r],
303
303
  userType: c
304
304
  }
305
305
  ) }),
306
- !Et && D && D.length > 0 && /* @__PURE__ */ e(
306
+ !F && U && U.length > 0 && /* @__PURE__ */ e(
307
307
  Ht,
308
308
  {
309
309
  $background: "BLUE_1",
@@ -311,7 +311,7 @@ const Ai = Vt(
311
311
  $gapX: 0.5,
312
312
  $borderRadiusX: 0,
313
313
  $borderColor: "BLUE_2",
314
- children: D.map((t, s) => /* @__PURE__ */ e(
314
+ children: U.map((t, s) => /* @__PURE__ */ e(
315
315
  di,
316
316
  {
317
317
  dangerouslySetInnerHTML: {
@@ -340,7 +340,7 @@ const Ai = Vt(
340
340
  )
341
341
  }
342
342
  ),
343
- !!et && /* @__PURE__ */ e(
343
+ !!rt && /* @__PURE__ */ e(
344
344
  ri,
345
345
  {
346
346
  responses: Mt,
@@ -349,7 +349,7 @@ const Ai = Vt(
349
349
  responseId: r,
350
350
  studentId: At,
351
351
  userType: c,
352
- ...et
352
+ ...rt
353
353
  }
354
354
  )
355
355
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { LEARNOSITY_KEYBOARD_HEIGHT, QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMediaStateChange,\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n item_number,\n item_display_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n item_number,\n item_display_number,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_display_number,\n item_number,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n\n const getExtraSpaceNeedForFloatingKeyboard = (questionEl: HTMLDivElement) => {\n const $responseWrapper = questionEl.querySelector('.lrn_response_wrapper');\n\n if (!$responseWrapper) {\n return 0;\n }\n\n const questionBottom = questionEl.getBoundingClientRect().bottom;\n const responseWrapperBottom = $responseWrapper.getBoundingClientRect().bottom;\n const spaceFromResponseToBottom = Math.abs(questionBottom - responseWrapperBottom);\n\n if (spaceFromResponseToBottom < LEARNOSITY_KEYBOARD_HEIGHT) {\n return LEARNOSITY_KEYBOARD_HEIGHT - spaceFromResponseToBottom;\n }\n\n return 0;\n };\n\n if (appended && $questionEl) {\n setQuestionHeight(qHeight => {\n const hasFloatingKeyboard = question.ui_style?.type === 'floating-keyboard';\n const v3CodeHidden = teacherValidationEnabled && questionType === 'clozetext';\n const hasKeyboard = hasFloatingKeyboard && !v3CodeHidden;\n const height = $questionEl.clientHeight;\n\n if (height === 0) {\n return qHeight;\n }\n\n // If the question has a floating keyboard, we need to add the height of the keyboard to the question height\n if (!qHeight) {\n return Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n }\n\n const newQuestionHeight = Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n }, [hasStimulusReview, hintsUsed, learnosity, solution, worksheetCompleted]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {!(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n simState={response?.simState}\n onMediaStateChange={onMediaStateChange}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n canvasId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span>&nbsp;${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMediaStateChange","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","EVENTS","getExtraSpaceNeedForFloatingKeyboard","questionEl","$responseWrapper","questionBottom","responseWrapperBottom","spaceFromResponseToBottom","LEARNOSITY_KEYBOARD_HEIGHT","qHeight","hasKeyboard","_a","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"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0BACZ,UAAU;AAAA,0BACV,OAAO;AAAA,0BACP,gBAAgB;AAAA,0BAChB,cAAa;AAAA,0BAEb,UAAA,gBAAAjB;AAAA,4BAACqB;AAAAA,4BAAA;AAAA,8BACC,yBAAyB;AAAA,gCACvB,QAAQ,iEAAiEjF,CAAQ;AAAA,8BACnF;AAAA,4BAAA;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,sBAED,CAAC,CAACxB,MACD,gBAAAoF;AAAA,wBAACsB;AAAA,wBAAA;AAAA,0BACC,WAAA3G;AAAA,0BACA,UAAA5B;AAAA,0BACA,gBAAAC;AAAA,0BACA,YAAA+C;AAAA,0BACA,WAAArB;AAAA,0BACA,UAAA/B;AAAA,0BACC,GAAGiC;AAAA,wBAAA;AAAA,sBACN;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { LEARNOSITY_KEYBOARD_HEIGHT, QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMediaStateChange,\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n item_number,\n item_display_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n item_number,\n item_display_number,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_display_number,\n item_number,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n\n const getExtraSpaceNeedForFloatingKeyboard = (questionEl: HTMLDivElement) => {\n const $responseWrapper = questionEl.querySelector('.lrn_response_wrapper');\n\n if (isIntro || !$responseWrapper) {\n return 0;\n }\n\n const questionBottom = questionEl.getBoundingClientRect().bottom;\n const responseWrapperBottom = $responseWrapper.getBoundingClientRect().bottom;\n const spaceFromResponseToBottom = Math.abs(questionBottom - responseWrapperBottom);\n\n if (spaceFromResponseToBottom < LEARNOSITY_KEYBOARD_HEIGHT) {\n return LEARNOSITY_KEYBOARD_HEIGHT - spaceFromResponseToBottom;\n }\n\n return 0;\n };\n\n if (appended && $questionEl) {\n setQuestionHeight(qHeight => {\n const hasFloatingKeyboard = question.ui_style?.type === 'floating-keyboard';\n const v3CodeHidden = teacherValidationEnabled && questionType === 'clozetext';\n const hasKeyboard = hasFloatingKeyboard && !v3CodeHidden;\n const height = $questionEl.clientHeight;\n\n if (height === 0) {\n return qHeight;\n }\n\n // If the question has a floating keyboard, we need to add the height of the keyboard to the question height\n if (!qHeight) {\n return Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n }\n\n const newQuestionHeight = Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n }, [hasStimulusReview, hintsUsed, learnosity, solution, worksheetCompleted]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {!(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n simState={response?.simState}\n onMediaStateChange={onMediaStateChange}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n canvasId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span>&nbsp;${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMediaStateChange","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","EVENTS","getExtraSpaceNeedForFloatingKeyboard","questionEl","$responseWrapper","questionBottom","responseWrapperBottom","spaceFromResponseToBottom","LEARNOSITY_KEYBOARD_HEIGHT","qHeight","hasKeyboard","_a","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAiDC;AAAA,EACrD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,MACI;AACJ,UAAMC,IAAaC;AAAA,MACjB,MAAOlB,MAAe,UAAUmB,GAAwBjC,CAAQ,IAAI;AAAA,MACpE,CAACc,GAAYd,CAAQ;AAAA,IAAA,GAEjB,CAACkC,GAAgBC,EAAiB,IAAIC,EAA6B,GACnE,CAACC,IAAcC,EAAe,IAAIF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AA,4BAAA;AAAA,8BAEC,yBAAyB;AAAA,gCACvB,QAAQ,yDACLjF,KAAA,gBAAAA,EAAgB,WAAU,KAAK,IAAI,IAAIgF,IAAQ,CAAC,KAAK,EACxD,iBAAiBD,CAAI;AAAA,8BACvB;AAAA,4BAAA;AAAA,4BALKA;AAAA,0BAAA,CAOR;AAAA,wBAAA;AAAA,sBACH;AAAA,sBAEDrD,MACC,gBAAAmC;AAAA,wBAACiB;AAAA,wBAAA;AAAA,0BACC,aAAY;AAAA,0BACZ,UAAU;AAAA,0BACV,OAAO;AAAA,0BACP,gBAAgB;AAAA,0BAChB,cAAa;AAAA,0BAEb,UAAA,gBAAAjB;AAAA,4BAACqB;AAAAA,4BAAA;AAAA,8BACC,yBAAyB;AAAA,gCACvB,QAAQ,iEAAiEjF,CAAQ;AAAA,8BACnF;AAAA,4BAAA;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,sBAED,CAAC,CAACxB,MACD,gBAAAoF;AAAA,wBAACsB;AAAA,wBAAA;AAAA,0BACC,WAAA3G;AAAA,0BACA,UAAA5B;AAAA,0BACA,gBAAAC;AAAA,0BACA,YAAA+C;AAAA,0BACA,WAAArB;AAAA,0BACA,UAAA/B;AAAA,0BACC,GAAGiC;AAAA,wBAAA;AAAA,sBACN;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.1.12-as1",
3
+ "version": "3.1.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"