catchup-library-web 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/index.d.mts +4 -5
  2. package/dist/index.d.ts +4 -5
  3. package/dist/index.js +274 -323
  4. package/dist/index.mjs +272 -321
  5. package/package.json +1 -1
  6. package/src/components/activities/ActivityPreviewByAnswerData.tsx +3 -3
  7. package/src/components/activities/ActivityPreviewByData.tsx +3 -4
  8. package/src/components/activities/DropdownActivityContent.tsx +3 -9
  9. package/src/components/activities/FillInTheBlanksActivityContent.tsx +4 -10
  10. package/src/components/activities/GroupingActivityContent.tsx +3 -3
  11. package/src/components/activities/MCMAActivityContent.tsx +3 -2
  12. package/src/components/activities/MCSAActivityContent.tsx +3 -2
  13. package/src/components/activities/MatchingActivityContent.tsx +3 -3
  14. package/src/components/activities/OpenEndedActivityContent.tsx +4 -2
  15. package/src/components/activities/OrderingActivityContent.tsx +3 -2
  16. package/src/components/activities/TrueFalseActivityContent.tsx +3 -2
  17. package/src/components/activities/{body-content → body-contents}/ShowBodyMediaByContentType.tsx +1 -1
  18. package/src/components/activities/{evaluation-rubric-content → evaluation-rubric-contents}/ActivityEvaluationRubricContent.tsx +1 -1
  19. package/src/components/activities/{material-content → material-contents}/DropdownActivityMaterialContent.tsx +3 -3
  20. package/src/components/activities/{material-content → material-contents}/FillInTheBlanksActivityMaterialContent.tsx +2 -2
  21. package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +354 -0
  22. package/src/components/activities/{material-content → material-contents}/MCMAActivityMaterialContent.tsx +2 -2
  23. package/src/components/activities/{material-content → material-contents}/MCSAActivityMaterialContent.tsx +2 -2
  24. package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +342 -0
  25. package/src/components/activities/{material-content → material-contents}/OrderingActivityMaterialContent.tsx +7 -5
  26. package/src/components/activities/{material-content → material-contents}/ShowMaterialMediaByContentType.tsx +4 -4
  27. package/src/components/activities/{material-content → material-contents}/TrueFalseActivityMaterialContent.tsx +1 -1
  28. package/src/components/activities/{solution-content → solution-contents}/ActivitySolutionContent.tsx +1 -1
  29. package/src/index.ts +4 -4
  30. package/src/properties/ActivityProperties.ts +1 -2
  31. package/src/components/activities/material-content/GroupingActivityMaterialContent.tsx +0 -359
  32. package/src/components/activities/material-content/MatchingActivityMaterialContent.tsx +0 -332
  33. /package/src/components/activities/{body-content → body-contents}/ActivityBodyContent.tsx +0 -0
  34. /package/src/components/activities/{empty-content → empty-contents}/ActivityEmptyContent.tsx +0 -0
  35. /package/src/components/activities/{material-content → material-contents}/OpenEndedActivityMaterialContent.tsx +0 -0
package/dist/index.js CHANGED
@@ -1273,14 +1273,14 @@ var BasePDF = ({ file }) => {
1273
1273
  };
1274
1274
  var BasePDF_default = BasePDF;
1275
1275
 
1276
- // src/components/activities/empty-content/ActivityEmptyContent.tsx
1276
+ // src/components/activities/empty-contents/ActivityEmptyContent.tsx
1277
1277
  var import_jsx_runtime17 = require("react/jsx-runtime");
1278
1278
  var ActivityEmptyContent = () => {
1279
1279
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-col items-center justify-center border-2 border-catchup-orange rounded-catchup-xlarge px-5 py-2 my-5 bg-catchup-orange", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-catchup-white text-xl", children: i18n_default.t("you_have_set_this_activity_as_empty") }) }) });
1280
1280
  };
1281
1281
  var ActivityEmptyContent_default = ActivityEmptyContent;
1282
1282
 
1283
- // src/components/activities/body-content/ShowBodyMediaByContentType.tsx
1283
+ // src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
1284
1284
  var import_react11 = require("react");
1285
1285
  var import_react_modal2 = __toESM(require("react-modal"));
1286
1286
 
@@ -3363,7 +3363,7 @@ var retrieveOpticalExamPartTypeOptionList = () => {
3363
3363
  ];
3364
3364
  };
3365
3365
 
3366
- // src/components/activities/body-content/ShowBodyMediaByContentType.tsx
3366
+ // src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
3367
3367
  var import_react_katex = require("react-katex");
3368
3368
  var import_jsx_runtime18 = require("react/jsx-runtime");
3369
3369
  var ShowBodyMediaByContentType = ({
@@ -3391,7 +3391,7 @@ var ShowBodyMediaByContentType = ({
3391
3391
  "span",
3392
3392
  {
3393
3393
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
3394
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
3394
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
3395
3395
  },
3396
3396
  inputPartIndex
3397
3397
  );
@@ -3736,7 +3736,7 @@ var ShowBodyMediaByContentType = ({
3736
3736
  };
3737
3737
  var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
3738
3738
 
3739
- // src/components/activities/body-content/ActivityBodyContent.tsx
3739
+ // src/components/activities/body-contents/ActivityBodyContent.tsx
3740
3740
  var import_jsx_runtime19 = require("react/jsx-runtime");
3741
3741
  var ActivityBodyContent = ({
3742
3742
  templateType,
@@ -3845,7 +3845,7 @@ var VerticalDividerLine = () => {
3845
3845
  };
3846
3846
  var VerticalDividerLine_default = VerticalDividerLine;
3847
3847
 
3848
- // src/components/activities/material-content/DropdownActivityMaterialContent.tsx
3848
+ // src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
3849
3849
  var import_react_katex2 = require("react-katex");
3850
3850
 
3851
3851
  // src/components/groups/InputGroup.tsx
@@ -4276,7 +4276,7 @@ var InputGroup = ({
4276
4276
  };
4277
4277
  var InputGroup_default = InputGroup;
4278
4278
 
4279
- // src/components/activities/material-content/DropdownActivityMaterialContent.tsx
4279
+ // src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
4280
4280
  var import_react15 = require("react");
4281
4281
  var import_react16 = require("react");
4282
4282
 
@@ -4425,7 +4425,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
4425
4425
  };
4426
4426
  var MediaDropdown_default = MediaDropdown;
4427
4427
 
4428
- // src/components/activities/material-content/ShowMaterialMediaByContentType.tsx
4428
+ // src/components/activities/material-contents/ShowMaterialMediaByContentType.tsx
4429
4429
  var import_react14 = require("react");
4430
4430
  var import_react_modal3 = __toESM(require("react-modal"));
4431
4431
  var import_jsx_runtime24 = require("react/jsx-runtime");
@@ -4518,7 +4518,7 @@ var ShowMaterialMediaByContentType = ({
4518
4518
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
4519
4519
  "div",
4520
4520
  {
4521
- className: `${isFullHeight ? "h-catchup-activity-box-item" : "max-w-catchup-activity-box-item"} flex flex-col justify-center items-center relative`,
4521
+ className: `${isFullHeight ? "h-catchup-activity-media-box-item" : "max-w-catchup-activity-media-box-item"} flex flex-col justify-center items-center relative`,
4522
4522
  children: [
4523
4523
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4524
4524
  BaseImage_default,
@@ -4562,7 +4562,7 @@ var ShowMaterialMediaByContentType = ({
4562
4562
  ] }, key) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4563
4563
  "video",
4564
4564
  {
4565
- className: "h-catchup-activity-box-item rounded-catchup-xlarge",
4565
+ className: "h-catchup-activity-media-box-item rounded-catchup-xlarge",
4566
4566
  src,
4567
4567
  controls: true,
4568
4568
  onClick: () => {
@@ -4571,7 +4571,7 @@ var ShowMaterialMediaByContentType = ({
4571
4571
  ) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4572
4572
  "audio",
4573
4573
  {
4574
- className: "h-catchup-activity-box-item rounded-catchup-xlarge",
4574
+ className: "h-catchup-activity-media-box-item rounded-catchup-xlarge",
4575
4575
  src,
4576
4576
  controls: true,
4577
4577
  onClick: () => {
@@ -4581,7 +4581,7 @@ var ShowMaterialMediaByContentType = ({
4581
4581
  };
4582
4582
  var ShowMaterialMediaByContentType_default = ShowMaterialMediaByContentType;
4583
4583
 
4584
- // src/components/activities/material-content/DropdownActivityMaterialContent.tsx
4584
+ // src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
4585
4585
  var import_jsx_runtime25 = require("react/jsx-runtime");
4586
4586
  var DropdownActivityMaterialContent = ({
4587
4587
  uniqueValue,
@@ -4654,7 +4654,7 @@ var DropdownActivityMaterialContent = ({
4654
4654
  "span",
4655
4655
  {
4656
4656
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
4657
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4657
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4658
4658
  import_react_katex2.InlineMath,
4659
4659
  {
4660
4660
  math: inputPart.value
@@ -4673,7 +4673,7 @@ var DropdownActivityMaterialContent = ({
4673
4673
  MediaDropdown_default,
4674
4674
  {
4675
4675
  id: materialKey,
4676
- answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4676
+ answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-catchup-activity-media-box-item h-catchup-activity-media-box-item border rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4677
4677
  ShowMaterialMediaByContentType_default,
4678
4678
  {
4679
4679
  contentType: contentMap.type,
@@ -4710,7 +4710,7 @@ var DropdownActivityMaterialContent = ({
4710
4710
  "span",
4711
4711
  {
4712
4712
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
4713
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }) }) : inputPart.value
4713
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }) }) : inputPart.value
4714
4714
  },
4715
4715
  index2
4716
4716
  )) }) }),
@@ -4764,6 +4764,7 @@ var DropdownActivityContent = ({
4764
4764
  setCurrentAnswerMap(retrieveCurrentAnswerMap());
4765
4765
  }, [answer]);
4766
4766
  const handleDropdownAnswerOnChange = (answerObj, key, value) => {
4767
+ if (isPreview) return;
4767
4768
  const newAnswer = __spreadProps(__spreadValues({}, answerObj), {
4768
4769
  data: answerObj.data.map((item) => {
4769
4770
  if (item.type === "DROPDOWN") {
@@ -4809,7 +4810,7 @@ var DropdownActivityContent = ({
4809
4810
  };
4810
4811
  var DropdownActivityContent_default = DropdownActivityContent;
4811
4812
 
4812
- // src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
4813
+ // src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
4813
4814
  var import_react_katex3 = require("react-katex");
4814
4815
  var import_react19 = require("react");
4815
4816
  var import_react20 = require("react");
@@ -4874,7 +4875,7 @@ var DroppableItem = ({
4874
4875
  };
4875
4876
  var DroppableItem_default = DroppableItem;
4876
4877
 
4877
- // src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
4878
+ // src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
4878
4879
  var import_jsx_runtime29 = require("react/jsx-runtime");
4879
4880
  var FillInTheBlanksActivityMaterialContent = ({
4880
4881
  uniqueValue,
@@ -5040,7 +5041,7 @@ var FillInTheBlanksActivityMaterialContent = ({
5040
5041
  ] }) : answerMap[materialKey] === "" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5041
5042
  "div",
5042
5043
  {
5043
- className: `w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5044
+ className: `w-catchup-activity-media-box-item h-catchup-activity-media-box-item border rounded-catchup-xlarge border-dashed ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5044
5045
  children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
5045
5046
  }
5046
5047
  ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
@@ -5066,7 +5067,7 @@ var FillInTheBlanksActivityMaterialContent = ({
5066
5067
  "span",
5067
5068
  {
5068
5069
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5069
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }) }) : inputPart.value
5070
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }) }) : inputPart.value
5070
5071
  },
5071
5072
  index2
5072
5073
  )) }, materialKey) })
@@ -5132,6 +5133,7 @@ var FillInTheBlanksActivityContent = ({
5132
5133
  return optionList;
5133
5134
  };
5134
5135
  const handleFillInTheBlanksAnswerOnChange = (answerObj, key, value) => {
5136
+ if (isPreview) return;
5135
5137
  const newAnswer = __spreadProps(__spreadValues({}, answerObj), {
5136
5138
  data: answerObj.data.map((item) => {
5137
5139
  if (item.type === "FILL_IN_THE_BLANKS") {
@@ -5178,47 +5180,10 @@ var FillInTheBlanksActivityContent = ({
5178
5180
  };
5179
5181
  var FillInTheBlanksActivityContent_default = FillInTheBlanksActivityContent;
5180
5182
 
5181
- // src/components/activities/material-content/GroupingActivityMaterialContent.tsx
5182
- var import_react23 = require("react");
5183
+ // src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
5184
+ var import_react22 = require("react");
5183
5185
  var import_react_dnd4 = require("react-dnd");
5184
5186
  var import_react_katex4 = require("react-katex");
5185
-
5186
- // src/hooks/useScreenSize.ts
5187
- var import_react22 = require("react");
5188
- var useScreenSize = () => {
5189
- const [containerSize, setContainerSize] = (0, import_react22.useState)({
5190
- width: 0,
5191
- height: 0
5192
- });
5193
- const [screenSize, setScreenSize] = (0, import_react22.useState)({
5194
- width: window.innerWidth,
5195
- height: window.innerHeight
5196
- });
5197
- (0, import_react22.useEffect)(() => {
5198
- const handleResize = () => {
5199
- setScreenSize({
5200
- width: window.innerWidth,
5201
- height: window.innerHeight
5202
- });
5203
- const container = document.getElementById("container");
5204
- if (!container) return;
5205
- const boundingClientRect = container.getBoundingClientRect();
5206
- setContainerSize({
5207
- width: boundingClientRect.width,
5208
- height: boundingClientRect.height
5209
- });
5210
- };
5211
- handleResize();
5212
- window.addEventListener("resize", handleResize);
5213
- return () => {
5214
- window.removeEventListener("resize", handleResize);
5215
- };
5216
- }, []);
5217
- return { screenSize, containerSize };
5218
- };
5219
- var useScreenSize_default = useScreenSize;
5220
-
5221
- // src/components/activities/material-content/GroupingActivityMaterialContent.tsx
5222
5187
  var import_jsx_runtime31 = require("react/jsx-runtime");
5223
5188
  var GroupingActivityMaterialContent = ({
5224
5189
  uniqueValue,
@@ -5230,11 +5195,10 @@ var GroupingActivityMaterialContent = ({
5230
5195
  isPreview,
5231
5196
  showCorrectAnswer
5232
5197
  }) => {
5233
- const [selectedValue, setSelectedValue] = (0, import_react23.useState)(null);
5234
- const [selectedTargetKey, setSelectedTargetKey] = (0, import_react23.useState)(null);
5235
- const [isShuffled, setIsShuffled] = (0, import_react23.useState)(false);
5236
- const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react23.useState)([]);
5237
- const { screenSize, containerSize } = useScreenSize_default();
5198
+ const [selectedValue, setSelectedValue] = (0, import_react22.useState)(null);
5199
+ const [selectedTargetKey, setSelectedTargetKey] = (0, import_react22.useState)(null);
5200
+ const [isShuffled, setIsShuffled] = (0, import_react22.useState)(false);
5201
+ const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react22.useState)([]);
5238
5202
  const [{ isOver, canDrop }, drop] = (0, import_react_dnd4.useDrop)({
5239
5203
  accept: "GROUPING",
5240
5204
  drop: () => {
@@ -5244,16 +5208,8 @@ var GroupingActivityMaterialContent = ({
5244
5208
  canDrop: monitor.canDrop()
5245
5209
  })
5246
5210
  });
5247
- const ref = (0, import_react23.useRef)(null);
5248
- const itemsRef = (0, import_react23.useRef)(null);
5249
- const [maxWidth, setMaxWidth] = (0, import_react23.useState)(0);
5250
- (0, import_react23.useEffect)(() => {
5251
- if (!ref) return;
5252
- if (!ref.current) return;
5253
- if (!screenSize) return;
5254
- setMaxWidth(ref.current.offsetWidth - 12);
5255
- }, [ref, screenSize]);
5256
- (0, import_react23.useEffect)(() => {
5211
+ const ref = (0, import_react22.useRef)(null);
5212
+ (0, import_react22.useEffect)(() => {
5257
5213
  const shuffleArray2 = (array) => {
5258
5214
  if (!isShuffled) {
5259
5215
  const copyArray = JSON.parse(JSON.stringify(array));
@@ -5274,7 +5230,7 @@ var GroupingActivityMaterialContent = ({
5274
5230
  });
5275
5231
  setShuffledMaterialList(shuffleArray2(materialList));
5276
5232
  }, []);
5277
- (0, import_react23.useEffect)(() => {
5233
+ (0, import_react22.useEffect)(() => {
5278
5234
  if (!showCorrectAnswer) return;
5279
5235
  answer.data.find(
5280
5236
  (answerData) => answerData.type === "GROUPING"
@@ -5319,82 +5275,71 @@ var GroupingActivityMaterialContent = ({
5319
5275
  const answerMap = retrieveAnswerMap();
5320
5276
  const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
5321
5277
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
5322
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5323
- "div",
5324
- {
5325
- ref: itemsRef,
5326
- className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
5327
- children: filteredMaterialList.map((materialValue, index) => {
5328
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5329
- DraggableItem_default,
5330
- {
5331
- item: { index: materialValue },
5332
- type: "GROUPING",
5333
- component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5334
- "div",
5335
- {
5336
- className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
5337
- onMouseDown: () => {
5338
- if (checkCanAnswerQuestion()) {
5339
- setSelectedValue(materialValue);
5340
- }
5278
+ filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
5279
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
5280
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5281
+ DraggableItem_default,
5282
+ {
5283
+ item: { index: materialValue },
5284
+ type: "GROUPING",
5285
+ component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5286
+ "div",
5287
+ {
5288
+ className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} ${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
5289
+ onMouseDown: () => {
5290
+ if (checkCanAnswerQuestion()) {
5291
+ setSelectedValue(materialValue);
5292
+ }
5293
+ },
5294
+ onMouseUp: () => {
5295
+ if (checkCanAnswerQuestion()) {
5296
+ setSelectedValue(null);
5297
+ }
5298
+ },
5299
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5300
+ materialValue
5301
+ ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5302
+ "span",
5303
+ {
5304
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5305
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
5341
5306
  },
5342
- onMouseUp: () => {
5343
- if (checkCanAnswerQuestion()) {
5344
- setSelectedValue(null);
5345
- }
5307
+ index2
5308
+ )) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5309
+ ShowMaterialMediaByContentType_default,
5310
+ {
5311
+ contentType: contentMap.type,
5312
+ src: materialValue,
5313
+ canFullScreen: true
5346
5314
  },
5347
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5348
- "div",
5349
- {
5350
- className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
5351
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5352
- materialValue
5353
- ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5354
- "span",
5355
- {
5356
- className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5357
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
5358
- },
5359
- index2
5360
- )) })
5361
- }
5362
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5363
- ShowMaterialMediaByContentType_default,
5364
- {
5365
- contentType: contentMap.type,
5366
- src: materialValue,
5367
- canFullScreen: true
5368
- },
5369
- `${uniqueValue}-${index}`
5370
- )
5371
- }
5372
- ),
5373
- moveCardHandler: () => {
5374
- if (!selectedTargetKey) return;
5375
- if (!selectedValue) return;
5376
- handleGroupingActivityItemOnChange(
5377
- selectedTargetKey,
5378
- selectedValue
5379
- );
5315
+ `${uniqueValue}-${index}`
5316
+ )
5380
5317
  }
5381
- },
5382
- index
5383
- );
5384
- })
5385
- }
5386
- ),
5387
- filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {}) : null,
5388
- Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row w-full", children: [
5318
+ ),
5319
+ moveCardHandler: () => {
5320
+ if (!selectedTargetKey) return;
5321
+ if (!selectedValue) return;
5322
+ handleGroupingActivityItemOnChange(
5323
+ selectedTargetKey,
5324
+ selectedValue
5325
+ );
5326
+ }
5327
+ },
5328
+ index
5329
+ );
5330
+ }) }),
5331
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {})
5332
+ ] }) : null,
5333
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row w-full", children: [
5389
5334
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5390
5335
  "div",
5391
5336
  {
5392
- className: `border-catchup-blue h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
5337
+ className: `border-catchup-blue ${contentMap.type === "TEXT" ? "h-catchup-activity-text-outer-box-item" : "h-catchup-activity-media-outer-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
5393
5338
  children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5394
5339
  "div",
5395
5340
  {
5396
5341
  className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
5397
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
5342
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
5398
5343
  (inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5399
5344
  "span",
5400
5345
  {
@@ -5409,7 +5354,7 @@ var GroupingActivityMaterialContent = ({
5409
5354
  }
5410
5355
  ) }),
5411
5356
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
5412
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1", ref, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-full py-3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5357
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1 min-w-0", ref, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-full py-3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5413
5358
  "div",
5414
5359
  {
5415
5360
  className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} flex-1 border-catchup-blue rounded-catchup-xlarge border-2 h-full p-1`,
@@ -5421,20 +5366,17 @@ var GroupingActivityMaterialContent = ({
5421
5366
  target: selectedTargetKey,
5422
5367
  setTarget: setSelectedTargetKey,
5423
5368
  dropRef: drop,
5424
- component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5425
- "div",
5426
- {
5427
- className: "h-full flex-1 flex flex-row items-center overflow-x-auto",
5428
- style: {
5429
- maxWidth
5430
- },
5431
- children: answerMap[answerMapKey].map(
5432
- (answerMapValue, answerMapIndex) => {
5433
- const learnerAnswerState = checkAnswerState(
5434
- materialMap[answerMapKey],
5435
- answerMapValue
5436
- );
5437
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-catchup-activity-box-item", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5369
+ component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-full w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-row items-center gap-2 w-max h-full", children: answerMap[answerMapKey].map(
5370
+ (answerMapValue, answerMapIndex) => {
5371
+ const learnerAnswerState = checkAnswerState(
5372
+ materialMap[answerMapKey],
5373
+ answerMapValue
5374
+ );
5375
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5376
+ "div",
5377
+ {
5378
+ className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"}`,
5379
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5438
5380
  "div",
5439
5381
  {
5440
5382
  className: `${learnerAnswerState === "EMPTY" ? "border-catchup-lighter-gray" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"} border-2 rounded-catchup-xlarge h-full flex flex-col items-center justify-center transition-all duration-300 cursor-pointer`,
@@ -5450,47 +5392,41 @@ var GroupingActivityMaterialContent = ({
5450
5392
  setSelectedValue(null);
5451
5393
  }
5452
5394
  },
5453
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5454
- "div",
5395
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5396
+ answerMapValue
5397
+ ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5398
+ "span",
5455
5399
  {
5456
- className: `flex flex-col items-center justify-center transition-all duration-300 min-h-[64px] min-w-[200px]`,
5457
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5458
- answerMapValue
5459
- ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5460
- "span",
5400
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5401
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5402
+ import_react_katex4.InlineMath,
5461
5403
  {
5462
- className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5463
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5464
- import_react_katex4.InlineMath,
5465
- {
5466
- math: inputPart.value
5467
- }
5468
- ) }) : inputPart.value
5469
- },
5470
- index2
5471
- )) }) })
5472
- }
5473
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5404
+ math: inputPart.value
5405
+ }
5406
+ ) }) : inputPart.value
5407
+ },
5408
+ index2
5409
+ )) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5474
5410
  ShowMaterialMediaByContentType_default,
5475
5411
  {
5476
5412
  contentType: contentMap.type,
5477
5413
  src: answerMapValue,
5478
5414
  canFullScreen: false
5479
5415
  },
5480
- `${uniqueValue}-${index}`
5416
+ `${uniqueValue}-${answerMapIndex}`
5481
5417
  )
5482
5418
  }
5483
- ) }) });
5419
+ )
5484
5420
  }
5485
- )
5421
+ ) }, answerMapIndex);
5486
5422
  }
5487
- )
5423
+ ) }) })
5488
5424
  },
5489
5425
  index
5490
5426
  )
5491
5427
  }
5492
5428
  ) }) })
5493
- ] }, index))
5429
+ ] }, index)) })
5494
5430
  ] });
5495
5431
  };
5496
5432
  var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
@@ -5503,13 +5439,13 @@ var GroupingActivityContent = ({
5503
5439
  canAnswerQuestion,
5504
5440
  changeAnswer,
5505
5441
  isPreview,
5506
- showCorrectAnswer,
5507
- isFullScreen
5442
+ showCorrectAnswer
5508
5443
  }) => {
5509
5444
  const contentMap = parseContentMapFromData(data);
5510
5445
  const groupingBodyMap = parseBodyMapFromData(data, "GROUPING");
5511
5446
  const groupingMaterialMap = parseMaterialMapFromData(data, "GROUPING");
5512
5447
  const handleGroupingAnswerOnChange = (answer2, key, value, index) => {
5448
+ if (isPreview) return;
5513
5449
  let foundIndex = answer2.data.findIndex(
5514
5450
  (answerData) => answerData.type === "GROUPING"
5515
5451
  );
@@ -5547,8 +5483,8 @@ var GroupingActivityContent = ({
5547
5483
  };
5548
5484
  var GroupingActivityContent_default = GroupingActivityContent;
5549
5485
 
5550
- // src/components/activities/material-content/MatchingActivityMaterialContent.tsx
5551
- var import_react24 = require("react");
5486
+ // src/components/activities/material-contents/MatchingActivityMaterialContent.tsx
5487
+ var import_react23 = require("react");
5552
5488
  var import_react_dnd5 = require("react-dnd");
5553
5489
  var import_react_katex5 = require("react-katex");
5554
5490
  var import_jsx_runtime33 = require("react/jsx-runtime");
@@ -5562,10 +5498,10 @@ var MatchingActivityMaterialContent = ({
5562
5498
  isPreview,
5563
5499
  showCorrectAnswer
5564
5500
  }) => {
5565
- const [selectedValue, setSelectedValue] = (0, import_react24.useState)(null);
5566
- const [selectedTargetKey, setSelectedTargetKey] = (0, import_react24.useState)(null);
5567
- const [isShuffled, setIsShuffled] = (0, import_react24.useState)(false);
5568
- const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react24.useState)([]);
5501
+ const [selectedValue, setSelectedValue] = (0, import_react23.useState)(null);
5502
+ const [selectedTargetKey, setSelectedTargetKey] = (0, import_react23.useState)(null);
5503
+ const [isShuffled, setIsShuffled] = (0, import_react23.useState)(false);
5504
+ const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react23.useState)([]);
5569
5505
  const [{ isOver, canDrop }, drop] = (0, import_react_dnd5.useDrop)({
5570
5506
  accept: "MATCHING",
5571
5507
  drop: () => {
@@ -5575,9 +5511,8 @@ var MatchingActivityMaterialContent = ({
5575
5511
  canDrop: monitor.canDrop()
5576
5512
  })
5577
5513
  });
5578
- const { containerSize } = useScreenSize_default();
5579
- const itemsRef = (0, import_react24.useRef)(null);
5580
- (0, import_react24.useEffect)(() => {
5514
+ const itemsRef = (0, import_react23.useRef)(null);
5515
+ (0, import_react23.useEffect)(() => {
5581
5516
  const shuffleArray2 = (array) => {
5582
5517
  if (!isShuffled) {
5583
5518
  const copyArray = JSON.parse(JSON.stringify(array));
@@ -5596,31 +5531,17 @@ var MatchingActivityMaterialContent = ({
5596
5531
  });
5597
5532
  setShuffledMaterialList(shuffleArray2(materialList));
5598
5533
  }, []);
5599
- (0, import_react24.useEffect)(() => {
5534
+ (0, import_react23.useEffect)(() => {
5600
5535
  if (!showCorrectAnswer) return;
5601
5536
  answer.data.find(
5602
5537
  (answerData) => answerData.type === "MATCHING"
5603
5538
  ).answerMap = materialMap;
5604
5539
  }, [showCorrectAnswer]);
5605
- (0, import_react24.useEffect)(() => {
5606
- if (!itemsRef) return;
5607
- if (!itemsRef.current) return;
5608
- if (!containerSize) return;
5609
- itemsRef.current.style.width = `${containerSize.width - 220}px`;
5610
- }, [itemsRef, containerSize]);
5611
5540
  const retrieveAnswerMap = () => {
5612
5541
  const foundIndex = answer.data.findIndex(
5613
5542
  (answerData) => answerData.type === "MATCHING"
5614
5543
  );
5615
- const answerMap2 = answer.data[foundIndex].answerMap;
5616
- const sortedAnswerMapKeys = Object.keys(answerMap2).sort(
5617
- (a, b) => answerMap2[a] ? answerMap2[b] ? answerMap2[a].localeCompare(answerMap2[b]) : 1 : -1
5618
- );
5619
- const sortedAnswerMap = {};
5620
- for (const answerMapKey of sortedAnswerMapKeys) {
5621
- sortedAnswerMap[answerMapKey] = answerMap2[answerMapKey];
5622
- }
5623
- return sortedAnswerMap;
5544
+ return answer.data[foundIndex].answerMap;
5624
5545
  };
5625
5546
  const retrieveFilteredMaterialList = (answerMap2) => {
5626
5547
  const selectedValueList = [];
@@ -5648,71 +5569,73 @@ var MatchingActivityMaterialContent = ({
5648
5569
  const answerMap = retrieveAnswerMap();
5649
5570
  const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
5650
5571
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
5651
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5652
- "div",
5653
- {
5654
- ref: itemsRef,
5655
- className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
5656
- children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5657
- DraggableItem_default,
5658
- {
5659
- item: { index: materialValue },
5660
- type: "MATCHING",
5661
- component: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5662
- "div",
5663
- {
5664
- className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
5665
- onMouseDown: () => {
5666
- if (checkCanAnswerQuestion()) {
5667
- setSelectedValue(materialValue);
5668
- }
5669
- },
5670
- onMouseUp: () => {
5671
- if (checkCanAnswerQuestion()) {
5672
- setSelectedValue(null);
5673
- }
5674
- },
5675
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5676
- "div",
5677
- {
5678
- className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
5679
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5680
- materialValue
5681
- ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5682
- "span",
5683
- {
5684
- className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5685
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5686
- },
5687
- index2
5688
- )) })
5689
- }
5690
- ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5691
- ShowMaterialMediaByContentType_default,
5692
- {
5693
- contentType: contentMap.type,
5694
- src: materialValue,
5695
- canFullScreen: true
5572
+ filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
5573
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5574
+ "div",
5575
+ {
5576
+ ref: itemsRef,
5577
+ className: "flex-shrink-0 flex flex-row gap-x-4 gap-y-4 overflow-x-auto py-2",
5578
+ children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5579
+ DraggableItem_default,
5580
+ {
5581
+ item: { index: materialValue },
5582
+ type: "MATCHING",
5583
+ component: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5584
+ "div",
5585
+ {
5586
+ className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} ${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
5587
+ onMouseDown: () => {
5588
+ if (checkCanAnswerQuestion()) {
5589
+ setSelectedValue(materialValue);
5590
+ }
5696
5591
  },
5697
- `${uniqueValue}-${index}`
5698
- )
5592
+ onMouseUp: () => {
5593
+ if (checkCanAnswerQuestion()) {
5594
+ setSelectedValue(null);
5595
+ }
5596
+ },
5597
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5598
+ "div",
5599
+ {
5600
+ className: `flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto`,
5601
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5602
+ materialValue
5603
+ ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5604
+ "span",
5605
+ {
5606
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5607
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5608
+ },
5609
+ index2
5610
+ )) })
5611
+ }
5612
+ ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5613
+ ShowMaterialMediaByContentType_default,
5614
+ {
5615
+ contentType: contentMap.type,
5616
+ src: materialValue,
5617
+ canFullScreen: true
5618
+ },
5619
+ `${uniqueValue}-${index}`
5620
+ )
5621
+ }
5622
+ ),
5623
+ moveCardHandler: () => {
5624
+ if (!selectedTargetKey) return;
5625
+ if (!selectedValue) return;
5626
+ handleMatchingActivityItemOnChange(
5627
+ selectedTargetKey,
5628
+ selectedValue
5629
+ );
5699
5630
  }
5700
- ),
5701
- moveCardHandler: () => {
5702
- if (!selectedTargetKey) return;
5703
- if (!selectedValue) return;
5704
- handleMatchingActivityItemOnChange(
5705
- selectedTargetKey,
5706
- selectedValue
5707
- );
5708
- }
5709
- },
5710
- index
5711
- ))
5712
- }
5713
- ),
5714
- filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}) : null,
5715
- Object.keys(answerMap).map((answerMapKey, index) => {
5631
+ },
5632
+ index
5633
+ ))
5634
+ }
5635
+ ),
5636
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}) })
5637
+ ] }) : null,
5638
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
5716
5639
  const learnerAnswerState = checkAnswerState(
5717
5640
  materialMap[answerMapKey],
5718
5641
  answerMap[answerMapKey]
@@ -5721,30 +5644,24 @@ var MatchingActivityMaterialContent = ({
5721
5644
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5722
5645
  "div",
5723
5646
  {
5724
- className: `h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5725
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5726
- "div",
5647
+ className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5648
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 m-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5649
+ answerMapKey
5650
+ ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5651
+ "span",
5727
5652
  {
5728
- className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
5729
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
5730
- (inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5731
- "span",
5732
- {
5733
- className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5734
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5735
- },
5736
- index2
5737
- )
5738
- ) })
5739
- }
5740
- )
5653
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5654
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5655
+ },
5656
+ index2
5657
+ )) }) })
5741
5658
  }
5742
5659
  ) }),
5743
5660
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
5744
5661
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5745
5662
  "div",
5746
5663
  {
5747
- className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5664
+ className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} ${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
5748
5665
  onClick: () => {
5749
5666
  if (checkCanAnswerQuestion()) {
5750
5667
  setSelectedValue(null);
@@ -5761,7 +5678,7 @@ var MatchingActivityMaterialContent = ({
5761
5678
  component: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5762
5679
  "div",
5763
5680
  {
5764
- className: `h-full flex-1 flex flex-row items-center justify-center `,
5681
+ className: "h-full flex-1 flex flex-row items-center justify-center",
5765
5682
  onClick: (e) => {
5766
5683
  e.preventDefault();
5767
5684
  if (checkCanAnswerQuestion()) {
@@ -5771,13 +5688,13 @@ var MatchingActivityMaterialContent = ({
5771
5688
  );
5772
5689
  }
5773
5690
  },
5774
- children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5691
+ children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
5775
5692
  answerMap[answerMapKey]
5776
5693
  ).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5777
5694
  "span",
5778
5695
  {
5779
5696
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5780
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5697
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
5781
5698
  },
5782
5699
  index2
5783
5700
  )) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -5797,7 +5714,7 @@ var MatchingActivityMaterialContent = ({
5797
5714
  }
5798
5715
  ) })
5799
5716
  ] }, index);
5800
- })
5717
+ }) })
5801
5718
  ] });
5802
5719
  };
5803
5720
  var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
@@ -5810,13 +5727,13 @@ var MatchingActivityContent = ({
5810
5727
  canAnswerQuestion,
5811
5728
  changeAnswer,
5812
5729
  isPreview,
5813
- showCorrectAnswer,
5814
- isFullScreen
5730
+ showCorrectAnswer
5815
5731
  }) => {
5816
5732
  const contentMap = parseContentMapFromData(data);
5817
5733
  const matchingBodyMap = parseBodyMapFromData(data, "MATCHING");
5818
5734
  const matchingMaterialMap = parseMaterialMapFromData(data, "MATCHING");
5819
5735
  const handleMatchingAnswerOnChange = (answer2, key, value) => {
5736
+ if (isPreview) return;
5820
5737
  let foundIndex = answer2.data.findIndex(
5821
5738
  (answerData) => answerData.type === "MATCHING"
5822
5739
  );
@@ -5850,7 +5767,7 @@ var MatchingActivityContent = ({
5850
5767
  };
5851
5768
  var MatchingActivityContent_default = MatchingActivityContent;
5852
5769
 
5853
- // src/components/activities/material-content/MCMAActivityMaterialContent.tsx
5770
+ // src/components/activities/material-contents/MCMAActivityMaterialContent.tsx
5854
5771
  var import_react_katex6 = require("react-katex");
5855
5772
  var import_jsx_runtime35 = require("react/jsx-runtime");
5856
5773
  var MCMAActivityMaterialContent = ({
@@ -5925,7 +5842,7 @@ var MCMAActivityMaterialContent = ({
5925
5842
  "span",
5926
5843
  {
5927
5844
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5928
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
5845
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
5929
5846
  },
5930
5847
  index3
5931
5848
  )) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
@@ -5948,7 +5865,7 @@ var MCMAActivityMaterialContent = ({
5948
5865
  "span",
5949
5866
  {
5950
5867
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
5951
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
5868
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
5952
5869
  },
5953
5870
  index2
5954
5871
  )) }, materialKey)
@@ -5971,6 +5888,7 @@ var MCMAActivityContent = ({
5971
5888
  const MCMABodyMap = parseBodyMapFromData(data, "MCMA");
5972
5889
  const MCMAMaterialMap = parseMaterialMapFromData(data, "MCMA");
5973
5890
  const handleMCMAAnswerOnChange = (answer2, key, value) => {
5891
+ if (isPreview) return;
5974
5892
  let foundIndex = answer2.data.findIndex(
5975
5893
  (answerData) => answerData.type === "MCMA"
5976
5894
  );
@@ -6005,7 +5923,7 @@ var MCMAActivityContent = ({
6005
5923
  };
6006
5924
  var MCMAActivityContent_default = MCMAActivityContent;
6007
5925
 
6008
- // src/components/activities/material-content/MCSAActivityMaterialContent.tsx
5926
+ // src/components/activities/material-contents/MCSAActivityMaterialContent.tsx
6009
5927
  var import_react_katex7 = require("react-katex");
6010
5928
  var import_jsx_runtime37 = require("react/jsx-runtime");
6011
5929
  var MCSAActivityMaterialContent = ({
@@ -6075,7 +5993,7 @@ var MCSAActivityMaterialContent = ({
6075
5993
  "span",
6076
5994
  {
6077
5995
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6078
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
5996
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
6079
5997
  },
6080
5998
  index3
6081
5999
  )) }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
@@ -6100,7 +6018,7 @@ var MCSAActivityMaterialContent = ({
6100
6018
  "span",
6101
6019
  {
6102
6020
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6103
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
6021
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
6104
6022
  },
6105
6023
  index2
6106
6024
  )) })
@@ -6123,6 +6041,7 @@ var MCSAActivityContent = ({
6123
6041
  const MCSABodyMap = parseBodyMapFromData(data, "MCSA");
6124
6042
  const MCSAMaterialMap = parseMaterialMapFromData(data, "MCSA");
6125
6043
  const handleMCSAAnswerOnChange = (answer2, key, value) => {
6044
+ if (isPreview) return;
6126
6045
  let foundIndex = answer2.data.findIndex(
6127
6046
  (answerData) => answerData.type === "MCSA"
6128
6047
  );
@@ -6178,7 +6097,7 @@ var retrieveDocumentTypeFromExtension = (format) => {
6178
6097
  return "";
6179
6098
  };
6180
6099
 
6181
- // src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
6100
+ // src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx
6182
6101
  var import_jsx_runtime39 = require("react/jsx-runtime");
6183
6102
  var OpenEndedActivityMaterialContent = ({
6184
6103
  answer,
@@ -6291,11 +6210,13 @@ var OpenEndedActivityContent = ({
6291
6210
  changeAnswer,
6292
6211
  canAnswerQuestion,
6293
6212
  showMaterialContent,
6213
+ isPreview,
6294
6214
  isFullScreen
6295
6215
  }) => {
6296
6216
  const contentMap = parseContentMapFromData(data);
6297
6217
  const openEndedBodyMap = parseBodyMapFromData(data, "OPEN_ENDED");
6298
6218
  const handleOpenEndedAnswerOnChange = (answer2, value) => {
6219
+ if (isPreview) return;
6299
6220
  let foundIndex = answer2.data.findIndex(
6300
6221
  (answerData) => answerData.type === "OPEN_ENDED"
6301
6222
  );
@@ -6340,11 +6261,46 @@ var OpenEndedActivityContent = ({
6340
6261
  };
6341
6262
  var OpenEndedActivityContent_default = OpenEndedActivityContent;
6342
6263
 
6343
- // src/components/activities/material-content/OrderingActivityMaterialContent.tsx
6264
+ // src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
6344
6265
  var import_react26 = require("react");
6345
6266
  var import_react_dnd7 = require("react-dnd");
6346
6267
  var import_react_katex8 = require("react-katex");
6347
6268
 
6269
+ // src/hooks/useScreenSize.ts
6270
+ var import_react24 = require("react");
6271
+ var useScreenSize = () => {
6272
+ const [containerSize, setContainerSize] = (0, import_react24.useState)({
6273
+ width: 0,
6274
+ height: 0
6275
+ });
6276
+ const [screenSize, setScreenSize] = (0, import_react24.useState)({
6277
+ width: window.innerWidth,
6278
+ height: window.innerHeight
6279
+ });
6280
+ (0, import_react24.useEffect)(() => {
6281
+ const handleResize = () => {
6282
+ setScreenSize({
6283
+ width: window.innerWidth,
6284
+ height: window.innerHeight
6285
+ });
6286
+ const container = document.getElementById("container");
6287
+ if (!container) return;
6288
+ const boundingClientRect = container.getBoundingClientRect();
6289
+ setContainerSize({
6290
+ width: boundingClientRect.width,
6291
+ height: boundingClientRect.height
6292
+ });
6293
+ };
6294
+ handleResize();
6295
+ window.addEventListener("resize", handleResize);
6296
+ return () => {
6297
+ window.removeEventListener("resize", handleResize);
6298
+ };
6299
+ }, []);
6300
+ return { screenSize, containerSize };
6301
+ };
6302
+ var useScreenSize_default = useScreenSize;
6303
+
6348
6304
  // src/components/dnds/DraggableDroppableItem.tsx
6349
6305
  var import_react25 = require("react");
6350
6306
  var import_react_dnd6 = require("react-dnd");
@@ -6396,7 +6352,7 @@ var DraggableDroppableItem = ({
6396
6352
  };
6397
6353
  var DraggableDroppableItem_default = DraggableDroppableItem;
6398
6354
 
6399
- // src/components/activities/material-content/OrderingActivityMaterialContent.tsx
6355
+ // src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
6400
6356
  var import_jsx_runtime42 = require("react/jsx-runtime");
6401
6357
  var OrderingActivityMaterialContent = ({
6402
6358
  uniqueValue,
@@ -6487,19 +6443,13 @@ var OrderingActivityMaterialContent = ({
6487
6443
  marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
6488
6444
  },
6489
6445
  children: [
6490
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6446
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "h-catchup-activity-box-item w-catchup-activity-box-item flex flex-col items-center justify-center cursor-pointer transition-all duration-300 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6491
6447
  "div",
6492
6448
  {
6493
- className: `min-h-catchup-activity-outer-box-item w-catchup-activity-box-item flex flex-col items-center justify-center cursor-pointer transition-all duration-300`,
6494
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6495
- "div",
6496
- {
6497
- className: `${selectedKey === materialKey ? "border-2 border-catchup-light-gray" : "border-2 border-catchup-blue"} flex flex-col items-center justify-center transition-all duration-300 rounded-catchup-full w-[50px] h-[50px]`,
6498
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "", children: parseFloat(materialKey) + 1 })
6499
- }
6500
- )
6449
+ className: `${selectedKey === materialKey ? "border-2 border-catchup-light-gray" : "border-2 border-catchup-blue"} flex flex-col items-center justify-center transition-all duration-300 rounded-catchup-full w-[50px] h-[50px]`,
6450
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "", children: parseFloat(materialKey) + 1 })
6501
6451
  }
6502
- ) }),
6452
+ ) }) }),
6503
6453
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6504
6454
  DraggableDroppableItem_default,
6505
6455
  {
@@ -6509,7 +6459,7 @@ var OrderingActivityMaterialContent = ({
6509
6459
  component: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6510
6460
  "div",
6511
6461
  {
6512
- className: `${canDrop ? selectedKey !== materialKey ? selectedTargetKey === materialKey ? "bg-catchup-light-blue rounded-catchup-xlarge" : "bg-catchup-light-blue rounded-catchup-xlarge opacity-40" : "" : ""} flex-1 min-h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer p-3 ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
6462
+ className: `${canDrop ? selectedKey !== materialKey ? selectedTargetKey === materialKey ? "bg-catchup-light-blue rounded-catchup-xlarge" : "bg-catchup-light-blue rounded-catchup-xlarge opacity-40" : "" : ""} ${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer p-3 ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
6513
6463
  onMouseDown: () => {
6514
6464
  if (checkCanAnswerQuestion()) {
6515
6465
  setSelectedKey(materialKey);
@@ -6521,7 +6471,7 @@ var OrderingActivityMaterialContent = ({
6521
6471
  "span",
6522
6472
  {
6523
6473
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6524
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
6474
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
6525
6475
  },
6526
6476
  index2
6527
6477
  )) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -6570,6 +6520,7 @@ var OrderingActivityContent = ({
6570
6520
  const orderingBodyMap = parseBodyMapFromData(data, "ORDERING");
6571
6521
  const orderingMaterialMap = parseMaterialMapFromData(data, "ORDERING");
6572
6522
  const handleOrderingAnswerOnChange = (answer2, primaryKey, secondaryKey) => {
6523
+ if (isPreview) return;
6573
6524
  let foundIndex = answer2.data.findIndex(
6574
6525
  (answerData) => answerData.type === "ORDERING"
6575
6526
  );
@@ -6605,7 +6556,7 @@ var OrderingActivityContent = ({
6605
6556
  };
6606
6557
  var OrderingActivityContent_default = OrderingActivityContent;
6607
6558
 
6608
- // src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
6559
+ // src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
6609
6560
  var import_react27 = require("react");
6610
6561
  var import_react_katex9 = require("react-katex");
6611
6562
  var import_jsx_runtime44 = require("react/jsx-runtime");
@@ -6690,7 +6641,7 @@ var TrueFalseActivityMaterialContent = ({
6690
6641
  "span",
6691
6642
  {
6692
6643
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6693
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
6644
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
6694
6645
  },
6695
6646
  index2
6696
6647
  )) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -6765,6 +6716,7 @@ var TrueFalseActivityContent = ({
6765
6716
  return answer.data[foundIndex].answerMap;
6766
6717
  };
6767
6718
  const handleTrueFalseAnswerOnChange = (answer2, key, value) => {
6719
+ if (isPreview) return;
6768
6720
  const answerMap = retrieveCurrentAnswerMap();
6769
6721
  if (key === "TRUE") {
6770
6722
  const foundFalseIndex = answerMap.falseList.findIndex(
@@ -6822,7 +6774,7 @@ var TrueFalseActivityContent = ({
6822
6774
  };
6823
6775
  var TrueFalseActivityContent_default = TrueFalseActivityContent;
6824
6776
 
6825
- // src/components/activities/solution-content/ActivitySolutionContent.tsx
6777
+ // src/components/activities/solution-contents/ActivitySolutionContent.tsx
6826
6778
  var import_react_katex10 = require("react-katex");
6827
6779
  var import_jsx_runtime46 = require("react/jsx-runtime");
6828
6780
  var ActivitySolutionContent = ({
@@ -6870,7 +6822,7 @@ var ActivitySolutionContent = ({
6870
6822
  "span",
6871
6823
  {
6872
6824
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6873
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_katex10.InlineMath, { math: inputPart.value }) }) : inputPart.value
6825
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_katex10.InlineMath, { math: inputPart.value }) }) : inputPart.value
6874
6826
  },
6875
6827
  `${key}_part_${partIndex}`
6876
6828
  )
@@ -6880,7 +6832,7 @@ var ActivitySolutionContent = ({
6880
6832
  };
6881
6833
  var ActivitySolutionContent_default = ActivitySolutionContent;
6882
6834
 
6883
- // src/components/activities/evaluation-rubric-content/ActivityEvaluationRubricContent.tsx
6835
+ // src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
6884
6836
  var import_react_katex11 = require("react-katex");
6885
6837
  var import_jsx_runtime47 = require("react/jsx-runtime");
6886
6838
  var ActivityEvaluationRubricContent = ({
@@ -6925,7 +6877,7 @@ var ActivityEvaluationRubricContent = ({
6925
6877
  "span",
6926
6878
  {
6927
6879
  className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6928
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_katex11.InlineMath, { math: inputPart.value }) }) : inputPart.value
6880
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_katex11.InlineMath, { math: inputPart.value }) }) : inputPart.value
6929
6881
  },
6930
6882
  index2
6931
6883
  )
@@ -7121,8 +7073,7 @@ var ActivityPreviewByData = ({
7121
7073
  },
7122
7074
  data,
7123
7075
  isPreview: true,
7124
- showCorrectAnswer: true,
7125
- isFullScreen
7076
+ showCorrectAnswer: true
7126
7077
  }
7127
7078
  ) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7128
7079
  GroupingActivityContent_default,
@@ -7135,8 +7086,7 @@ var ActivityPreviewByData = ({
7135
7086
  },
7136
7087
  data,
7137
7088
  isPreview: true,
7138
- showCorrectAnswer: true,
7139
- isFullScreen
7089
+ showCorrectAnswer: true
7140
7090
  }
7141
7091
  ) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7142
7092
  FillInTheBlanksActivityContent_default,
@@ -7161,6 +7111,7 @@ var ActivityPreviewByData = ({
7161
7111
  },
7162
7112
  showMaterialContent: true,
7163
7113
  data,
7114
+ isPreview: true,
7164
7115
  isFullScreen
7165
7116
  }
7166
7117
  ) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(