catchup-library-web 2.5.15 → 2.5.17
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.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +259 -219
- package/dist/index.mjs +279 -239
- package/package.json +1 -1
- package/src/components/activities/GroupingActivityContent.tsx +33 -18
- package/src/components/activities/MatchingActivityContent.tsx +7 -3
- package/src/components/activities/OrderingActivityContent.tsx +7 -3
- package/src/components/activities/body-contents/ActivityBodyContent.tsx +8 -8
- package/src/components/activities/material-contents/DropdownActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/MCMAActivityMaterialContent.tsx +8 -6
- package/src/components/activities/material-contents/MCSAActivityMaterialContent.tsx +8 -6
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +3 -1
- package/src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx +5 -5
- package/src/components/activities/material-contents/OrderingActivityMaterialContent.tsx +3 -1
- package/src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx +6 -4
- package/src/properties/ActivityProperties.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -3585,7 +3585,7 @@ var ActivityBodyContent = ({
|
|
|
3585
3585
|
key
|
|
3586
3586
|
});
|
|
3587
3587
|
}).filter(Boolean);
|
|
3588
|
-
return /* @__PURE__ */ jsx21("div", { className: "flex flex-col
|
|
3588
|
+
return /* @__PURE__ */ jsx21("div", { className: "flex flex-col h-full overflow-y-auto", children: processedBodies.map((body, index) => /* @__PURE__ */ jsx21(
|
|
3589
3589
|
ShowBodyMediaByContentType_default,
|
|
3590
3590
|
{
|
|
3591
3591
|
index,
|
|
@@ -4424,10 +4424,10 @@ var DropdownActivityMaterialContent = ({
|
|
|
4424
4424
|
}
|
|
4425
4425
|
return "INCORRECT";
|
|
4426
4426
|
};
|
|
4427
|
-
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-
|
|
4428
|
-
/* @__PURE__ */ jsx26("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx26("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4429
|
-
/* @__PURE__ */ jsx26("div", { className: "hidden md:
|
|
4430
|
-
/* @__PURE__ */ jsx26("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4427
|
+
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col h-full", children: [
|
|
4428
|
+
/* @__PURE__ */ jsx26("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx26("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4429
|
+
/* @__PURE__ */ jsx26("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx26(DividerLine_default, {}) }),
|
|
4430
|
+
/* @__PURE__ */ jsx26("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx26("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4431
4431
|
(materialKey, index) => {
|
|
4432
4432
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
4433
4433
|
const learnerAnswerState = checkAnswerState(
|
|
@@ -4534,7 +4534,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
4534
4534
|
] })
|
|
4535
4535
|
] }) }) }, index);
|
|
4536
4536
|
}
|
|
4537
|
-
) })
|
|
4537
|
+
) }) })
|
|
4538
4538
|
] });
|
|
4539
4539
|
};
|
|
4540
4540
|
var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
@@ -4753,12 +4753,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4753
4753
|
return /* @__PURE__ */ jsxs19(
|
|
4754
4754
|
"div",
|
|
4755
4755
|
{
|
|
4756
|
-
className: "flex flex-
|
|
4756
|
+
className: "flex flex-col h-full",
|
|
4757
4757
|
onMouseMove: handleMouseMove,
|
|
4758
4758
|
onMouseUp: handleMouseUp,
|
|
4759
4759
|
children: [
|
|
4760
|
-
/* @__PURE__ */ jsx29("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx29("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4761
|
-
/* @__PURE__ */ jsx29("div", { className: "hidden md:
|
|
4760
|
+
/* @__PURE__ */ jsx29("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx29("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4761
|
+
/* @__PURE__ */ jsx29("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx29(DividerLine_default, {}) }),
|
|
4762
4762
|
draggedOption && mousePosition.x > 0 && /* @__PURE__ */ jsx29(
|
|
4763
4763
|
"div",
|
|
4764
4764
|
{
|
|
@@ -4811,148 +4811,150 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4811
4811
|
) })
|
|
4812
4812
|
}
|
|
4813
4813
|
),
|
|
4814
|
-
/* @__PURE__ */
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
"
|
|
4834
|
-
{
|
|
4835
|
-
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4836
|
-
onClick: () => handleSelectOption(option),
|
|
4837
|
-
children: /* @__PURE__ */ jsx29("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx29(
|
|
4838
|
-
InputWithSpecialExpression_default,
|
|
4839
|
-
{
|
|
4840
|
-
value: option,
|
|
4841
|
-
showSpecialOnly: false
|
|
4842
|
-
}
|
|
4843
|
-
) })
|
|
4844
|
-
}
|
|
4845
|
-
) : /* @__PURE__ */ jsx29(
|
|
4846
|
-
"div",
|
|
4847
|
-
{
|
|
4848
|
-
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4849
|
-
onClick: () => handleSelectOption(option),
|
|
4850
|
-
children: /* @__PURE__ */ jsx29(
|
|
4851
|
-
ShowMaterialMediaByContentType_default,
|
|
4852
|
-
{
|
|
4853
|
-
contentType: contentMap.type,
|
|
4854
|
-
src: option,
|
|
4855
|
-
canFullScreen: true
|
|
4856
|
-
},
|
|
4857
|
-
`${uniqueValue}-${index}`
|
|
4858
|
-
)
|
|
4859
|
-
}
|
|
4860
|
-
)
|
|
4861
|
-
},
|
|
4862
|
-
index
|
|
4863
|
-
)
|
|
4864
|
-
) }),
|
|
4865
|
-
/* @__PURE__ */ jsx29("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
4866
|
-
const learnerAnswerState = checkAnswerState(
|
|
4867
|
-
JSON.parse(materialMap[materialKey]),
|
|
4868
|
-
displayAnswerMap[materialKey]
|
|
4869
|
-
);
|
|
4870
|
-
return /* @__PURE__ */ jsx29("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx29("div", { className: "mx-2", children: /* @__PURE__ */ jsx29(
|
|
4871
|
-
"div",
|
|
4872
|
-
{
|
|
4873
|
-
"data-drop-zone": materialKey,
|
|
4874
|
-
onMouseEnter: () => draggedOption && setDropTargetIndex(materialKey),
|
|
4875
|
-
onMouseLeave: () => setDropTargetIndex(null),
|
|
4876
|
-
onClick: () => handleDropZoneClick(materialKey),
|
|
4877
|
-
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
4878
|
-
children: /* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4879
|
-
/* @__PURE__ */ jsx29("div", { className: "my-auto", children: /* @__PURE__ */ jsxs19("p", { className: "text-xl", children: [
|
|
4880
|
-
parseFloat(materialKey) + 1,
|
|
4881
|
-
"."
|
|
4882
|
-
] }) }),
|
|
4883
|
-
/* @__PURE__ */ jsx29("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsxs19("div", { className: "relative", children: [
|
|
4884
|
-
/* @__PURE__ */ jsx29("div", { className: "flex-1", children: /* @__PURE__ */ jsx29(
|
|
4885
|
-
"div",
|
|
4886
|
-
{
|
|
4887
|
-
className: `w-full min-h-[44px] border rounded-lg ${displayAnswerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
4888
|
-
onClick: (e) => {
|
|
4889
|
-
if (displayAnswerMap[materialKey]) {
|
|
4890
|
-
e.stopPropagation();
|
|
4891
|
-
onChange(answerMap, materialKey, "");
|
|
4892
|
-
}
|
|
4893
|
-
},
|
|
4894
|
-
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ jsx29(
|
|
4895
|
-
InputWithSpecialExpression_default,
|
|
4896
|
-
{
|
|
4897
|
-
value: displayAnswerMap[materialKey],
|
|
4898
|
-
showSpecialOnly: false
|
|
4899
|
-
}
|
|
4900
|
-
) : null
|
|
4901
|
-
}
|
|
4902
|
-
) }),
|
|
4903
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx29("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx29(
|
|
4904
|
-
BaseImage_default,
|
|
4905
|
-
{
|
|
4906
|
-
src: "/icons/checkbox.webp",
|
|
4907
|
-
alt: "checkbox",
|
|
4908
|
-
size: "small"
|
|
4909
|
-
}
|
|
4910
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx29("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx29(
|
|
4911
|
-
BaseImage_default,
|
|
4912
|
-
{
|
|
4913
|
-
src: "/icons/cross-red.webp",
|
|
4914
|
-
alt: "cross-red",
|
|
4915
|
-
size: "small"
|
|
4916
|
-
}
|
|
4917
|
-
) }) : null
|
|
4918
|
-
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ jsx29(
|
|
4814
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex-1 min-h-0 overflow-y-auto", children: [
|
|
4815
|
+
/* @__PURE__ */ jsx29("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
4816
|
+
(option, index) => checkAnswerProvided(displayAnswerMap, option) ? /* @__PURE__ */ jsx29(
|
|
4817
|
+
ShowMaterialMediaByContentType_default,
|
|
4818
|
+
{
|
|
4819
|
+
contentType: contentMap.type,
|
|
4820
|
+
src: option,
|
|
4821
|
+
canFullScreen: true
|
|
4822
|
+
},
|
|
4823
|
+
`${uniqueValue}-${index}`
|
|
4824
|
+
) : /* @__PURE__ */ jsx29(
|
|
4825
|
+
"div",
|
|
4826
|
+
{
|
|
4827
|
+
ref: draggedOption === option ? dragElementRef : null,
|
|
4828
|
+
className: `${draggedOption === option ? "opacity-40" : selectedOption === option ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
4829
|
+
onMouseDown: (e) => handleMouseDown(e, option),
|
|
4830
|
+
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
4831
|
+
onTouchMove: handleTouchMove,
|
|
4832
|
+
onTouchEnd: handleTouchEnd,
|
|
4833
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx29(
|
|
4919
4834
|
"div",
|
|
4920
4835
|
{
|
|
4921
|
-
className:
|
|
4922
|
-
|
|
4836
|
+
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4837
|
+
onClick: () => handleSelectOption(option),
|
|
4838
|
+
children: /* @__PURE__ */ jsx29("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx29(
|
|
4839
|
+
InputWithSpecialExpression_default,
|
|
4840
|
+
{
|
|
4841
|
+
value: option,
|
|
4842
|
+
showSpecialOnly: false
|
|
4843
|
+
}
|
|
4844
|
+
) })
|
|
4923
4845
|
}
|
|
4924
4846
|
) : /* @__PURE__ */ jsx29(
|
|
4925
4847
|
"div",
|
|
4926
4848
|
{
|
|
4927
|
-
className: "
|
|
4928
|
-
onClick: (
|
|
4929
|
-
e.stopPropagation();
|
|
4930
|
-
onChange(answerMap, materialKey, "");
|
|
4931
|
-
},
|
|
4849
|
+
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4850
|
+
onClick: () => handleSelectOption(option),
|
|
4932
4851
|
children: /* @__PURE__ */ jsx29(
|
|
4933
4852
|
ShowMaterialMediaByContentType_default,
|
|
4934
4853
|
{
|
|
4935
4854
|
contentType: contentMap.type,
|
|
4936
|
-
src:
|
|
4855
|
+
src: option,
|
|
4937
4856
|
canFullScreen: true
|
|
4938
4857
|
},
|
|
4939
4858
|
`${uniqueValue}-${index}`
|
|
4940
4859
|
)
|
|
4941
4860
|
}
|
|
4942
|
-
)
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4861
|
+
)
|
|
4862
|
+
},
|
|
4863
|
+
index
|
|
4864
|
+
)
|
|
4865
|
+
) }),
|
|
4866
|
+
/* @__PURE__ */ jsx29("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
4867
|
+
const learnerAnswerState = checkAnswerState(
|
|
4868
|
+
JSON.parse(materialMap[materialKey]),
|
|
4869
|
+
displayAnswerMap[materialKey]
|
|
4870
|
+
);
|
|
4871
|
+
return /* @__PURE__ */ jsx29("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx29("div", { className: "mx-2", children: /* @__PURE__ */ jsx29(
|
|
4872
|
+
"div",
|
|
4873
|
+
{
|
|
4874
|
+
"data-drop-zone": materialKey,
|
|
4875
|
+
onMouseEnter: () => draggedOption && setDropTargetIndex(materialKey),
|
|
4876
|
+
onMouseLeave: () => setDropTargetIndex(null),
|
|
4877
|
+
onClick: () => handleDropZoneClick(materialKey),
|
|
4878
|
+
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
4879
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4880
|
+
/* @__PURE__ */ jsx29("div", { className: "my-auto", children: /* @__PURE__ */ jsxs19("p", { className: "text-xl", children: [
|
|
4881
|
+
parseFloat(materialKey) + 1,
|
|
4882
|
+
"."
|
|
4883
|
+
] }) }),
|
|
4884
|
+
/* @__PURE__ */ jsx29("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsxs19("div", { className: "relative", children: [
|
|
4885
|
+
/* @__PURE__ */ jsx29("div", { className: "flex-1", children: /* @__PURE__ */ jsx29(
|
|
4886
|
+
"div",
|
|
4887
|
+
{
|
|
4888
|
+
className: `w-full min-h-[44px] border rounded-lg ${displayAnswerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
4889
|
+
onClick: (e) => {
|
|
4890
|
+
if (displayAnswerMap[materialKey]) {
|
|
4891
|
+
e.stopPropagation();
|
|
4892
|
+
onChange(answerMap, materialKey, "");
|
|
4893
|
+
}
|
|
4894
|
+
},
|
|
4895
|
+
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ jsx29(
|
|
4896
|
+
InputWithSpecialExpression_default,
|
|
4897
|
+
{
|
|
4898
|
+
value: displayAnswerMap[materialKey],
|
|
4899
|
+
showSpecialOnly: false
|
|
4900
|
+
}
|
|
4901
|
+
) : null
|
|
4902
|
+
}
|
|
4903
|
+
) }),
|
|
4904
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx29("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx29(
|
|
4905
|
+
BaseImage_default,
|
|
4906
|
+
{
|
|
4907
|
+
src: "/icons/checkbox.webp",
|
|
4908
|
+
alt: "checkbox",
|
|
4909
|
+
size: "small"
|
|
4910
|
+
}
|
|
4911
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx29("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx29(
|
|
4912
|
+
BaseImage_default,
|
|
4913
|
+
{
|
|
4914
|
+
src: "/icons/cross-red.webp",
|
|
4915
|
+
alt: "cross-red",
|
|
4916
|
+
size: "small"
|
|
4917
|
+
}
|
|
4918
|
+
) }) : null
|
|
4919
|
+
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ jsx29(
|
|
4920
|
+
"div",
|
|
4921
|
+
{
|
|
4922
|
+
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"}`,
|
|
4923
|
+
children: /* @__PURE__ */ jsx29("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ jsx29("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
|
|
4924
|
+
}
|
|
4925
|
+
) : /* @__PURE__ */ jsx29(
|
|
4926
|
+
"div",
|
|
4927
|
+
{
|
|
4928
|
+
className: "flex-1 cursor-pointer",
|
|
4929
|
+
onClick: (e) => {
|
|
4930
|
+
e.stopPropagation();
|
|
4931
|
+
onChange(answerMap, materialKey, "");
|
|
4932
|
+
},
|
|
4933
|
+
children: /* @__PURE__ */ jsx29(
|
|
4934
|
+
ShowMaterialMediaByContentType_default,
|
|
4935
|
+
{
|
|
4936
|
+
contentType: contentMap.type,
|
|
4937
|
+
src: displayAnswerMap[materialKey],
|
|
4938
|
+
canFullScreen: true
|
|
4939
|
+
},
|
|
4940
|
+
`${uniqueValue}-${index}`
|
|
4941
|
+
)
|
|
4942
|
+
}
|
|
4943
|
+
) : /* @__PURE__ */ jsx29("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
4944
|
+
displayAnswerMap[materialKey]
|
|
4945
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx29(
|
|
4946
|
+
"span",
|
|
4947
|
+
{
|
|
4948
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4949
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx29("span", { className: "text-xl", children: /* @__PURE__ */ jsx29(InlineMath4, { math: inputPart.value }) }) : inputPart.value
|
|
4950
|
+
},
|
|
4951
|
+
index2
|
|
4952
|
+
)) }, materialKey) })
|
|
4953
|
+
] })
|
|
4954
|
+
}
|
|
4955
|
+
) }) }, index);
|
|
4956
|
+
}) })
|
|
4957
|
+
] })
|
|
4956
4958
|
]
|
|
4957
4959
|
}
|
|
4958
4960
|
);
|
|
@@ -5238,7 +5240,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5238
5240
|
}
|
|
5239
5241
|
};
|
|
5240
5242
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5241
|
-
return /* @__PURE__ */ jsxs21("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5243
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5242
5244
|
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ jsx31(
|
|
5243
5245
|
"div",
|
|
5244
5246
|
{
|
|
@@ -5298,7 +5300,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5298
5300
|
}
|
|
5299
5301
|
),
|
|
5300
5302
|
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5301
|
-
/* @__PURE__ */ jsx31("div", { className: "flex-
|
|
5303
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-shrink-0 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
|
|
5302
5304
|
return /* @__PURE__ */ jsx31(
|
|
5303
5305
|
"div",
|
|
5304
5306
|
{
|
|
@@ -5337,9 +5339,9 @@ var GroupingActivityMaterialContent = ({
|
|
|
5337
5339
|
index
|
|
5338
5340
|
);
|
|
5339
5341
|
}) }),
|
|
5340
|
-
/* @__PURE__ */ jsx31(DividerLine_default, {})
|
|
5342
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx31(DividerLine_default, {}) })
|
|
5341
5343
|
] }) : null,
|
|
5342
|
-
Object.keys(displayAnswerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs21("div", { className: "flex flex-row w-full", children: [
|
|
5344
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs21("div", { className: "flex flex-row w-full", children: [
|
|
5343
5345
|
/* @__PURE__ */ jsx31("div", { className: "w-1/3", children: /* @__PURE__ */ jsx31(
|
|
5344
5346
|
"div",
|
|
5345
5347
|
{
|
|
@@ -5423,20 +5425,21 @@ var GroupingActivityMaterialContent = ({
|
|
|
5423
5425
|
) }) })
|
|
5424
5426
|
}
|
|
5425
5427
|
) }) })
|
|
5426
|
-
] }, index))
|
|
5428
|
+
] }, index)) })
|
|
5427
5429
|
] });
|
|
5428
5430
|
};
|
|
5429
5431
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5430
5432
|
|
|
5431
5433
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5432
|
-
import {
|
|
5434
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5433
5435
|
var GroupingActivityContent = ({
|
|
5434
5436
|
answerMap,
|
|
5435
5437
|
data,
|
|
5436
5438
|
canAnswerQuestion,
|
|
5437
5439
|
changeAnswer,
|
|
5438
5440
|
isPreview,
|
|
5439
|
-
showCorrectAnswer
|
|
5441
|
+
showCorrectAnswer,
|
|
5442
|
+
isFullScreen
|
|
5440
5443
|
}) => {
|
|
5441
5444
|
const contentMap = parseContentMapFromData(data);
|
|
5442
5445
|
const groupingBodyMap = parseBodyMapFromData(data, "GROUPING");
|
|
@@ -5450,26 +5453,39 @@ var GroupingActivityContent = ({
|
|
|
5450
5453
|
}
|
|
5451
5454
|
changeAnswer(answerMap2);
|
|
5452
5455
|
};
|
|
5453
|
-
return /* @__PURE__ */ jsxs22(
|
|
5456
|
+
return /* @__PURE__ */ jsxs22("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
5454
5457
|
/* @__PURE__ */ jsx32(
|
|
5455
|
-
|
|
5458
|
+
"div",
|
|
5456
5459
|
{
|
|
5457
|
-
|
|
5458
|
-
|
|
5460
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
5461
|
+
children: /* @__PURE__ */ jsx32(
|
|
5462
|
+
ActivityBodyContent_default,
|
|
5463
|
+
{
|
|
5464
|
+
bodyMap: groupingBodyMap,
|
|
5465
|
+
templateType: "GROUPING"
|
|
5466
|
+
}
|
|
5467
|
+
)
|
|
5459
5468
|
}
|
|
5460
5469
|
),
|
|
5461
|
-
/* @__PURE__ */ jsx32(DividerLine_default, {}),
|
|
5470
|
+
/* @__PURE__ */ jsx32("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx32(DividerLine_default, {}) }),
|
|
5471
|
+
/* @__PURE__ */ jsx32("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx32(VerticalDividerLine_default, {}) }),
|
|
5462
5472
|
/* @__PURE__ */ jsx32(
|
|
5463
|
-
|
|
5473
|
+
"div",
|
|
5464
5474
|
{
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5475
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
5476
|
+
children: /* @__PURE__ */ jsx32(
|
|
5477
|
+
GroupingActivityMaterialContent_default,
|
|
5478
|
+
{
|
|
5479
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
5480
|
+
answerMap,
|
|
5481
|
+
materialMap: groupingMaterialMap,
|
|
5482
|
+
contentMap,
|
|
5483
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
5484
|
+
onChange: handleGroupingAnswerOnChange,
|
|
5485
|
+
isPreview,
|
|
5486
|
+
showCorrectAnswer
|
|
5487
|
+
}
|
|
5488
|
+
)
|
|
5473
5489
|
}
|
|
5474
5490
|
)
|
|
5475
5491
|
] });
|
|
@@ -5479,7 +5495,7 @@ var GroupingActivityContent_default = GroupingActivityContent;
|
|
|
5479
5495
|
// src/components/activities/material-contents/MatchingActivityMaterialContent.tsx
|
|
5480
5496
|
import { useEffect as useEffect11, useRef as useRef6, useState as useState20 } from "react";
|
|
5481
5497
|
import { InlineMath as InlineMath6 } from "react-katex";
|
|
5482
|
-
import { Fragment as
|
|
5498
|
+
import { Fragment as Fragment4, jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5483
5499
|
var MatchingActivityMaterialContent = ({
|
|
5484
5500
|
uniqueValue,
|
|
5485
5501
|
answerMap,
|
|
@@ -5667,7 +5683,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5667
5683
|
}
|
|
5668
5684
|
};
|
|
5669
5685
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5670
|
-
return /* @__PURE__ */ jsxs23("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5686
|
+
return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5671
5687
|
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ jsx33(
|
|
5672
5688
|
"div",
|
|
5673
5689
|
{
|
|
@@ -5726,7 +5742,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5726
5742
|
) })
|
|
5727
5743
|
}
|
|
5728
5744
|
),
|
|
5729
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsxs23(
|
|
5745
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
5730
5746
|
/* @__PURE__ */ jsx33(
|
|
5731
5747
|
"div",
|
|
5732
5748
|
{
|
|
@@ -5773,7 +5789,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5773
5789
|
),
|
|
5774
5790
|
/* @__PURE__ */ jsx33("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx33(DividerLine_default, {}) })
|
|
5775
5791
|
] }) : null,
|
|
5776
|
-
Object.keys(displayAnswerMap).map((answerMapKey, index) => {
|
|
5792
|
+
/* @__PURE__ */ jsx33("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => {
|
|
5777
5793
|
const learnerAnswerState = checkAnswerState(
|
|
5778
5794
|
materialMap[answerMapKey],
|
|
5779
5795
|
displayAnswerMap[answerMapKey]
|
|
@@ -5839,7 +5855,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5839
5855
|
}
|
|
5840
5856
|
) })
|
|
5841
5857
|
] }, index);
|
|
5842
|
-
})
|
|
5858
|
+
}) })
|
|
5843
5859
|
] });
|
|
5844
5860
|
};
|
|
5845
5861
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
@@ -5864,28 +5880,40 @@ var MatchingActivityContent = ({
|
|
|
5864
5880
|
changeAnswer(answerMap2);
|
|
5865
5881
|
};
|
|
5866
5882
|
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
5867
|
-
/* @__PURE__ */ jsx34(
|
|
5868
|
-
|
|
5883
|
+
/* @__PURE__ */ jsx34(
|
|
5884
|
+
"div",
|
|
5869
5885
|
{
|
|
5870
|
-
|
|
5871
|
-
|
|
5886
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
5887
|
+
children: /* @__PURE__ */ jsx34(
|
|
5888
|
+
ActivityBodyContent_default,
|
|
5889
|
+
{
|
|
5890
|
+
bodyMap: matchingBodyMap,
|
|
5891
|
+
templateType: "MATCHING"
|
|
5892
|
+
}
|
|
5893
|
+
)
|
|
5872
5894
|
}
|
|
5873
|
-
)
|
|
5895
|
+
),
|
|
5874
5896
|
/* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx34(DividerLine_default, {}) }),
|
|
5875
5897
|
/* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx34(VerticalDividerLine_default, {}) }),
|
|
5876
|
-
/* @__PURE__ */ jsx34(
|
|
5877
|
-
|
|
5898
|
+
/* @__PURE__ */ jsx34(
|
|
5899
|
+
"div",
|
|
5878
5900
|
{
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5901
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
5902
|
+
children: /* @__PURE__ */ jsx34(
|
|
5903
|
+
MatchingActivityMaterialContent_default,
|
|
5904
|
+
{
|
|
5905
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
5906
|
+
answerMap,
|
|
5907
|
+
materialMap: matchingMaterialMap,
|
|
5908
|
+
contentMap,
|
|
5909
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
5910
|
+
onChange: handleMatchingAnswerOnChange,
|
|
5911
|
+
isPreview,
|
|
5912
|
+
showCorrectAnswer
|
|
5913
|
+
}
|
|
5914
|
+
)
|
|
5887
5915
|
}
|
|
5888
|
-
)
|
|
5916
|
+
)
|
|
5889
5917
|
] });
|
|
5890
5918
|
};
|
|
5891
5919
|
var MatchingActivityContent_default = MatchingActivityContent;
|
|
@@ -5931,11 +5959,11 @@ var MCMAActivityMaterialContent = ({
|
|
|
5931
5959
|
return "INCORRECT";
|
|
5932
5960
|
};
|
|
5933
5961
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
5934
|
-
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5935
|
-
return /* @__PURE__ */ jsx35("div", { className: "flex flex-
|
|
5936
|
-
/* @__PURE__ */ jsx35("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx35("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
5937
|
-
/* @__PURE__ */ jsx35("div", { className: "hidden md:
|
|
5938
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx35("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
5962
|
+
return /* @__PURE__ */ jsx35("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
5963
|
+
return /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsxs25("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
5964
|
+
/* @__PURE__ */ jsx35("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx35("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
5965
|
+
/* @__PURE__ */ jsx35("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx35(DividerLine_default, {}) }),
|
|
5966
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ jsx35("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
5939
5967
|
(materialSubKey, index2) => {
|
|
5940
5968
|
const foundAnswer = displayAnswerMap[materialKey].find(
|
|
5941
5969
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -5998,9 +6026,9 @@ var MCMAActivityMaterialContent = ({
|
|
|
5998
6026
|
children: inputPart.isEquation ? /* @__PURE__ */ jsx35("span", { className: "text-xl", children: /* @__PURE__ */ jsx35(InlineMath7, { math: inputPart.value }) }) : inputPart.value
|
|
5999
6027
|
},
|
|
6000
6028
|
index2
|
|
6001
|
-
)) }, materialKey)
|
|
6029
|
+
)) }, materialKey) })
|
|
6002
6030
|
] }) }, index);
|
|
6003
|
-
});
|
|
6031
|
+
}) });
|
|
6004
6032
|
};
|
|
6005
6033
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
6006
6034
|
|
|
@@ -6086,11 +6114,11 @@ var MCSAActivityMaterialContent = ({
|
|
|
6086
6114
|
return "INCORRECT";
|
|
6087
6115
|
};
|
|
6088
6116
|
const correctAnswer = retrieveCorrectAnswer();
|
|
6089
|
-
return Object.keys(materialMap).map((materialKey, index) => {
|
|
6090
|
-
return /* @__PURE__ */ jsx37("div", { className: "flex flex-
|
|
6091
|
-
/* @__PURE__ */ jsx37("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx37("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6092
|
-
/* @__PURE__ */ jsx37("div", { className: "hidden md:
|
|
6093
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx37(
|
|
6117
|
+
return /* @__PURE__ */ jsx37("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
6118
|
+
return /* @__PURE__ */ jsx37("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ jsxs27("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
6119
|
+
/* @__PURE__ */ jsx37("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx37("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6120
|
+
/* @__PURE__ */ jsx37("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
|
|
6121
|
+
/* @__PURE__ */ jsx37("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ jsx37(
|
|
6094
6122
|
"div",
|
|
6095
6123
|
{
|
|
6096
6124
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -6153,9 +6181,9 @@ var MCSAActivityMaterialContent = ({
|
|
|
6153
6181
|
children: inputPart.isEquation ? /* @__PURE__ */ jsx37("span", { className: "text-xl", children: /* @__PURE__ */ jsx37(InlineMath8, { math: inputPart.value }) }) : inputPart.value
|
|
6154
6182
|
},
|
|
6155
6183
|
index2
|
|
6156
|
-
)) })
|
|
6184
|
+
)) }) })
|
|
6157
6185
|
] }) }, index);
|
|
6158
|
-
});
|
|
6186
|
+
}) });
|
|
6159
6187
|
};
|
|
6160
6188
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
6161
6189
|
|
|
@@ -6289,7 +6317,7 @@ var retrieveAcceptedFormats = (fileType) => {
|
|
|
6289
6317
|
};
|
|
6290
6318
|
|
|
6291
6319
|
// src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx
|
|
6292
|
-
import { Fragment as
|
|
6320
|
+
import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6293
6321
|
var OpenEndedActivityMaterialContent = ({
|
|
6294
6322
|
answerMap,
|
|
6295
6323
|
contentMap,
|
|
@@ -6346,7 +6374,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6346
6374
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6347
6375
|
const extension = answerMapAnswer.split(".").pop();
|
|
6348
6376
|
const fileType = retrieveFileTypeFromExtension(extension);
|
|
6349
|
-
return /* @__PURE__ */ jsx39(
|
|
6377
|
+
return /* @__PURE__ */ jsx39(Fragment5, { children: fileType === "IMAGE" ? /* @__PURE__ */ jsx39("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ jsx39(
|
|
6350
6378
|
BaseImage_default,
|
|
6351
6379
|
{
|
|
6352
6380
|
src: answerMapAnswer,
|
|
@@ -6369,16 +6397,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6369
6397
|
}
|
|
6370
6398
|
) });
|
|
6371
6399
|
};
|
|
6372
|
-
return /* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */ jsx39("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx39("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6374
|
-
/* @__PURE__ */ jsx39("div", { className: "hidden md:
|
|
6375
|
-
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null
|
|
6376
|
-
] })
|
|
6400
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col h-full", children: [
|
|
6401
|
+
/* @__PURE__ */ jsx39("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx39("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6402
|
+
/* @__PURE__ */ jsx39("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx39(DividerLine_default, {}) }),
|
|
6403
|
+
/* @__PURE__ */ jsx39("div", { className: "flex-1 min-h-0 overflow-y-auto", children: contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null })
|
|
6404
|
+
] });
|
|
6377
6405
|
};
|
|
6378
6406
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
6379
6407
|
|
|
6380
6408
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
6381
|
-
import { Fragment as
|
|
6409
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6382
6410
|
var OpenEndedActivityContent = ({
|
|
6383
6411
|
answerMap,
|
|
6384
6412
|
data,
|
|
@@ -6409,7 +6437,7 @@ var OpenEndedActivityContent = ({
|
|
|
6409
6437
|
)
|
|
6410
6438
|
}
|
|
6411
6439
|
),
|
|
6412
|
-
showMaterialContent ? /* @__PURE__ */ jsxs30(
|
|
6440
|
+
showMaterialContent ? /* @__PURE__ */ jsxs30(Fragment6, { children: [
|
|
6413
6441
|
/* @__PURE__ */ jsx40(
|
|
6414
6442
|
"div",
|
|
6415
6443
|
{
|
|
@@ -6555,7 +6583,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6555
6583
|
return /* @__PURE__ */ jsxs31(
|
|
6556
6584
|
"div",
|
|
6557
6585
|
{
|
|
6558
|
-
className: "flex flex-
|
|
6586
|
+
className: "flex flex-col h-full",
|
|
6559
6587
|
onMouseMove: handleMouseMove,
|
|
6560
6588
|
onMouseUp: handleMouseUp,
|
|
6561
6589
|
children: [
|
|
@@ -6617,7 +6645,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6617
6645
|
) })
|
|
6618
6646
|
}
|
|
6619
6647
|
),
|
|
6620
|
-
Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
6648
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
6621
6649
|
const learnerAnswerState = checkAnswerState(
|
|
6622
6650
|
displayAnswerMap[materialKey] + "",
|
|
6623
6651
|
index + ""
|
|
@@ -6676,7 +6704,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6676
6704
|
]
|
|
6677
6705
|
}
|
|
6678
6706
|
) }, index);
|
|
6679
|
-
})
|
|
6707
|
+
}) })
|
|
6680
6708
|
]
|
|
6681
6709
|
}
|
|
6682
6710
|
);
|
|
@@ -6705,28 +6733,40 @@ var OrderingActivityContent = ({
|
|
|
6705
6733
|
changeAnswer(answerMap2);
|
|
6706
6734
|
};
|
|
6707
6735
|
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
6708
|
-
/* @__PURE__ */ jsx42(
|
|
6709
|
-
|
|
6736
|
+
/* @__PURE__ */ jsx42(
|
|
6737
|
+
"div",
|
|
6710
6738
|
{
|
|
6711
|
-
|
|
6712
|
-
|
|
6739
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
6740
|
+
children: /* @__PURE__ */ jsx42(
|
|
6741
|
+
ActivityBodyContent_default,
|
|
6742
|
+
{
|
|
6743
|
+
bodyMap: orderingBodyMap,
|
|
6744
|
+
templateType: "ORDERING"
|
|
6745
|
+
}
|
|
6746
|
+
)
|
|
6713
6747
|
}
|
|
6714
|
-
)
|
|
6748
|
+
),
|
|
6715
6749
|
/* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx42(DividerLine_default, {}) }),
|
|
6716
6750
|
/* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx42(VerticalDividerLine_default, {}) }),
|
|
6717
|
-
/* @__PURE__ */ jsx42(
|
|
6718
|
-
|
|
6751
|
+
/* @__PURE__ */ jsx42(
|
|
6752
|
+
"div",
|
|
6719
6753
|
{
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6754
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
6755
|
+
children: /* @__PURE__ */ jsx42(
|
|
6756
|
+
OrderingActivityMaterialContent_default,
|
|
6757
|
+
{
|
|
6758
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
6759
|
+
answerMap,
|
|
6760
|
+
materialMap: orderingMaterialMap,
|
|
6761
|
+
contentMap,
|
|
6762
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
6763
|
+
onChange: handleOrderingAnswerOnChange,
|
|
6764
|
+
isPreview,
|
|
6765
|
+
showCorrectAnswer
|
|
6766
|
+
}
|
|
6767
|
+
)
|
|
6728
6768
|
}
|
|
6729
|
-
)
|
|
6769
|
+
)
|
|
6730
6770
|
] });
|
|
6731
6771
|
};
|
|
6732
6772
|
var OrderingActivityContent_default = OrderingActivityContent;
|
|
@@ -6734,7 +6774,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
|
|
|
6734
6774
|
// src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
|
|
6735
6775
|
import { useEffect as useEffect15, useState as useState24 } from "react";
|
|
6736
6776
|
import { InlineMath as InlineMath10 } from "react-katex";
|
|
6737
|
-
import { Fragment as
|
|
6777
|
+
import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6738
6778
|
var TrueFalseActivityMaterialContent = ({
|
|
6739
6779
|
uniqueValue,
|
|
6740
6780
|
answerMap,
|
|
@@ -6771,14 +6811,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6771
6811
|
}
|
|
6772
6812
|
return "INCORRECT";
|
|
6773
6813
|
};
|
|
6774
|
-
return /* @__PURE__ */ jsxs33("div", { className: "", children: [
|
|
6775
|
-
/* @__PURE__ */ jsx43("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx43("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
6776
|
-
/* @__PURE__ */ jsx43("div", { className: "hidden md:
|
|
6777
|
-
/* @__PURE__ */ jsxs33("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
6814
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col h-full", children: [
|
|
6815
|
+
/* @__PURE__ */ jsx43("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx43("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
6816
|
+
/* @__PURE__ */ jsx43("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ jsx43(DividerLine_default, {}) }),
|
|
6817
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-row justify-end items-center gap-x-2 flex-shrink-0", children: [
|
|
6778
6818
|
/* @__PURE__ */ jsx43("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx43("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
6779
6819
|
/* @__PURE__ */ jsx43("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx43("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
6780
6820
|
] }),
|
|
6781
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx43("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
6821
|
+
/* @__PURE__ */ jsx43("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ jsx43("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
6782
6822
|
const correctAnswer = materialMap.trueList.find(
|
|
6783
6823
|
(trueItem) => trueItem === shuffleOption
|
|
6784
6824
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -6840,7 +6880,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6840
6880
|
},
|
|
6841
6881
|
index
|
|
6842
6882
|
);
|
|
6843
|
-
}) }) : /* @__PURE__ */ jsxs33(
|
|
6883
|
+
}) }) : /* @__PURE__ */ jsxs33(Fragment7, { children: [
|
|
6844
6884
|
displayAnswerMap.trueList.map((item) => /* @__PURE__ */ jsxs33("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6845
6885
|
/* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43("p", { children: item }) }),
|
|
6846
6886
|
/* @__PURE__ */ jsx43("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx43("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
@@ -6849,7 +6889,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6849
6889
|
/* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43("p", { children: item }) }),
|
|
6850
6890
|
/* @__PURE__ */ jsx43("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx43("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
6851
6891
|
] }))
|
|
6852
|
-
] })
|
|
6892
|
+
] }) })
|
|
6853
6893
|
] });
|
|
6854
6894
|
};
|
|
6855
6895
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
@@ -7093,7 +7133,7 @@ var SelectionBox = ({
|
|
|
7093
7133
|
var SelectionBox_default = SelectionBox;
|
|
7094
7134
|
|
|
7095
7135
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
7096
|
-
import { Fragment as
|
|
7136
|
+
import { Fragment as Fragment8, jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7097
7137
|
var ACTIVITY_TEMPLATE_LIST = [
|
|
7098
7138
|
{ type: "ORDERING", materialMap: "orderingMaterialMap" },
|
|
7099
7139
|
{ type: "DROPDOWN", materialMap: "dropdownMaterialMap" },
|
|
@@ -7202,42 +7242,42 @@ var ActivityPreviewByData = ({
|
|
|
7202
7242
|
}
|
|
7203
7243
|
switch (selectedType) {
|
|
7204
7244
|
case "ORDERING":
|
|
7205
|
-
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7245
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7206
7246
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7207
7247
|
/* @__PURE__ */ jsx48(OrderingActivityContent_default, __spreadValues({}, commonProps))
|
|
7208
7248
|
] }) : null;
|
|
7209
7249
|
case "DROPDOWN":
|
|
7210
|
-
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7250
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7211
7251
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7212
7252
|
/* @__PURE__ */ jsx48(DropdownActivityContent_default, __spreadValues({}, commonProps))
|
|
7213
7253
|
] }) : null;
|
|
7214
7254
|
case "MCSA":
|
|
7215
|
-
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7255
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7216
7256
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7217
7257
|
/* @__PURE__ */ jsx48(MCSAActivityContent_default, __spreadValues({}, commonProps))
|
|
7218
7258
|
] }) : null;
|
|
7219
7259
|
case "MCMA":
|
|
7220
|
-
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7260
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7221
7261
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7222
7262
|
/* @__PURE__ */ jsx48(MCMAActivityContent_default, __spreadValues({}, commonProps))
|
|
7223
7263
|
] }) : null;
|
|
7224
7264
|
case "MATCHING":
|
|
7225
|
-
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7265
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7226
7266
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7227
7267
|
/* @__PURE__ */ jsx48(MatchingActivityContent_default, __spreadValues({}, commonProps))
|
|
7228
7268
|
] }) : null;
|
|
7229
7269
|
case "GROUPING":
|
|
7230
|
-
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7270
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7231
7271
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7232
7272
|
/* @__PURE__ */ jsx48(GroupingActivityContent_default, __spreadValues({}, commonProps))
|
|
7233
7273
|
] }) : null;
|
|
7234
7274
|
case "FILL_IN_THE_BLANKS":
|
|
7235
|
-
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7275
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7236
7276
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7237
7277
|
/* @__PURE__ */ jsx48(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps))
|
|
7238
7278
|
] }) : null;
|
|
7239
7279
|
case "OPEN_ENDED":
|
|
7240
|
-
return data.openEndedBodyMap ? /* @__PURE__ */ jsxs38(
|
|
7280
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7241
7281
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7242
7282
|
/* @__PURE__ */ jsx48(
|
|
7243
7283
|
OpenEndedActivityContent_default,
|
|
@@ -7247,7 +7287,7 @@ var ActivityPreviewByData = ({
|
|
|
7247
7287
|
)
|
|
7248
7288
|
] }) : null;
|
|
7249
7289
|
case "TRUE_FALSE":
|
|
7250
|
-
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ jsxs38(
|
|
7290
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7251
7291
|
isEmpty && /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}),
|
|
7252
7292
|
/* @__PURE__ */ jsx48(TrueFalseActivityContent_default, __spreadValues({}, commonProps))
|
|
7253
7293
|
] }) : null;
|
|
@@ -7257,7 +7297,7 @@ var ActivityPreviewByData = ({
|
|
|
7257
7297
|
};
|
|
7258
7298
|
if (!data) return null;
|
|
7259
7299
|
return /* @__PURE__ */ jsxs38("div", { children: [
|
|
7260
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs38(
|
|
7300
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs38(Fragment8, { children: [
|
|
7261
7301
|
/* @__PURE__ */ jsxs38("div", { className: "mb-2", children: [
|
|
7262
7302
|
showDescription ? /* @__PURE__ */ jsx48("div", { className: "my-2", children: /* @__PURE__ */ jsx48("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7263
7303
|
/* @__PURE__ */ jsx48(
|