@cuemath/leap 3.5.48-aa1 → 3.5.48-aa2

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,4 +1,4 @@
1
- import { jsxs as I, jsx as o, Fragment as Le } from "react/jsx-runtime";
1
+ import { jsxs as W, jsx as o, Fragment as Le } from "react/jsx-runtime";
2
2
  import { memo as Ae, useMemo as g, useState as O, useRef as z, useCallback as Be, useEffect as R, useLayoutEffect as Ne } from "react";
3
3
  import { IMAGES as Oe } from "../../../../assets/images/images.js";
4
4
  import ze from "../../../cue-canvas/cue-canvas.js";
@@ -22,7 +22,7 @@ const Tt = Ae(function({
22
22
  response: t,
23
23
  nextQuestionId: Re,
24
24
  isActive: v,
25
- isHidden: W,
25
+ isHidden: x,
26
26
  canRender: j,
27
27
  appended: s,
28
28
  intersectionObserver: F
@@ -38,7 +38,7 @@ const Tt = Ae(function({
38
38
  learnosity: $,
39
39
  onPublishStrokes: V,
40
40
  onReceiveStrokes: X,
41
- initialStrokesData: x,
41
+ initialStrokesData: T,
42
42
  onPublishMouseMove: G,
43
43
  onSubscribeMouseMove: Y,
44
44
  canResolveDoubt: we,
@@ -46,7 +46,7 @@ const Tt = Ae(function({
46
46
  userId: He,
47
47
  studentId: Me,
48
48
  subjectiveProps: Z,
49
- loggerRef: T,
49
+ loggerRef: w,
50
50
  isScribblingEnabled: J
51
51
  } = dt((e) => ({
52
52
  behavior: e.behavior,
@@ -69,10 +69,10 @@ const Tt = Ae(function({
69
69
  subjectiveProps: e.subjectiveProps,
70
70
  loggerRef: e.loggerRef,
71
71
  isScribblingEnabled: e.scribblingEnabled
72
- })), { background: q = "paper" } = U, w = g(
72
+ })), { background: q = "paper" } = U, C = g(
73
73
  () => q === "paper" ? Ke(r) : void 0,
74
74
  [q, r]
75
- ), [C, Ie] = O(), [ee, We] = O(), {
75
+ ), [H, Ie] = O(), [ee, We] = O(), {
76
76
  validation: te,
77
77
  review: k,
78
78
  maximumAttempts: Q,
@@ -90,19 +90,19 @@ const Tt = Ae(function({
90
90
  question_number: le,
91
91
  item_number: de,
92
92
  item_display_number: me
93
- } = r, H = m === "overview", l = Ve(ae), f = ae === "SystemIntro", L = l || f, he = t == null ? void 0 : t.responseEdited, ke = g(() => {
93
+ } = r, M = m === "overview", l = Ve(ae), f = ae === "SystemIntro", L = l || f, he = t == null ? void 0 : t.responseEdited, ke = g(() => {
94
94
  const e = [];
95
- return he && c === "TEACHER" && e.push("attempting"), s || e.push("hidden"), p === "hotspot" && e.push("correct-answers-hidden"), s && D && p === "clozetext" && (!l || c === "STUDENT" ? e.push("response-hidden") : e.push("response-code-hidden")), H && e.push("lesson-overview"), l && e.push("concept-intro"), f && e.push("system-intro"), e.join(" ");
95
+ return he && c === "TEACHER" && e.push("attempting"), s || e.push("hidden"), p === "hotspot" && e.push("correct-answers-hidden"), s && D && p === "clozetext" && (!l || c === "STUDENT" ? e.push("response-hidden") : e.push("response-code-hidden")), M && e.push("lesson-overview"), l && e.push("concept-intro"), f && e.push("system-intro"), e.join(" ");
96
96
  }, [
97
97
  s,
98
98
  l,
99
- H,
99
+ M,
100
100
  f,
101
101
  p,
102
102
  he,
103
103
  D,
104
104
  c
105
- ]), A = z({}), fe = (t == null ? void 0 : t.hintsUsed) ?? 0, M = z(null), B = z(null), N = g(() => h == null ? void 0 : h.slice(0, fe), [h, fe]), pe = g(() => c === "TEACHER" || E ? !0 : !t || !t.response || t.responseEdited ? !1 : te, [t, c, te, E]), be = g(() => {
105
+ ]), A = z({}), fe = (t == null ? void 0 : t.hintsUsed) ?? 0, I = z(null), B = z(null), N = g(() => h == null ? void 0 : h.slice(0, fe), [h, fe]), pe = g(() => c === "TEACHER" || E ? !0 : !t || !t.response || t.responseEdited ? !1 : te, [t, c, te, E]), be = g(() => {
106
106
  if (c === "TEACHER") return !0;
107
107
  if (k) {
108
108
  const { attemptsHistory: e } = t ?? {};
@@ -119,7 +119,7 @@ const Tt = Ae(function({
119
119
  We(e);
120
120
  }, []);
121
121
  return R(() => {
122
- M.current && F.observe(M.current);
122
+ I.current && F.observe(I.current);
123
123
  }, [F]), R(() => {
124
124
  if (s && (r.type === "clozeassociation" || r.type === "association" || r.type === "clozeformula")) {
125
125
  const e = document.querySelectorAll(
@@ -142,14 +142,14 @@ const Tt = Ae(function({
142
142
  }
143
143
  }, [s, $, i, k, be, c, pe]), R(() => {
144
144
  const e = B.current;
145
- if (s && e && T.current && A.current[i] === void 0 && !l && !f) {
145
+ if (s && e && w.current && A.current[i] === void 0 && !l && !f) {
146
146
  const a = e.clientWidth, n = e.querySelectorAll("*");
147
147
  for (let u = 0; u < n.length; u++) {
148
148
  const d = n[u];
149
149
  if (d != null && d.closest(".resize-sensor"))
150
150
  continue;
151
151
  if (((d == null ? void 0 : d.clientWidth) ?? 0) > a) {
152
- A.current[i] = !0, T.current(Fe.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
152
+ A.current[i] = !0, w.current(Fe.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
153
153
  item_reference: ue,
154
154
  widget_reference: ce,
155
155
  question_type: p,
@@ -170,13 +170,13 @@ const Tt = Ae(function({
170
170
  me,
171
171
  de,
172
172
  ue,
173
- T,
173
+ w,
174
174
  p,
175
175
  le,
176
176
  i,
177
177
  ce
178
178
  ]), R(() => {
179
- const e = M.current, a = (n) => {
179
+ const e = I.current, a = (n) => {
180
180
  const u = n.querySelector(".lrn_response_wrapper");
181
181
  if (L || !u)
182
182
  return 0;
@@ -198,17 +198,17 @@ const Tt = Ae(function({
198
198
  return Math.abs(ve - n) > 4 ? ve : n;
199
199
  }), $.renderMath("mathjax");
200
200
  }), Ne(() => {
201
- !re && !W && Xe(i);
202
- }, [W, re, i, ne]), /* @__PURE__ */ I(
201
+ !re && !x && Xe(i);
202
+ }, [x, re, i, ne]), /* @__PURE__ */ W(
203
203
  it,
204
204
  {
205
205
  "data-response-id": i,
206
206
  className: `widget-${i}`,
207
- ref: M,
207
+ ref: I,
208
208
  $topOffset: ne,
209
209
  $flexDirection: S ? "row" : "column",
210
210
  $alignItems: S ? "flex-start" : "center",
211
- $hidden: W,
211
+ $hidden: x,
212
212
  $marginBottom: Ue,
213
213
  children: [
214
214
  S && /* @__PURE__ */ o(
@@ -219,14 +219,14 @@ const Tt = Ae(function({
219
219
  }
220
220
  }
221
221
  ),
222
- /* @__PURE__ */ I(
222
+ /* @__PURE__ */ W(
223
223
  rt,
224
224
  {
225
225
  ref: B,
226
226
  $width: S ? "50%" : `${K}px`,
227
- $minHeight: C ? Math.max(C - 72, ee ?? 0) : xe,
227
+ $minHeight: H ? Math.max(H - 72, ee ?? 0) : xe,
228
228
  $isActive: v,
229
- $paperColor: w,
229
+ $paperColor: C,
230
230
  $opacity: v ? 1 : 0.2,
231
231
  $imageHue: se,
232
232
  children: [
@@ -239,29 +239,29 @@ const Tt = Ae(function({
239
239
  responseId: i
240
240
  }
241
241
  ),
242
- /* @__PURE__ */ I(
242
+ /* @__PURE__ */ W(
243
243
  st,
244
244
  {
245
245
  className: ke,
246
246
  $dropzoneMinWidth: ge.width,
247
247
  $dropzoneMinHeight: ge.height,
248
248
  children: [
249
- Te && !(H || l || f) && /* @__PURE__ */ o(
249
+ Te && !(M || l || f) && /* @__PURE__ */ o(
250
250
  Ge,
251
251
  {
252
252
  question: r,
253
253
  response: t,
254
254
  behavior: _,
255
- paperColor: w,
255
+ paperColor: C,
256
256
  actionbarHeight: $e,
257
257
  canResolveDoubt: we,
258
258
  onResolveDoubt: Ce,
259
259
  worksheetCompleted: E
260
260
  }
261
261
  ),
262
- H && /* @__PURE__ */ o(at, { src: Oe.LESSON_OVERVIEW_BANNER }),
263
- l && w && /* @__PURE__ */ o(Ze, { paperColor: w }),
264
- f ? /* @__PURE__ */ I(Le, { children: [
262
+ M && /* @__PURE__ */ o(at, { src: Oe.LESSON_OVERVIEW_BANNER }),
263
+ l && C && /* @__PURE__ */ o(Ze, { paperColor: C }),
264
+ f ? /* @__PURE__ */ W(Le, { children: [
265
265
  m === "practice-basic" && /* @__PURE__ */ o(et, {}),
266
266
  m === "practice-regular" && /* @__PURE__ */ o(ot, {}),
267
267
  m === "exit-ticket" && /* @__PURE__ */ o(tt, {}),
@@ -282,7 +282,7 @@ const Tt = Ae(function({
282
282
  isPuzzle: Q === -2
283
283
  }
284
284
  ),
285
- !L && !!_.canvasEnabled && V && X && C !== void 0 && /* @__PURE__ */ o(ct, { $canScribble: J, children: /* @__PURE__ */ o(
285
+ !L && !!_.canvasEnabled && V && X && H !== void 0 && /* @__PURE__ */ o(ct, { $canScribble: J, children: /* @__PURE__ */ o(
286
286
  ze,
287
287
  {
288
288
  canRender: j,
@@ -290,13 +290,14 @@ const Tt = Ae(function({
290
290
  appended: s,
291
291
  canvasId: i,
292
292
  width: K,
293
- height: Math.max(C, ee ?? 0),
293
+ height: Math.max(H, ee ?? 0),
294
294
  onUpdateHeight: Pe,
295
295
  onPublish: V,
296
296
  onSubscribe: X,
297
297
  userId: He,
298
- initialData: x == null ? void 0 : x[i],
299
- userType: c
298
+ initialData: T == null ? void 0 : T[i],
299
+ userType: c,
300
+ loggerRef: w
300
301
  }
301
302
  ) }),
302
303
  !L && N && N.length > 0 && /* @__PURE__ */ o(
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import {\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';\nimport type { IWorksheetQuestionProps } from './worksheet-question-types';\nimport { useWorksheetStore } from '../hooks/use-worksheet-store';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(function WorksheetQuestion({\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n appended,\n intersectionObserver,\n}) {\n const {\n behavior,\n layout,\n userType,\n responses,\n maxQuestionWidth,\n actionbarHeight,\n worksheetCompleted,\n learnosity,\n onPublishStrokes,\n onReceiveStrokes,\n initialStrokesData,\n onPublishMouseMove,\n onSubscribeMouseMove,\n canResolveDoubt,\n onResolveDoubt,\n userId,\n studentId,\n subjectiveProps,\n loggerRef,\n isScribblingEnabled,\n } = useWorksheetStore(store => ({\n behavior: store.behavior,\n layout: store.layout,\n userType: store.userType,\n responses: store.responses,\n maxQuestionWidth: store.maxQuestionWidth,\n actionbarHeight: store.actionbarHeight,\n worksheetCompleted: store.worksheetCompleted,\n learnosity: store.learnosity,\n onPublishStrokes: store.onPublishStrokes,\n onReceiveStrokes: store.onReceiveStrokes,\n initialStrokesData: store.initialStrokesData,\n onPublishMouseMove: store.onPublishMouseMove,\n onSubscribeMouseMove: store.onSubscribeMouseMove,\n canResolveDoubt: store.canResolveDoubt,\n onResolveDoubt: store.onResolveDoubt,\n userId: store.userId,\n studentId: store.studentId,\n subjectiveProps: store.subjectiveProps,\n loggerRef: store.loggerRef,\n isScribblingEnabled: store.scribblingEnabled,\n }));\n const { background = 'paper' } = layout;\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, renderQuestionHeader, imageHue } =\n 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 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 const hintsUsed = response?.hintsUsed ?? 0;\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 learnosity.renderMath('mathjax');\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\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 $imageHue={imageHue}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && !!behavior.canvasEnabled && (\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 {renderQuestionHeader && !(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n question={question}\n response={response}\n behavior={behavior}\n paperColor={paperColor}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />}\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 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 imageHue={imageHue}\n isPuzzle={maximumAttempts === -2}\n />\n\n {!isIntro &&\n !!behavior.canvasEnabled &&\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 {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n});\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","question","response","nextQuestionId","isActive","isHidden","canRender","appended","intersectionObserver","behavior","layout","userType","responses","maxQuestionWidth","actionbarHeight","worksheetCompleted","learnosity","onPublishStrokes","onReceiveStrokes","initialStrokesData","onPublishMouseMove","onSubscribeMouseMove","canResolveDoubt","onResolveDoubt","userId","studentId","subjectiveProps","loggerRef","isScribblingEnabled","useWorksheetStore","store","background","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","renderQuestionHeader","imageHue","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","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","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":";;;;;;;;;;;;;;;;;;;AAkCM,MAAAA,KAAiDC,GAAK,SAA2B;AAAA,EACrF,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,sBAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,EAAA,IACEC,GAAkB,CAAUC,OAAA;AAAA,IAC9B,UAAUA,EAAM;AAAA,IAChB,QAAQA,EAAM;AAAA,IACd,UAAUA,EAAM;AAAA,IAChB,WAAWA,EAAM;AAAA,IACjB,kBAAkBA,EAAM;AAAA,IACxB,iBAAiBA,EAAM;AAAA,IACvB,oBAAoBA,EAAM;AAAA,IAC1B,YAAYA,EAAM;AAAA,IAClB,kBAAkBA,E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yB;AAAA,8BACvB,QAAQ,yDACL9E,KAAA,gBAAAA,EAAgB,WAAU,KAAK,IAAI,IAAI6E,IAAQ,CAAC,KAAK,EACxD,iBAAiBD,CAAI;AAAA,4BACvB;AAAA,0BAAA;AAAA,0BALKA;AAAA,wBAAA,CAOR;AAAA,sBAAA;AAAA,oBACH;AAAA,oBAEDpD,MACC,gBAAAkC;AAAA,sBAACiB;AAAA,sBAAA;AAAA,wBACC,aAAY;AAAA,wBACZ,UAAU;AAAA,wBACV,OAAO;AAAA,wBACP,gBAAgB;AAAA,wBAChB,cAAa;AAAA,wBAEb,UAAA,gBAAAjB;AAAA,0BAACqB;AAAAA,0BAAA;AAAA,4BACC,yBAAyB;AAAA,8BACvB,QAAQ,iEAAiE9E,CAAQ;AAAA,4BACnF;AAAA,0BAAA;AAAA,wBACF;AAAA,sBAAA;AAAA,oBACF;AAAA,oBAED,CAAC,CAAC/B,KACD,gBAAAwF;AAAA,sBAACsB;AAAA,sBAAA;AAAA,wBACC,WAAA5H;AAAA,wBACA,UAAAV;AAAA,wBACA,gBAAAC;AAAA,wBACA,YAAAiD;AAAA,wBACA,WAAA3B;AAAA,wBACC,GAAGC;AAAA,sBAAA;AAAA,oBACN;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAEJ;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import {\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';\nimport type { IWorksheetQuestionProps } from './worksheet-question-types';\nimport { useWorksheetStore } from '../hooks/use-worksheet-store';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(function WorksheetQuestion({\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n appended,\n intersectionObserver,\n}) {\n const {\n behavior,\n layout,\n userType,\n responses,\n maxQuestionWidth,\n actionbarHeight,\n worksheetCompleted,\n learnosity,\n onPublishStrokes,\n onReceiveStrokes,\n initialStrokesData,\n onPublishMouseMove,\n onSubscribeMouseMove,\n canResolveDoubt,\n onResolveDoubt,\n userId,\n studentId,\n subjectiveProps,\n loggerRef,\n isScribblingEnabled,\n } = useWorksheetStore(store => ({\n behavior: store.behavior,\n layout: store.layout,\n userType: store.userType,\n responses: store.responses,\n maxQuestionWidth: store.maxQuestionWidth,\n actionbarHeight: store.actionbarHeight,\n worksheetCompleted: store.worksheetCompleted,\n learnosity: store.learnosity,\n onPublishStrokes: store.onPublishStrokes,\n onReceiveStrokes: store.onReceiveStrokes,\n initialStrokesData: store.initialStrokesData,\n onPublishMouseMove: store.onPublishMouseMove,\n onSubscribeMouseMove: store.onSubscribeMouseMove,\n canResolveDoubt: store.canResolveDoubt,\n onResolveDoubt: store.onResolveDoubt,\n userId: store.userId,\n studentId: store.studentId,\n subjectiveProps: store.subjectiveProps,\n loggerRef: store.loggerRef,\n isScribblingEnabled: store.scribblingEnabled,\n }));\n const { background = 'paper' } = layout;\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, renderQuestionHeader, imageHue } =\n 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 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 const hintsUsed = response?.hintsUsed ?? 0;\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 learnosity.renderMath('mathjax');\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\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 $imageHue={imageHue}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && !!behavior.canvasEnabled && (\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 {renderQuestionHeader && !(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n question={question}\n response={response}\n behavior={behavior}\n paperColor={paperColor}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />}\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 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 imageHue={imageHue}\n isPuzzle={maximumAttempts === -2}\n />\n\n {!isIntro &&\n !!behavior.canvasEnabled &&\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 loggerRef={loggerRef}\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 {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n});\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","question","response","nextQuestionId","isActive","isHidden","canRender","appended","intersectionObserver","behavior","layout","userType","responses","maxQuestionWidth","actionbarHeight","worksheetCompleted","learnosity","onPublishStrokes","onReceiveStrokes","initialStrokesData","onPublishMouseMove","onSubscribeMouseMove","canResolveDoubt","onResolveDoubt","userId","studentId","subjectiveProps","loggerRef","isScribblingEnabled","useWorksheetStore","store","background","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","renderQuestionHeader","imageHue","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","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","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":";;;;;;;;;;;;;;;;;;;AAkCM,MAAAA,KAAiDC,GAAK,SAA2B;AAAA,EACrF,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,sBAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,EAAA,IACEC,GAAkB,CAAUC,OAAA;AAAA,IAC9B,UAAUA,EAAM;AAAA,IAChB,QAAQA,EAAM;AAAA,IACd,UAAUA,EAAM;AAAA,IAChB,WAAWA,EAAM;A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AAAA,wBACP,gBAAgB;AAAA,wBAChB,cAAa;AAAA,wBAEZ,UAAMvD,EAAA,IAAI,CAACwD,GAAMC,MAChB,gBAAAnB;AAAA,0BAACoB;AAAAA,0BAAA;AAAA,4BAEC,yBAAyB;AAAA,8BACvB,QAAQ,yDACL9E,KAAA,gBAAAA,EAAgB,WAAU,KAAK,IAAI,IAAI6E,IAAQ,CAAC,KAAK,EACxD,iBAAiBD,CAAI;AAAA,4BACvB;AAAA,0BAAA;AAAA,0BALKA;AAAA,wBAAA,CAOR;AAAA,sBAAA;AAAA,oBACH;AAAA,oBAEDpD,MACC,gBAAAkC;AAAA,sBAACiB;AAAA,sBAAA;AAAA,wBACC,aAAY;AAAA,wBACZ,UAAU;AAAA,wBACV,OAAO;AAAA,wBACP,gBAAgB;AAAA,wBAChB,cAAa;AAAA,wBAEb,UAAA,gBAAAjB;AAAA,0BAACqB;AAAAA,0BAAA;AAAA,4BACC,yBAAyB;AAAA,8BACvB,QAAQ,iEAAiE9E,CAAQ;AAAA,4BACnF;AAAA,0BAAA;AAAA,wBACF;AAAA,sBAAA;AAAA,oBACF;AAAA,oBAED,CAAC,CAAC/B,KACD,gBAAAwF;AAAA,sBAACsB;AAAA,sBAAA;AAAA,wBACC,WAAA5H;AAAA,wBACA,UAAAV;AAAA,wBACA,gBAAAC;AAAA,wBACA,YAAAiD;AAAA,wBACA,WAAA3B;AAAA,wBACC,GAAGC;AAAA,sBAAA;AAAA,oBACN;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAEJ;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.5.48-aa1",
3
+ "version": "3.5.48-aa2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"