@cuemath/leap 2.9.7-akm-2 → 2.9.7-gg1

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,71 +1,103 @@
1
- import { jsx as Q } from "react/jsx-runtime";
2
- import { memo as A, useRef as l, useCallback as C, useEffect as f } from "react";
3
- import b from "../hooks/use-learnosity-append.js";
4
- import { LearnosityQuestionContainer as _ } from "./worksheet-question-styled.js";
5
- const g = A(
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { memo as g, useRef as I, useCallback as M, useEffect as m } from "react";
3
+ import Q from "../hooks/use-learnosity-append.js";
4
+ import { LearnosityQuestionContainer as $ } from "./worksheet-question-styled.js";
5
+ const D = g(
6
6
  ({
7
7
  signedRequest: R,
8
- appended: s,
9
- canRender: m,
10
- canForceAppend: u,
11
- question: t,
12
- response: r,
13
- learnosity: d,
14
- isConceptIntro: $
8
+ appended: o,
9
+ canRender: E,
10
+ canForceAppend: a,
11
+ question: n,
12
+ response: s,
13
+ learnosity: w,
14
+ isConceptIntro: h,
15
+ simState: u,
16
+ onMediaStateChange: _
15
17
  }) => {
16
- const o = l(null), e = l(r), { forceAppend: p } = b(R), a = C(
17
- (n) => {
18
+ const c = I(null), t = I(s), { forceAppend: p } = Q(R), d = M(
19
+ (e) => {
20
+ const { source: r, data: i } = e, { type: l } = i ?? {};
21
+ l === "SIM_IS_READY" ? r.postMessage(
22
+ {
23
+ type: "SIMULATION_CONFIG",
24
+ payload: {
25
+ userRole: a ? "teacher" : "student",
26
+ simulationState: u
27
+ }
28
+ },
29
+ "*"
30
+ ) : l === "SIM_STATE_UPDATE" && _(n, "SIMULATION", e.data.payload);
31
+ },
32
+ [a, u, _, n]
33
+ ), y = M(
34
+ (e) => {
18
35
  window.requestAnimationFrame(() => {
19
- var h, w, y;
20
- const i = document.createElement("div");
21
- i.classList.add("learnosity-response"), i.classList.add(`question-${t.response_id}`), (w = (h = o.current) == null ? void 0 : h.children[0]) == null || w.querySelectorAll("svg path").forEach((c) => {
22
- c.id = `${c.id} + temp`;
23
- }), (y = o.current) == null || y.append(i), p({
24
- question: t,
25
- response: n,
26
- callback: (c) => {
27
- var E, L;
28
- c || ((L = (E = o.current) == null ? void 0 : E.children[0]) == null || L.remove(), e.current && e.current !== n ? a(e.current) : e.current = void 0);
36
+ var i, l, T;
37
+ const r = document.createElement("div");
38
+ r.classList.add("learnosity-response"), r.classList.add(`question-${n.response_id}`), (l = (i = c.current) == null ? void 0 : i.children[0]) == null || l.querySelectorAll("svg path").forEach((f) => {
39
+ f.id = `${f.id} + temp`;
40
+ }), (T = c.current) == null || T.append(r), p({
41
+ question: n,
42
+ response: e,
43
+ callback: (f) => {
44
+ var v, A;
45
+ f || ((A = (v = c.current) == null ? void 0 : v.children[0]) == null || A.remove(), t.current && t.current !== e ? y(t.current) : t.current = void 0);
29
46
  }
30
47
  });
31
48
  });
32
49
  },
33
- [p, t]
34
- ), v = l(!1);
35
- return f(() => {
36
- let n;
37
- return m && (v.current || (n = window.requestAnimationFrame(() => {
38
- const i = e.current ?? r;
39
- v.current = !0, d.appendQuestion({
40
- questions: [t],
41
- ...i ? {
50
+ [p, n]
51
+ ), L = I(!1);
52
+ return m(() => {
53
+ let e;
54
+ return E && (L.current || (e = window.requestAnimationFrame(() => {
55
+ const r = t.current ?? s;
56
+ L.current = !0, w.appendQuestion({
57
+ questions: [n],
58
+ ...r ? {
42
59
  responses: {
43
- [t.response_id]: {
60
+ [n.response_id]: {
44
61
  // Learnosity is mutating the response object, so we need to clone it
45
- ...i
62
+ ...r
46
63
  }
47
64
  }
48
65
  } : {}
49
66
  });
50
67
  }))), () => {
51
- n && window.cancelAnimationFrame(n);
68
+ e && window.cancelAnimationFrame(e);
52
69
  };
53
- }, [m, d, t, r]), f(() => {
54
- s && (e.current = void 0);
55
- }, [s]), f(() => {
56
- s && r && u && r !== e.current && (e.current ? e.current = r : (e.current = r, a(r)));
57
- }, [s, u, r, a]), /* @__PURE__ */ Q(
58
- _,
70
+ }, [E, w, n, s]), m(() => {
71
+ var e;
72
+ return o && (t.current = void 0, (e = c.current) != null && e.querySelector("iframe") && window.addEventListener("message", d)), () => {
73
+ window.removeEventListener("message", d);
74
+ };
75
+ }, [o, d]), m(() => {
76
+ var e, r;
77
+ if (u && o) {
78
+ const i = (e = c.current) == null ? void 0 : e.querySelector("iframe");
79
+ i && ((r = i.contentWindow) == null || r.postMessage(
80
+ {
81
+ type: "SIM_STATE_UPDATE",
82
+ payload: u
83
+ },
84
+ "*"
85
+ ));
86
+ }
87
+ }, [o, a, u]), m(() => {
88
+ o && s && a && s !== t.current && (t.current ? t.current = s : (t.current = s, y(s)));
89
+ }, [o, a, s, y]), /* @__PURE__ */ S(
90
+ $,
59
91
  {
60
- ref: o,
61
- $isConceptIntro: $,
62
- $isTeacher: u,
63
- children: /* @__PURE__ */ Q("div", { className: `learnosity-response question-${t.response_id}` })
92
+ ref: c,
93
+ $isConceptIntro: h,
94
+ $isTeacher: a,
95
+ children: /* @__PURE__ */ S("div", { className: `learnosity-response question-${n.response_id}` })
64
96
  }
65
97
  );
66
98
  }
67
99
  );
68
100
  export {
69
- g as default
101
+ D as default
70
102
  };
71
103
  //# sourceMappingURL=learnosity-question.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"learnosity-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/learnosity-question.tsx"],"sourcesContent":["import type { ILearnosityQuestionResponse } from '../worksheet-types';\nimport type { ILearnosityQuestionProps } from './worksheet-question-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef } from 'react';\n\nimport useLearnosityAppend from '../hooks/use-learnosity-append';\nimport * as Styled from './worksheet-question-styled';\n\nconst LearnosityQuestion: FC<ILearnosityQuestionProps> = memo(\n ({\n signedRequest,\n appended,\n canRender,\n canForceAppend,\n question,\n response,\n learnosity,\n isConceptIntro,\n }) => {\n const containerElementRef = useRef<HTMLDivElement>(null);\n const latestQuestionResponseRef = useRef<ILearnosityQuestionResponse | undefined>(response);\n const { forceAppend } = useLearnosityAppend(signedRequest);\n\n const updateResponse = useCallback(\n (newResponse: ILearnosityQuestionResponse) => {\n window.requestAnimationFrame(() => {\n const questionElement = document.createElement('div');\n\n questionElement.classList.add('learnosity-response');\n questionElement.classList.add(`question-${question.response_id}`);\n // Drawing questions looks for already appended path elements with id, if present it will not append the path, to overcome this issue we are adding temp to the id\n containerElementRef.current?.children[0]?.querySelectorAll('svg path').forEach(path => {\n path.id = `${path.id} + temp`;\n });\n\n containerElementRef.current?.append(questionElement);\n forceAppend({\n question,\n response: newResponse,\n callback: error => {\n if (error) return;\n\n containerElementRef.current?.children[0]?.remove();\n\n if (\n latestQuestionResponseRef.current &&\n latestQuestionResponseRef.current !== newResponse\n )\n updateResponse(latestQuestionResponseRef.current);\n else latestQuestionResponseRef.current = undefined;\n },\n });\n });\n },\n [forceAppend, question],\n );\n\n const appendQuestionCalledRef = useRef(false);\n\n useEffect(() => {\n let requestId: number;\n\n if (canRender) {\n if (!appendQuestionCalledRef.current) {\n requestId = window.requestAnimationFrame(() => {\n const appenndableResponse = latestQuestionResponseRef.current ?? response;\n\n appendQuestionCalledRef.current = true;\n learnosity.appendQuestion({\n questions: [question],\n ...(appenndableResponse\n ? {\n responses: {\n [question.response_id]: {\n // Learnosity is mutating the response object, so we need to clone it\n ...appenndableResponse,\n },\n },\n }\n : {}),\n });\n });\n }\n }\n\n return () => {\n if (requestId) window.cancelAnimationFrame(requestId);\n };\n }, [canRender, learnosity, question, response]);\n\n useEffect(() => {\n if (appended) {\n latestQuestionResponseRef.current = undefined;\n }\n }, [appended]);\n\n useEffect(() => {\n if (appended && response && canForceAppend) {\n if (response !== latestQuestionResponseRef.current) {\n if (!latestQuestionResponseRef.current) {\n latestQuestionResponseRef.current = response;\n updateResponse(response);\n } else {\n latestQuestionResponseRef.current = response;\n }\n }\n }\n }, [appended, canForceAppend, response, updateResponse]);\n\n return (\n <Styled.LearnosityQuestionContainer\n ref={containerElementRef}\n $isConceptIntro={isConceptIntro}\n $isTeacher={canForceAppend}\n >\n <div className={`learnosity-response question-${question.response_id}`} />\n </Styled.LearnosityQuestionContainer>\n );\n },\n);\n\nexport default LearnosityQuestion;\n"],"names":["LearnosityQuestion","memo","signedRequest","appended","canRender","canForceAppend","question","response","learnosity","isConceptIntro","containerElementRef","useRef","latestQuestionResponseRef","forceAppend","useLearnosityAppend","updateResponse","useCallback","newResponse","questionElement","_b","_a","path","_c","error","appendQuestionCalledRef","useEffect","requestId","appenndableResponse","jsx","Styled.LearnosityQuestionContainer"],"mappings":";;;;AASA,MAAMA,IAAmDC;AAAA,EACvD,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAsBC,EAAuB,IAAI,GACjDC,IAA4BD,EAAgDJ,CAAQ,GACpF,EAAE,aAAAM,EAAA,IAAgBC,EAAoBZ,CAAa,GAEnDa,IAAiBC;AAAA,MACrB,CAACC,MAA6C;AAC5C,eAAO,sBAAsB,MAAM;;AAC3B,gBAAAC,IAAkB,SAAS,cAAc,KAAK;AAEpC,UAAAA,EAAA,UAAU,IAAI,qBAAqB,GACnDA,EAAgB,UAAU,IAAI,YAAYZ,EAAS,WAAW,EAAE,IAE5Ca,KAAAC,IAAAV,EAAA,YAAA,gBAAAU,EAAS,SAAS,OAAlB,QAAAD,EAAsB,iBAAiB,YAAY,QAAQ,CAAQE,MAAA;AAChF,YAAAA,EAAA,KAAK,GAAGA,EAAK,EAAE;AAAA,UAAA,KAGFC,IAAAZ,EAAA,YAAA,QAAAY,EAAS,OAAOJ,IACxBL,EAAA;AAAA,YACV,UAAAP;AAAA,YACA,UAAUW;AAAA,YACV,UAAU,CAASM,MAAA;;AACjB,cAAIA,OAEJJ,KAAAC,IAAAV,EAAoB,YAApB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AAW,IAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EAG9E;AACF;"}
1
+ {"version":3,"file":"learnosity-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/learnosity-question.tsx"],"sourcesContent":["import type { ILearnosityQuestionResponse } from '../worksheet-types';\nimport type { ILearnosityQuestionProps } from './worksheet-question-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef } from 'react';\n\nimport useLearnosityAppend from '../hooks/use-learnosity-append';\nimport * as Styled from './worksheet-question-styled';\n\nconst LearnosityQuestion: FC<ILearnosityQuestionProps> = memo(\n ({\n signedRequest,\n appended,\n canRender,\n canForceAppend,\n question,\n response,\n learnosity,\n isConceptIntro,\n simState,\n onMediaStateChange,\n }) => {\n const containerElementRef = useRef<HTMLDivElement>(null);\n const latestQuestionResponseRef = useRef<ILearnosityQuestionResponse | undefined>(response);\n const { forceAppend } = useLearnosityAppend(signedRequest);\n\n const handleSimIframeMessage = useCallback(\n (event: MessageEvent) => {\n const { source, data } = event;\n const { type } = data ?? ({} as { type: string });\n\n if (type === 'SIM_IS_READY') {\n (source as Window).postMessage(\n {\n type: 'SIMULATION_CONFIG',\n payload: {\n userRole: canForceAppend ? 'teacher' : 'student',\n simulationState: simState,\n },\n },\n '*',\n );\n } else if (type === 'SIM_STATE_UPDATE') {\n onMediaStateChange(question, 'SIMULATION', event.data.payload);\n }\n },\n [canForceAppend, simState, onMediaStateChange, question],\n );\n\n const updateResponse = useCallback(\n (newResponse: ILearnosityQuestionResponse) => {\n window.requestAnimationFrame(() => {\n const questionElement = document.createElement('div');\n\n questionElement.classList.add('learnosity-response');\n questionElement.classList.add(`question-${question.response_id}`);\n // Drawing questions looks for already appended path elements with id, if present it will not append the path, to overcome this issue we are adding temp to the id\n containerElementRef.current?.children[0]?.querySelectorAll('svg path').forEach(path => {\n path.id = `${path.id} + temp`;\n });\n\n containerElementRef.current?.append(questionElement);\n forceAppend({\n question,\n response: newResponse,\n callback: error => {\n if (error) return;\n\n containerElementRef.current?.children[0]?.remove();\n\n if (\n latestQuestionResponseRef.current &&\n latestQuestionResponseRef.current !== newResponse\n )\n updateResponse(latestQuestionResponseRef.current);\n else latestQuestionResponseRef.current = undefined;\n },\n });\n });\n },\n [forceAppend, question],\n );\n\n const appendQuestionCalledRef = useRef(false);\n\n useEffect(() => {\n let requestId: number;\n\n if (canRender) {\n if (!appendQuestionCalledRef.current) {\n requestId = window.requestAnimationFrame(() => {\n const appenndableResponse = latestQuestionResponseRef.current ?? response;\n\n appendQuestionCalledRef.current = true;\n learnosity.appendQuestion({\n questions: [question],\n ...(appenndableResponse\n ? {\n responses: {\n [question.response_id]: {\n // Learnosity is mutating the response object, so we need to clone it\n ...appenndableResponse,\n },\n },\n }\n : {}),\n });\n });\n }\n }\n\n return () => {\n if (requestId) window.cancelAnimationFrame(requestId);\n };\n }, [canRender, learnosity, question, response]);\n\n useEffect(() => {\n if (appended) {\n latestQuestionResponseRef.current = undefined;\n\n if (containerElementRef.current?.querySelector('iframe')) {\n window.addEventListener('message', handleSimIframeMessage);\n }\n }\n\n return () => {\n window.removeEventListener('message', handleSimIframeMessage);\n };\n }, [appended, handleSimIframeMessage]);\n\n useEffect(() => {\n if (simState && appended) {\n const simIframe = containerElementRef.current?.querySelector('iframe');\n\n if (simIframe) {\n simIframe.contentWindow?.postMessage(\n {\n type: 'SIM_STATE_UPDATE',\n payload: simState,\n },\n '*',\n );\n }\n }\n }, [appended, canForceAppend, simState]);\n\n useEffect(() => {\n if (appended && response && canForceAppend) {\n if (response !== latestQuestionResponseRef.current) {\n if (!latestQuestionResponseRef.current) {\n latestQuestionResponseRef.current = response;\n updateResponse(response);\n } else {\n latestQuestionResponseRef.current = response;\n }\n }\n }\n }, [appended, canForceAppend, response, updateResponse]);\n\n return (\n <Styled.LearnosityQuestionContainer\n ref={containerElementRef}\n $isConceptIntro={isConceptIntro}\n $isTeacher={canForceAppend}\n >\n <div className={`learnosity-response question-${question.response_id}`} />\n </Styled.LearnosityQuestionContainer>\n );\n },\n);\n\nexport default LearnosityQuestion;\n"],"names":["LearnosityQuestion","memo","signedRequest","appended","canRender","canForceAppend","question","response","learnosity","isConceptIntro","simState","onMediaStateChange","containerElementRef","useRef","latestQuestionResponseRef","forceAppend","useLearnosityAppend","handleSimIframeMessage","useCallback","event","source","data","type","updateResponse","newResponse","questionElement","_b","_a","path","_c","error","appendQuestionCalledRef","useEffect","requestId","appenndableResponse","simIframe","jsx","Styled.LearnosityQuestionContainer"],"mappings":";;;;AASA,MAAMA,IAAmDC;AAAA,EACvD,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAsBC,EAAuB,IAAI,GACjDC,IAA4BD,EAAgDN,CAAQ,GACpF,EAAE,aAAAQ,EAAA,IAAgBC,EAAoBd,CAAa,GAEnDe,IAAyBC;AAAA,MAC7B,CAACC,MAAwB;AACjB,cAAA,EAAE,QAAAC,GAAQ,MAAAC,EAAS,IAAAF,GACnB,EAAE,MAAAG,EAAA,IAASD,KAAS;AAE1B,QAAIC,MAAS,iBACVF,EAAkB;AAAA,UACjB;AAAA,YACE,MAAM;AAAA,YACN,SAAS;AAAA,cACP,UAAUf,IAAiB,YAAY;AAAA,cACvC,iBAAiBK;AAAA,YACnB;AAAA,UACF;AAAA,UACA;AAAA,QAAA,IAEOY,MAAS,sBAClBX,EAAmBL,GAAU,cAAca,EAAM,KAAK,OAAO;AAAA,MAEjE;AAAA,MACA,CAACd,GAAgBK,GAAUC,GAAoBL,CAAQ;AAAA,IAAA,GAGnDiB,IAAiBL;AAAA,MACrB,CAACM,MAA6C;AAC5C,eAAO,sBAAsB,MAAM;;AAC3B,gBAAAC,IAAkB,SAAS,cAAc,KAAK;AAEpC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