catchup-library-web 1.20.35 → 1.21.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.
- package/dist/index.js +1056 -823
- package/dist/index.mjs +971 -738
- package/package.json +2 -6
- package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx +62 -2
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +363 -203
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +318 -172
- package/src/components/activities/material-contents/OrderingActivityMaterialContent.tsx +76 -2
- package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent2.tsx +0 -306
- package/src/components/activities/material-contents/OrderingActivityMaterialContent2.tsx +0 -231
- package/src/components/dnds/DraggableDroppableItem.tsx +0 -60
- package/src/components/dnds/DraggableItem.tsx +0 -39
- package/src/components/dnds/DroppableItem.tsx +0 -33
package/dist/index.mjs
CHANGED
|
@@ -4691,6 +4691,10 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4691
4691
|
null
|
|
4692
4692
|
);
|
|
4693
4693
|
const dragElementRef = useRef4(null);
|
|
4694
|
+
const [mousePosition, setMousePosition] = useState17({
|
|
4695
|
+
x: 0,
|
|
4696
|
+
y: 0
|
|
4697
|
+
});
|
|
4694
4698
|
const [touchPosition, setTouchPosition] = useState17({
|
|
4695
4699
|
x: 0,
|
|
4696
4700
|
y: 0
|
|
@@ -4733,6 +4737,19 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4733
4737
|
e.preventDefault();
|
|
4734
4738
|
setDraggedOption(option);
|
|
4735
4739
|
setSelectedOption(null);
|
|
4740
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
4741
|
+
};
|
|
4742
|
+
const handleMouseMove = (e) => {
|
|
4743
|
+
if (!draggedOption) return;
|
|
4744
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
4745
|
+
const elementUnder = document.elementFromPoint(e.clientX, e.clientY);
|
|
4746
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-drop-zone]");
|
|
4747
|
+
if (dropZone) {
|
|
4748
|
+
const dropIndex = dropZone.getAttribute("data-drop-zone");
|
|
4749
|
+
setDropTargetIndex(dropIndex);
|
|
4750
|
+
} else {
|
|
4751
|
+
setDropTargetIndex(null);
|
|
4752
|
+
}
|
|
4736
4753
|
};
|
|
4737
4754
|
const handleMouseUp = () => {
|
|
4738
4755
|
if (dropTargetIndex !== null && draggedOption !== null) {
|
|
@@ -4740,6 +4757,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4740
4757
|
}
|
|
4741
4758
|
setDraggedOption(null);
|
|
4742
4759
|
setDropTargetIndex(null);
|
|
4760
|
+
setMousePosition({ x: 0, y: 0 });
|
|
4743
4761
|
};
|
|
4744
4762
|
const handleTouchStart = (e, option, element) => {
|
|
4745
4763
|
const touch = e.touches[0];
|
|
@@ -4771,6 +4789,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4771
4789
|
setDraggedOption(null);
|
|
4772
4790
|
setDropTargetIndex(null);
|
|
4773
4791
|
setDraggedElement(null);
|
|
4792
|
+
setTouchPosition({ x: 0, y: 0 });
|
|
4774
4793
|
};
|
|
4775
4794
|
const handleSelectOption = (option) => {
|
|
4776
4795
|
setSelectedOption(option);
|
|
@@ -4783,178 +4802,212 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4783
4802
|
}
|
|
4784
4803
|
};
|
|
4785
4804
|
const answerMap = retrieveAnswerMap();
|
|
4786
|
-
return /* @__PURE__ */ jsxs17(
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
},
|
|
4798
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx28("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx28(
|
|
4799
|
-
InputWithSpecialExpression_default,
|
|
4805
|
+
return /* @__PURE__ */ jsxs17(
|
|
4806
|
+
"div",
|
|
4807
|
+
{
|
|
4808
|
+
className: "flex flex-row flex-wrap items-center",
|
|
4809
|
+
onMouseMove: handleMouseMove,
|
|
4810
|
+
onMouseUp: handleMouseUp,
|
|
4811
|
+
children: [
|
|
4812
|
+
/* @__PURE__ */ jsx28("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx28("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4813
|
+
/* @__PURE__ */ jsx28("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx28(DividerLine_default, {}) }),
|
|
4814
|
+
draggedOption && mousePosition.x > 0 && /* @__PURE__ */ jsx28(
|
|
4815
|
+
"div",
|
|
4800
4816
|
{
|
|
4801
|
-
|
|
4802
|
-
|
|
4817
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
4818
|
+
style: {
|
|
4819
|
+
left: `${mousePosition.x}px`,
|
|
4820
|
+
top: `${mousePosition.y}px`,
|
|
4821
|
+
transform: "translate(-50%, -50%)"
|
|
4822
|
+
},
|
|
4823
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx28("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx28(
|
|
4824
|
+
InputWithSpecialExpression_default,
|
|
4825
|
+
{
|
|
4826
|
+
value: draggedOption,
|
|
4827
|
+
showSpecialOnly: false
|
|
4828
|
+
}
|
|
4829
|
+
) }) }) : /* @__PURE__ */ jsx28("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx28(
|
|
4830
|
+
ShowMaterialMediaByContentType_default,
|
|
4831
|
+
{
|
|
4832
|
+
contentType: contentMap.type,
|
|
4833
|
+
src: draggedOption,
|
|
4834
|
+
canFullScreen: false
|
|
4835
|
+
},
|
|
4836
|
+
uniqueValue
|
|
4837
|
+
) })
|
|
4803
4838
|
}
|
|
4804
|
-
)
|
|
4805
|
-
|
|
4839
|
+
),
|
|
4840
|
+
draggedOption && touchPosition.x > 0 && /* @__PURE__ */ jsx28(
|
|
4841
|
+
"div",
|
|
4806
4842
|
{
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28(
|
|
4834
|
-
"div",
|
|
4843
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
4844
|
+
style: {
|
|
4845
|
+
left: `${touchPosition.x}px`,
|
|
4846
|
+
top: `${touchPosition.y}px`,
|
|
4847
|
+
transform: "translate(-50%, -50%)"
|
|
4848
|
+
},
|
|
4849
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx28("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx28(
|
|
4850
|
+
InputWithSpecialExpression_default,
|
|
4851
|
+
{
|
|
4852
|
+
value: draggedOption,
|
|
4853
|
+
showSpecialOnly: false
|
|
4854
|
+
}
|
|
4855
|
+
) }) }) : /* @__PURE__ */ jsx28("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx28(
|
|
4856
|
+
ShowMaterialMediaByContentType_default,
|
|
4857
|
+
{
|
|
4858
|
+
contentType: contentMap.type,
|
|
4859
|
+
src: draggedOption,
|
|
4860
|
+
canFullScreen: false
|
|
4861
|
+
},
|
|
4862
|
+
uniqueValue
|
|
4863
|
+
) })
|
|
4864
|
+
}
|
|
4865
|
+
),
|
|
4866
|
+
/* @__PURE__ */ jsx28("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
4867
|
+
(option, index) => checkAnswerProvided(answerMap, option) ? /* @__PURE__ */ jsx28("div", { className: "opacity-30", children: /* @__PURE__ */ jsx28(
|
|
4868
|
+
ShowMaterialMediaByContentType_default,
|
|
4835
4869
|
{
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
showSpecialOnly: false
|
|
4843
|
-
}
|
|
4844
|
-
) })
|
|
4845
|
-
}
|
|
4846
|
-
) : /* @__PURE__ */ jsx28(
|
|
4870
|
+
contentType: contentMap.type,
|
|
4871
|
+
src: option,
|
|
4872
|
+
canFullScreen: true
|
|
4873
|
+
},
|
|
4874
|
+
`${uniqueValue}-${index}`
|
|
4875
|
+
) }, index) : /* @__PURE__ */ jsx28(
|
|
4847
4876
|
"div",
|
|
4848
4877
|
{
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
canFullScreen: true
|
|
4857
|
-
},
|
|
4858
|
-
`${uniqueValue}-${index}`
|
|
4859
|
-
)
|
|
4860
|
-
}
|
|
4861
|
-
)
|
|
4862
|
-
},
|
|
4863
|
-
index
|
|
4864
|
-
)
|
|
4865
|
-
) }),
|
|
4866
|
-
/* @__PURE__ */ jsx28("div", { className: "w-full flex flex-row flex-wrap", onMouseUp: handleMouseUp, children: Object.keys(answerMap).map((materialKey, index) => {
|
|
4867
|
-
const learnerAnswerState = checkAnswerState(
|
|
4868
|
-
JSON.parse(materialMap[materialKey]),
|
|
4869
|
-
answerMap[materialKey]
|
|
4870
|
-
);
|
|
4871
|
-
return /* @__PURE__ */ jsx28("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx28("div", { className: "mx-2", children: /* @__PURE__ */ jsx28(
|
|
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__ */ jsxs17("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4880
|
-
/* @__PURE__ */ jsx28("div", { className: "my-auto", children: /* @__PURE__ */ jsxs17("p", { className: "text-xl", children: [
|
|
4881
|
-
parseFloat(materialKey) + 1,
|
|
4882
|
-
"."
|
|
4883
|
-
] }) }),
|
|
4884
|
-
/* @__PURE__ */ jsx28("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
4885
|
-
/* @__PURE__ */ jsx28("div", { className: "flex-1", children: /* @__PURE__ */ jsx28(
|
|
4878
|
+
ref: draggedOption === option ? dragElementRef : null,
|
|
4879
|
+
className: `${draggedOption === option ? "opacity-40" : selectedOption === option ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
4880
|
+
onMouseDown: (e) => handleMouseDown(e, option),
|
|
4881
|
+
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
4882
|
+
onTouchMove: handleTouchMove,
|
|
4883
|
+
onTouchEnd: handleTouchEnd,
|
|
4884
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx28(
|
|
4886
4885
|
"div",
|
|
4887
4886
|
{
|
|
4888
|
-
className:
|
|
4889
|
-
onClick: (
|
|
4890
|
-
|
|
4891
|
-
e.stopPropagation();
|
|
4892
|
-
onChange(answer, materialKey, "");
|
|
4893
|
-
}
|
|
4894
|
-
},
|
|
4895
|
-
children: answerMap[materialKey] ? /* @__PURE__ */ jsx28(
|
|
4887
|
+
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4888
|
+
onClick: () => handleSelectOption(option),
|
|
4889
|
+
children: /* @__PURE__ */ jsx28("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx28(
|
|
4896
4890
|
InputWithSpecialExpression_default,
|
|
4897
4891
|
{
|
|
4898
|
-
value:
|
|
4892
|
+
value: option,
|
|
4899
4893
|
showSpecialOnly: false
|
|
4900
4894
|
}
|
|
4901
|
-
)
|
|
4895
|
+
) })
|
|
4902
4896
|
}
|
|
4903
|
-
)
|
|
4904
|
-
|
|
4905
|
-
BaseImage_default,
|
|
4906
|
-
{
|
|
4907
|
-
src: "/icons/checkbox.webp",
|
|
4908
|
-
alt: "checkbox",
|
|
4909
|
-
size: "small"
|
|
4910
|
-
}
|
|
4911
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx28("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx28(
|
|
4912
|
-
BaseImage_default,
|
|
4897
|
+
) : /* @__PURE__ */ jsx28(
|
|
4898
|
+
"div",
|
|
4913
4899
|
{
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4900
|
+
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
4901
|
+
onClick: () => handleSelectOption(option),
|
|
4902
|
+
children: /* @__PURE__ */ jsx28(
|
|
4903
|
+
ShowMaterialMediaByContentType_default,
|
|
4904
|
+
{
|
|
4905
|
+
contentType: contentMap.type,
|
|
4906
|
+
src: option,
|
|
4907
|
+
canFullScreen: true
|
|
4908
|
+
},
|
|
4909
|
+
`${uniqueValue}-${index}`
|
|
4910
|
+
)
|
|
4917
4911
|
}
|
|
4918
|
-
)
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
)
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4912
|
+
)
|
|
4913
|
+
},
|
|
4914
|
+
index
|
|
4915
|
+
)
|
|
4916
|
+
) }),
|
|
4917
|
+
/* @__PURE__ */ jsx28("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
4918
|
+
const learnerAnswerState = checkAnswerState(
|
|
4919
|
+
JSON.parse(materialMap[materialKey]),
|
|
4920
|
+
answerMap[materialKey]
|
|
4921
|
+
);
|
|
4922
|
+
return /* @__PURE__ */ jsx28("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx28("div", { className: "mx-2", children: /* @__PURE__ */ jsx28(
|
|
4923
|
+
"div",
|
|
4924
|
+
{
|
|
4925
|
+
"data-drop-zone": materialKey,
|
|
4926
|
+
onMouseEnter: () => draggedOption && setDropTargetIndex(materialKey),
|
|
4927
|
+
onMouseLeave: () => setDropTargetIndex(null),
|
|
4928
|
+
onClick: () => handleDropZoneClick(materialKey),
|
|
4929
|
+
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
4930
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4931
|
+
/* @__PURE__ */ jsx28("div", { className: "my-auto", children: /* @__PURE__ */ jsxs17("p", { className: "text-xl", children: [
|
|
4932
|
+
parseFloat(materialKey) + 1,
|
|
4933
|
+
"."
|
|
4934
|
+
] }) }),
|
|
4935
|
+
/* @__PURE__ */ jsx28("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
4936
|
+
/* @__PURE__ */ jsx28("div", { className: "flex-1", children: /* @__PURE__ */ jsx28(
|
|
4937
|
+
"div",
|
|
4938
|
+
{
|
|
4939
|
+
className: `w-full min-h-[44px] border rounded-lg ${answerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
4940
|
+
onClick: (e) => {
|
|
4941
|
+
if (answerMap[materialKey]) {
|
|
4942
|
+
e.stopPropagation();
|
|
4943
|
+
onChange(answer, materialKey, "");
|
|
4944
|
+
}
|
|
4945
|
+
},
|
|
4946
|
+
children: answerMap[materialKey] ? /* @__PURE__ */ jsx28(
|
|
4947
|
+
InputWithSpecialExpression_default,
|
|
4948
|
+
{
|
|
4949
|
+
value: answerMap[materialKey],
|
|
4950
|
+
showSpecialOnly: false
|
|
4951
|
+
}
|
|
4952
|
+
) : null
|
|
4953
|
+
}
|
|
4954
|
+
) }),
|
|
4955
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx28("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx28(
|
|
4956
|
+
BaseImage_default,
|
|
4957
|
+
{
|
|
4958
|
+
src: "/icons/checkbox.webp",
|
|
4959
|
+
alt: "checkbox",
|
|
4960
|
+
size: "small"
|
|
4961
|
+
}
|
|
4962
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx28("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx28(
|
|
4963
|
+
BaseImage_default,
|
|
4964
|
+
{
|
|
4965
|
+
src: "/icons/cross-red.webp",
|
|
4966
|
+
alt: "cross-red",
|
|
4967
|
+
size: "small"
|
|
4968
|
+
}
|
|
4969
|
+
) }) : null
|
|
4970
|
+
] }) : answerMap[materialKey] === "" ? /* @__PURE__ */ jsx28(
|
|
4971
|
+
"div",
|
|
4935
4972
|
{
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4973
|
+
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"}`,
|
|
4974
|
+
children: /* @__PURE__ */ jsx28("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ jsx28("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
|
|
4975
|
+
}
|
|
4976
|
+
) : /* @__PURE__ */ jsx28(
|
|
4977
|
+
"div",
|
|
4978
|
+
{
|
|
4979
|
+
className: "flex-1 cursor-pointer",
|
|
4980
|
+
onClick: (e) => {
|
|
4981
|
+
e.stopPropagation();
|
|
4982
|
+
onChange(answer, materialKey, "");
|
|
4983
|
+
},
|
|
4984
|
+
children: /* @__PURE__ */ jsx28(
|
|
4985
|
+
ShowMaterialMediaByContentType_default,
|
|
4986
|
+
{
|
|
4987
|
+
contentType: contentMap.type,
|
|
4988
|
+
src: answerMap[materialKey],
|
|
4989
|
+
canFullScreen: true
|
|
4990
|
+
},
|
|
4991
|
+
`${uniqueValue}-${index}`
|
|
4992
|
+
)
|
|
4993
|
+
}
|
|
4994
|
+
) : /* @__PURE__ */ jsx28("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
4995
|
+
answerMap[materialKey]
|
|
4996
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx28(
|
|
4997
|
+
"span",
|
|
4998
|
+
{
|
|
4999
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5000
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx28("span", { className: "text-xl", children: /* @__PURE__ */ jsx28(InlineMath4, { math: inputPart.value }) }) : inputPart.value
|
|
4939
5001
|
},
|
|
4940
|
-
|
|
4941
|
-
)
|
|
4942
|
-
}
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx28("span", { className: "text-xl", children: /* @__PURE__ */ jsx28(InlineMath4, { math: inputPart.value }) }) : inputPart.value
|
|
4950
|
-
},
|
|
4951
|
-
index2
|
|
4952
|
-
)) }, materialKey) })
|
|
4953
|
-
] })
|
|
4954
|
-
}
|
|
4955
|
-
) }) }, index);
|
|
4956
|
-
}) })
|
|
4957
|
-
] });
|
|
5002
|
+
index2
|
|
5003
|
+
)) }, materialKey) })
|
|
5004
|
+
] })
|
|
5005
|
+
}
|
|
5006
|
+
) }) }, index);
|
|
5007
|
+
}) })
|
|
5008
|
+
]
|
|
5009
|
+
}
|
|
5010
|
+
);
|
|
4958
5011
|
};
|
|
4959
5012
|
var FillInTheBlanksActivityMaterialContent_default = FillInTheBlanksActivityMaterialContent;
|
|
4960
5013
|
|
|
@@ -5059,71 +5112,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5059
5112
|
var FillInTheBlanksActivityContent_default = FillInTheBlanksActivityContent;
|
|
5060
5113
|
|
|
5061
5114
|
// src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
|
|
5062
|
-
import { useEffect as useEffect10, useRef as
|
|
5063
|
-
import { useDrop as useDrop2 } from "react-dnd";
|
|
5115
|
+
import { useEffect as useEffect10, useRef as useRef5, useState as useState19 } from "react";
|
|
5064
5116
|
import { InlineMath as InlineMath5 } from "react-katex";
|
|
5065
|
-
|
|
5066
|
-
// src/components/dnds/DraggableItem.tsx
|
|
5067
|
-
import { useDrag } from "react-dnd";
|
|
5068
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5069
|
-
var DraggableItem = ({
|
|
5070
|
-
item,
|
|
5071
|
-
type,
|
|
5072
|
-
component,
|
|
5073
|
-
moveCardHandler
|
|
5074
|
-
}) => {
|
|
5075
|
-
const [{ isDragging }, drag] = useDrag({
|
|
5076
|
-
type,
|
|
5077
|
-
item,
|
|
5078
|
-
end: (item2, monitor) => {
|
|
5079
|
-
const dropResult = monitor.getDropResult();
|
|
5080
|
-
if (dropResult) {
|
|
5081
|
-
moveCardHandler();
|
|
5082
|
-
}
|
|
5083
|
-
},
|
|
5084
|
-
collect: (monitor) => ({
|
|
5085
|
-
isDragging: monitor.isDragging()
|
|
5086
|
-
})
|
|
5087
|
-
});
|
|
5088
|
-
const opacity = isDragging ? 0.4 : 1;
|
|
5089
|
-
return /* @__PURE__ */ jsx30(
|
|
5090
|
-
"div",
|
|
5091
|
-
{
|
|
5092
|
-
className: `${isDragging ? "w-[0px] opacity-0" : "opacity-100"} transition-all duration-500`,
|
|
5093
|
-
children: /* @__PURE__ */ jsx30("div", { ref: drag, className: "", style: { opacity }, children: component })
|
|
5094
|
-
}
|
|
5095
|
-
);
|
|
5096
|
-
};
|
|
5097
|
-
var DraggableItem_default = DraggableItem;
|
|
5098
|
-
|
|
5099
|
-
// src/components/dnds/DroppableItem.tsx
|
|
5100
|
-
import { useRef as useRef5 } from "react";
|
|
5101
|
-
import { useDrop } from "react-dnd";
|
|
5102
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5103
|
-
var DroppableItem = ({
|
|
5104
|
-
item,
|
|
5105
|
-
type,
|
|
5106
|
-
component,
|
|
5107
|
-
dropRef,
|
|
5108
|
-
target,
|
|
5109
|
-
setTarget
|
|
5110
|
-
}) => {
|
|
5111
|
-
const ref = useRef5(null);
|
|
5112
|
-
const [, drop] = useDrop({
|
|
5113
|
-
accept: type,
|
|
5114
|
-
hover() {
|
|
5115
|
-
if (item.index !== null && target !== item.index) {
|
|
5116
|
-
setTarget(item.index);
|
|
5117
|
-
}
|
|
5118
|
-
}
|
|
5119
|
-
});
|
|
5120
|
-
dropRef(drop(ref));
|
|
5121
|
-
return /* @__PURE__ */ jsx31("div", { className: `w-full transition-all duration-500 h-full`, ref, children: component });
|
|
5122
|
-
};
|
|
5123
|
-
var DroppableItem_default = DroppableItem;
|
|
5124
|
-
|
|
5125
|
-
// src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
|
|
5126
|
-
import { Fragment as Fragment3, jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5117
|
+
import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5127
5118
|
var GroupingActivityMaterialContent = ({
|
|
5128
5119
|
uniqueValue,
|
|
5129
5120
|
answer,
|
|
@@ -5135,19 +5126,23 @@ var GroupingActivityMaterialContent = ({
|
|
|
5135
5126
|
showCorrectAnswer
|
|
5136
5127
|
}) => {
|
|
5137
5128
|
const [selectedValue, setSelectedValue] = useState19(null);
|
|
5138
|
-
const [
|
|
5129
|
+
const [draggedValue, setDraggedValue] = useState19(null);
|
|
5130
|
+
const [dropTargetKey, setDropTargetKey] = useState19(null);
|
|
5131
|
+
const [draggedElement, setDraggedElement] = useState19(
|
|
5132
|
+
null
|
|
5133
|
+
);
|
|
5139
5134
|
const [isShuffled, setIsShuffled] = useState19(false);
|
|
5140
5135
|
const [shuffledMaterialList, setShuffledMaterialList] = useState19([]);
|
|
5141
|
-
const
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
collect: (monitor) => ({
|
|
5146
|
-
isOver: monitor.isOver(),
|
|
5147
|
-
canDrop: monitor.canDrop()
|
|
5148
|
-
})
|
|
5136
|
+
const dragElementRef = useRef5(null);
|
|
5137
|
+
const [mousePosition, setMousePosition] = useState19({
|
|
5138
|
+
x: 0,
|
|
5139
|
+
y: 0
|
|
5149
5140
|
});
|
|
5150
|
-
const
|
|
5141
|
+
const [touchPosition, setTouchPosition] = useState19({
|
|
5142
|
+
x: 0,
|
|
5143
|
+
y: 0
|
|
5144
|
+
});
|
|
5145
|
+
const ref = useRef5(null);
|
|
5151
5146
|
useEffect10(() => {
|
|
5152
5147
|
const shuffleArray2 = (array) => {
|
|
5153
5148
|
if (!isShuffled) {
|
|
@@ -5168,13 +5163,13 @@ var GroupingActivityMaterialContent = ({
|
|
|
5168
5163
|
}
|
|
5169
5164
|
});
|
|
5170
5165
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5171
|
-
}, []);
|
|
5166
|
+
}, [materialMap, isShuffled]);
|
|
5172
5167
|
useEffect10(() => {
|
|
5173
5168
|
if (!showCorrectAnswer) return;
|
|
5174
5169
|
answer.data.find(
|
|
5175
5170
|
(answerData) => answerData.type === "GROUPING"
|
|
5176
5171
|
).answerMap = materialMap;
|
|
5177
|
-
}, [showCorrectAnswer]);
|
|
5172
|
+
}, [showCorrectAnswer, answer, materialMap]);
|
|
5178
5173
|
const retrieveAnswerMap = () => {
|
|
5179
5174
|
const foundIndex = answer.data.findIndex(
|
|
5180
5175
|
(answerData) => answerData.type === "GROUPING"
|
|
@@ -5205,56 +5200,164 @@ var GroupingActivityMaterialContent = ({
|
|
|
5205
5200
|
}
|
|
5206
5201
|
return "INCORRECT";
|
|
5207
5202
|
};
|
|
5208
|
-
const
|
|
5209
|
-
if (checkCanAnswerQuestion())
|
|
5210
|
-
|
|
5203
|
+
const handleMouseDown = (e, materialValue) => {
|
|
5204
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5205
|
+
e.preventDefault();
|
|
5206
|
+
setDraggedValue(materialValue);
|
|
5207
|
+
setSelectedValue(null);
|
|
5208
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
5209
|
+
};
|
|
5210
|
+
const handleMouseMove = (e) => {
|
|
5211
|
+
if (!draggedValue) return;
|
|
5212
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
5213
|
+
const elementUnder = document.elementFromPoint(e.clientX, e.clientY);
|
|
5214
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-grouping-drop-zone]");
|
|
5215
|
+
if (dropZone) {
|
|
5216
|
+
const dropKey = dropZone.getAttribute("data-grouping-drop-zone");
|
|
5217
|
+
setDropTargetKey(dropKey);
|
|
5218
|
+
} else {
|
|
5219
|
+
setDropTargetKey(null);
|
|
5220
|
+
}
|
|
5221
|
+
};
|
|
5222
|
+
const handleMouseUp = () => {
|
|
5223
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5224
|
+
onChange(answer, dropTargetKey, draggedValue, null);
|
|
5225
|
+
}
|
|
5226
|
+
setDraggedValue(null);
|
|
5227
|
+
setDropTargetKey(null);
|
|
5228
|
+
setMousePosition({ x: 0, y: 0 });
|
|
5229
|
+
};
|
|
5230
|
+
const handleTouchStart = (e, materialValue, element) => {
|
|
5231
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5232
|
+
const touch = e.touches[0];
|
|
5233
|
+
setDraggedValue(materialValue);
|
|
5234
|
+
setDraggedElement(element);
|
|
5235
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5236
|
+
setSelectedValue(null);
|
|
5237
|
+
};
|
|
5238
|
+
const handleTouchMove = (e) => {
|
|
5239
|
+
if (!draggedValue) return;
|
|
5240
|
+
const touch = e.touches[0];
|
|
5241
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5242
|
+
const elementUnder = document.elementFromPoint(
|
|
5243
|
+
touch.clientX,
|
|
5244
|
+
touch.clientY
|
|
5245
|
+
);
|
|
5246
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-grouping-drop-zone]");
|
|
5247
|
+
if (dropZone) {
|
|
5248
|
+
const dropKey = dropZone.getAttribute("data-grouping-drop-zone");
|
|
5249
|
+
setDropTargetKey(dropKey);
|
|
5250
|
+
} else {
|
|
5251
|
+
setDropTargetKey(null);
|
|
5252
|
+
}
|
|
5253
|
+
};
|
|
5254
|
+
const handleTouchEnd = () => {
|
|
5255
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5256
|
+
onChange(answer, dropTargetKey, draggedValue, null);
|
|
5257
|
+
}
|
|
5258
|
+
setDraggedValue(null);
|
|
5259
|
+
setDropTargetKey(null);
|
|
5260
|
+
setDraggedElement(null);
|
|
5261
|
+
setTouchPosition({ x: 0, y: 0 });
|
|
5262
|
+
};
|
|
5263
|
+
const handleSelectItem = (materialValue) => {
|
|
5264
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5265
|
+
setSelectedValue(materialValue);
|
|
5266
|
+
setDraggedValue(null);
|
|
5267
|
+
};
|
|
5268
|
+
const handleDropZoneClick = (answerMapKey) => {
|
|
5269
|
+
if (selectedValue !== null) {
|
|
5270
|
+
onChange(answer, answerMapKey, selectedValue, null);
|
|
5211
5271
|
setSelectedValue(null);
|
|
5212
5272
|
}
|
|
5213
5273
|
};
|
|
5214
5274
|
const answerMap = retrieveAnswerMap();
|
|
5215
5275
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5216
|
-
return /* @__PURE__ */ jsxs19(
|
|
5276
|
+
return /* @__PURE__ */ jsxs19("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5277
|
+
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ jsx30(
|
|
5278
|
+
"div",
|
|
5279
|
+
{
|
|
5280
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5281
|
+
style: {
|
|
5282
|
+
left: `${mousePosition.x}px`,
|
|
5283
|
+
top: `${mousePosition.y}px`,
|
|
5284
|
+
transform: "translate(-50%, -50%)"
|
|
5285
|
+
},
|
|
5286
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx30("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ jsx30("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5287
|
+
(inputPart, index) => /* @__PURE__ */ jsx30(
|
|
5288
|
+
"span",
|
|
5289
|
+
{
|
|
5290
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5291
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx30("span", { className: "text-2xl", children: /* @__PURE__ */ jsx30(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
5292
|
+
},
|
|
5293
|
+
index
|
|
5294
|
+
)
|
|
5295
|
+
) }) }) }) : /* @__PURE__ */ jsx30("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx30(
|
|
5296
|
+
ShowMaterialMediaByContentType_default,
|
|
5297
|
+
{
|
|
5298
|
+
contentType: contentMap.type,
|
|
5299
|
+
src: draggedValue,
|
|
5300
|
+
canFullScreen: false
|
|
5301
|
+
},
|
|
5302
|
+
`${uniqueValue}-drag-mouse`
|
|
5303
|
+
) })
|
|
5304
|
+
}
|
|
5305
|
+
),
|
|
5306
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ jsx30(
|
|
5307
|
+
"div",
|
|
5308
|
+
{
|
|
5309
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5310
|
+
style: {
|
|
5311
|
+
left: `${touchPosition.x}px`,
|
|
5312
|
+
top: `${touchPosition.y}px`,
|
|
5313
|
+
transform: "translate(-50%, -50%)"
|
|
5314
|
+
},
|
|
5315
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx30("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ jsx30("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5316
|
+
(inputPart, index) => /* @__PURE__ */ jsx30(
|
|
5317
|
+
"span",
|
|
5318
|
+
{
|
|
5319
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5320
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx30("span", { className: "text-2xl", children: /* @__PURE__ */ jsx30(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
5321
|
+
},
|
|
5322
|
+
index
|
|
5323
|
+
)
|
|
5324
|
+
) }) }) }) : /* @__PURE__ */ jsx30("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx30(
|
|
5325
|
+
ShowMaterialMediaByContentType_default,
|
|
5326
|
+
{
|
|
5327
|
+
contentType: contentMap.type,
|
|
5328
|
+
src: draggedValue,
|
|
5329
|
+
canFullScreen: false
|
|
5330
|
+
},
|
|
5331
|
+
`${uniqueValue}-drag-touch`
|
|
5332
|
+
) })
|
|
5333
|
+
}
|
|
5334
|
+
),
|
|
5217
5335
|
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
5218
|
-
/* @__PURE__ */
|
|
5219
|
-
return /* @__PURE__ */
|
|
5220
|
-
|
|
5336
|
+
/* @__PURE__ */ jsx30("div", { className: "flex-1 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
|
|
5337
|
+
return /* @__PURE__ */ jsx30(
|
|
5338
|
+
"div",
|
|
5221
5339
|
{
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5340
|
+
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5341
|
+
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5342
|
+
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5343
|
+
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5344
|
+
onTouchMove: handleTouchMove,
|
|
5345
|
+
onTouchEnd: handleTouchEnd,
|
|
5346
|
+
children: /* @__PURE__ */ jsx30(
|
|
5225
5347
|
"div",
|
|
5226
5348
|
{
|
|
5227
5349
|
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`,
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
setSelectedValue(materialValue);
|
|
5231
|
-
}
|
|
5232
|
-
},
|
|
5233
|
-
onTouchEnd: () => {
|
|
5234
|
-
if (checkCanAnswerQuestion()) {
|
|
5235
|
-
setSelectedValue(materialValue);
|
|
5236
|
-
}
|
|
5237
|
-
},
|
|
5238
|
-
onMouseUp: () => {
|
|
5239
|
-
if (checkCanAnswerQuestion()) {
|
|
5240
|
-
setSelectedValue(null);
|
|
5241
|
-
}
|
|
5242
|
-
},
|
|
5243
|
-
onTouchStart: () => {
|
|
5244
|
-
if (checkCanAnswerQuestion()) {
|
|
5245
|
-
setSelectedValue(null);
|
|
5246
|
-
}
|
|
5247
|
-
},
|
|
5248
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ jsx32("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5350
|
+
onClick: () => handleSelectItem(materialValue),
|
|
5351
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ jsx30("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5249
5352
|
materialValue
|
|
5250
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
5353
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx30(
|
|
5251
5354
|
"span",
|
|
5252
5355
|
{
|
|
5253
5356
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5254
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5357
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx30("span", { className: "text-2xl", children: /* @__PURE__ */ jsx30(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
5255
5358
|
},
|
|
5256
5359
|
index2
|
|
5257
|
-
)) }) }) : /* @__PURE__ */
|
|
5360
|
+
)) }) }) : /* @__PURE__ */ jsx30(
|
|
5258
5361
|
ShowMaterialMediaByContentType_default,
|
|
5259
5362
|
{
|
|
5260
5363
|
contentType: contentMap.type,
|
|
@@ -5264,109 +5367,94 @@ var GroupingActivityMaterialContent = ({
|
|
|
5264
5367
|
`${uniqueValue}-${index}`
|
|
5265
5368
|
)
|
|
5266
5369
|
}
|
|
5267
|
-
)
|
|
5268
|
-
moveCardHandler: () => {
|
|
5269
|
-
if (!selectedTargetKey) return;
|
|
5270
|
-
if (!selectedValue) return;
|
|
5271
|
-
handleGroupingActivityItemOnChange(
|
|
5272
|
-
selectedTargetKey,
|
|
5273
|
-
selectedValue
|
|
5274
|
-
);
|
|
5275
|
-
}
|
|
5370
|
+
)
|
|
5276
5371
|
},
|
|
5277
5372
|
index
|
|
5278
5373
|
);
|
|
5279
5374
|
}) }),
|
|
5280
|
-
/* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ jsx30(DividerLine_default, {})
|
|
5281
5376
|
] }) : null,
|
|
5282
|
-
/* @__PURE__ */
|
|
5283
|
-
/* @__PURE__ */
|
|
5377
|
+
/* @__PURE__ */ jsx30("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-row w-full", children: [
|
|
5378
|
+
/* @__PURE__ */ jsx30("div", { className: "w-1/3", children: /* @__PURE__ */ jsx30(
|
|
5284
5379
|
"div",
|
|
5285
5380
|
{
|
|
5286
5381
|
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`,
|
|
5287
|
-
children: /* @__PURE__ */
|
|
5288
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
5382
|
+
children: /* @__PURE__ */ jsx30("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ jsx30("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5383
|
+
(inputPart, index2) => /* @__PURE__ */ jsx30(
|
|
5289
5384
|
"span",
|
|
5290
5385
|
{
|
|
5291
5386
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5292
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5387
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx30("span", { className: "text-2xl", children: /* @__PURE__ */ jsx30(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
5293
5388
|
},
|
|
5294
5389
|
index2
|
|
5295
5390
|
)
|
|
5296
5391
|
) }) })
|
|
5297
5392
|
}
|
|
5298
5393
|
) }),
|
|
5299
|
-
/* @__PURE__ */
|
|
5300
|
-
/* @__PURE__ */
|
|
5394
|
+
/* @__PURE__ */ jsx30("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5395
|
+
/* @__PURE__ */ jsx30("div", { className: "flex-1 min-w-0", ref, children: /* @__PURE__ */ jsx30("div", { className: "h-full py-3", children: /* @__PURE__ */ jsx30(
|
|
5301
5396
|
"div",
|
|
5302
5397
|
{
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5398
|
+
"data-grouping-drop-zone": answerMapKey,
|
|
5399
|
+
onMouseEnter: () => draggedValue && setDropTargetKey(answerMapKey),
|
|
5400
|
+
onMouseLeave: () => setDropTargetKey(null),
|
|
5401
|
+
onClick: () => handleDropZoneClick(answerMapKey),
|
|
5402
|
+
className: `${dropTargetKey === answerMapKey ? "bg-catchup-light-blue ring-2 ring-blue-400" : ""} flex-1 border-catchup-blue rounded-catchup-xlarge border-2 h-full p-1 transition-all duration-200`,
|
|
5403
|
+
children: /* @__PURE__ */ jsx30("div", { className: "h-full w-full overflow-x-auto", children: /* @__PURE__ */ jsx30("div", { className: "flex flex-row items-center gap-2 w-max h-full", children: answerMap[answerMapKey].map(
|
|
5404
|
+
(answerMapValue, answerMapIndex) => {
|
|
5405
|
+
const learnerAnswerState = checkAnswerState(
|
|
5406
|
+
materialMap[answerMapKey],
|
|
5407
|
+
answerMapValue
|
|
5408
|
+
);
|
|
5409
|
+
return /* @__PURE__ */ jsx30("div", { className: "p-1", children: /* @__PURE__ */ jsx30(
|
|
5410
|
+
"div",
|
|
5411
|
+
{
|
|
5412
|
+
className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"}`,
|
|
5413
|
+
children: /* @__PURE__ */ jsx30(
|
|
5319
5414
|
"div",
|
|
5320
5415
|
{
|
|
5321
|
-
className: `${
|
|
5322
|
-
|
|
5323
|
-
|
|
5416
|
+
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`,
|
|
5417
|
+
onClick: (e) => {
|
|
5418
|
+
e.stopPropagation();
|
|
5419
|
+
if (checkCanAnswerQuestion()) {
|
|
5420
|
+
onChange(
|
|
5421
|
+
answer,
|
|
5422
|
+
answerMapKey,
|
|
5423
|
+
null,
|
|
5424
|
+
answerMapIndex
|
|
5425
|
+
);
|
|
5426
|
+
setSelectedValue(null);
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5429
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30("div", { className: "flex flex-col items-center justify-center transition-all duration-300 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ jsx30("div", { className: "m-2", children: /* @__PURE__ */ jsx30("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5430
|
+
answerMapValue
|
|
5431
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx30(
|
|
5432
|
+
"span",
|
|
5324
5433
|
{
|
|
5325
|
-
className: `${
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
if (checkCanAnswerQuestion()) {
|
|
5329
|
-
onChange(
|
|
5330
|
-
answer,
|
|
5331
|
-
answerMapKey,
|
|
5332
|
-
null,
|
|
5333
|
-
answerMapIndex
|
|
5334
|
-
);
|
|
5335
|
-
setSelectedValue(null);
|
|
5336
|
-
}
|
|
5337
|
-
},
|
|
5338
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center transition-all duration-300 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ jsx32("div", { className: "m-2", children: /* @__PURE__ */ jsx32("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5339
|
-
answerMapValue
|
|
5340
|
-
).map((inputPart, index2) => /* @__PURE__ */ jsx32(
|
|
5341
|
-
"span",
|
|
5342
|
-
{
|
|
5343
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5344
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-2xl", children: /* @__PURE__ */ jsx32(
|
|
5345
|
-
InlineMath5,
|
|
5346
|
-
{
|
|
5347
|
-
math: inputPart.value
|
|
5348
|
-
}
|
|
5349
|
-
) }) : inputPart.value
|
|
5350
|
-
},
|
|
5351
|
-
index2
|
|
5352
|
-
)) }) }) }) : /* @__PURE__ */ jsx32(
|
|
5353
|
-
ShowMaterialMediaByContentType_default,
|
|
5434
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5435
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx30("span", { className: "text-2xl", children: /* @__PURE__ */ jsx30(
|
|
5436
|
+
InlineMath5,
|
|
5354
5437
|
{
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5438
|
+
math: inputPart.value
|
|
5439
|
+
}
|
|
5440
|
+
) }) : inputPart.value
|
|
5441
|
+
},
|
|
5442
|
+
index2
|
|
5443
|
+
)) }) }) }) : /* @__PURE__ */ jsx30(
|
|
5444
|
+
ShowMaterialMediaByContentType_default,
|
|
5445
|
+
{
|
|
5446
|
+
contentType: contentMap.type,
|
|
5447
|
+
src: answerMapValue,
|
|
5448
|
+
canFullScreen: false
|
|
5449
|
+
},
|
|
5450
|
+
`${uniqueValue}-${answerMapIndex}`
|
|
5362
5451
|
)
|
|
5363
5452
|
}
|
|
5364
|
-
)
|
|
5453
|
+
)
|
|
5365
5454
|
}
|
|
5366
|
-
) }
|
|
5367
|
-
}
|
|
5368
|
-
|
|
5369
|
-
)
|
|
5455
|
+
) }, answerMapIndex);
|
|
5456
|
+
}
|
|
5457
|
+
) }) })
|
|
5370
5458
|
}
|
|
5371
5459
|
) }) })
|
|
5372
5460
|
] }, index)) })
|
|
@@ -5375,7 +5463,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5375
5463
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5376
5464
|
|
|
5377
5465
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5378
|
-
import { Fragment as Fragment4, jsx as
|
|
5466
|
+
import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5379
5467
|
var GroupingActivityContent = ({
|
|
5380
5468
|
answer,
|
|
5381
5469
|
data,
|
|
@@ -5401,15 +5489,15 @@ var GroupingActivityContent = ({
|
|
|
5401
5489
|
changeAnswer(answer2);
|
|
5402
5490
|
};
|
|
5403
5491
|
return /* @__PURE__ */ jsxs20(Fragment4, { children: [
|
|
5404
|
-
/* @__PURE__ */
|
|
5492
|
+
/* @__PURE__ */ jsx31(
|
|
5405
5493
|
ActivityBodyContent_default,
|
|
5406
5494
|
{
|
|
5407
5495
|
bodyMap: groupingBodyMap,
|
|
5408
5496
|
templateType: "GROUPING"
|
|
5409
5497
|
}
|
|
5410
5498
|
),
|
|
5411
|
-
/* @__PURE__ */
|
|
5412
|
-
/* @__PURE__ */
|
|
5499
|
+
/* @__PURE__ */ jsx31(DividerLine_default, {}),
|
|
5500
|
+
/* @__PURE__ */ jsx31(
|
|
5413
5501
|
GroupingActivityMaterialContent_default,
|
|
5414
5502
|
{
|
|
5415
5503
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5427,10 +5515,9 @@ var GroupingActivityContent = ({
|
|
|
5427
5515
|
var GroupingActivityContent_default = GroupingActivityContent;
|
|
5428
5516
|
|
|
5429
5517
|
// src/components/activities/material-contents/MatchingActivityMaterialContent.tsx
|
|
5430
|
-
import { useEffect as useEffect11, useRef as
|
|
5431
|
-
import { useDrop as useDrop3 } from "react-dnd";
|
|
5518
|
+
import { useEffect as useEffect11, useRef as useRef6, useState as useState20 } from "react";
|
|
5432
5519
|
import { InlineMath as InlineMath6 } from "react-katex";
|
|
5433
|
-
import { Fragment as Fragment5, jsx as
|
|
5520
|
+
import { Fragment as Fragment5, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5434
5521
|
var MatchingActivityMaterialContent = ({
|
|
5435
5522
|
uniqueValue,
|
|
5436
5523
|
answer,
|
|
@@ -5442,19 +5529,23 @@ var MatchingActivityMaterialContent = ({
|
|
|
5442
5529
|
showCorrectAnswer
|
|
5443
5530
|
}) => {
|
|
5444
5531
|
const [selectedValue, setSelectedValue] = useState20(null);
|
|
5445
|
-
const [
|
|
5532
|
+
const [draggedValue, setDraggedValue] = useState20(null);
|
|
5533
|
+
const [dropTargetKey, setDropTargetKey] = useState20(null);
|
|
5534
|
+
const [draggedElement, setDraggedElement] = useState20(
|
|
5535
|
+
null
|
|
5536
|
+
);
|
|
5446
5537
|
const [isShuffled, setIsShuffled] = useState20(false);
|
|
5447
|
-
const [shuffledMaterialList, setShuffledMaterialList] = useState20([]);
|
|
5448
|
-
const
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5538
|
+
const [shuffledMaterialList, setShuffledMaterialList] = useState20([]);
|
|
5539
|
+
const dragElementRef = useRef6(null);
|
|
5540
|
+
const [mousePosition, setMousePosition] = useState20({
|
|
5541
|
+
x: 0,
|
|
5542
|
+
y: 0
|
|
5543
|
+
});
|
|
5544
|
+
const [touchPosition, setTouchPosition] = useState20({
|
|
5545
|
+
x: 0,
|
|
5546
|
+
y: 0
|
|
5456
5547
|
});
|
|
5457
|
-
const itemsRef =
|
|
5548
|
+
const itemsRef = useRef6(null);
|
|
5458
5549
|
useEffect11(() => {
|
|
5459
5550
|
const shuffleArray2 = (array) => {
|
|
5460
5551
|
if (!isShuffled) {
|
|
@@ -5473,13 +5564,13 @@ var MatchingActivityMaterialContent = ({
|
|
|
5473
5564
|
materialList.push(materialMap[materialKey]);
|
|
5474
5565
|
});
|
|
5475
5566
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5476
|
-
}, []);
|
|
5567
|
+
}, [materialMap, isShuffled]);
|
|
5477
5568
|
useEffect11(() => {
|
|
5478
5569
|
if (!showCorrectAnswer) return;
|
|
5479
5570
|
answer.data.find(
|
|
5480
5571
|
(answerData) => answerData.type === "MATCHING"
|
|
5481
5572
|
).answerMap = materialMap;
|
|
5482
|
-
}, [showCorrectAnswer]);
|
|
5573
|
+
}, [showCorrectAnswer, answer, materialMap]);
|
|
5483
5574
|
const retrieveAnswerMap = () => {
|
|
5484
5575
|
const foundIndex = answer.data.findIndex(
|
|
5485
5576
|
(answerData) => answerData.type === "MATCHING"
|
|
@@ -5503,60 +5594,168 @@ var MatchingActivityMaterialContent = ({
|
|
|
5503
5594
|
}
|
|
5504
5595
|
return "INCORRECT";
|
|
5505
5596
|
};
|
|
5506
|
-
const
|
|
5507
|
-
if (checkCanAnswerQuestion())
|
|
5508
|
-
|
|
5597
|
+
const handleMouseDown = (e, materialValue) => {
|
|
5598
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5599
|
+
e.preventDefault();
|
|
5600
|
+
setDraggedValue(materialValue);
|
|
5601
|
+
setSelectedValue(null);
|
|
5602
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
5603
|
+
};
|
|
5604
|
+
const handleMouseMove = (e) => {
|
|
5605
|
+
if (!draggedValue) return;
|
|
5606
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
5607
|
+
const elementUnder = document.elementFromPoint(e.clientX, e.clientY);
|
|
5608
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-matching-drop-zone]");
|
|
5609
|
+
if (dropZone) {
|
|
5610
|
+
const dropKey = dropZone.getAttribute("data-matching-drop-zone");
|
|
5611
|
+
setDropTargetKey(dropKey);
|
|
5612
|
+
} else {
|
|
5613
|
+
setDropTargetKey(null);
|
|
5614
|
+
}
|
|
5615
|
+
};
|
|
5616
|
+
const handleMouseUp = () => {
|
|
5617
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5618
|
+
onChange(answer, dropTargetKey, draggedValue);
|
|
5619
|
+
}
|
|
5620
|
+
setDraggedValue(null);
|
|
5621
|
+
setDropTargetKey(null);
|
|
5622
|
+
setMousePosition({ x: 0, y: 0 });
|
|
5623
|
+
};
|
|
5624
|
+
const handleTouchStart = (e, materialValue, element) => {
|
|
5625
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5626
|
+
const touch = e.touches[0];
|
|
5627
|
+
setDraggedValue(materialValue);
|
|
5628
|
+
setDraggedElement(element);
|
|
5629
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5630
|
+
setSelectedValue(null);
|
|
5631
|
+
};
|
|
5632
|
+
const handleTouchMove = (e) => {
|
|
5633
|
+
if (!draggedValue) return;
|
|
5634
|
+
const touch = e.touches[0];
|
|
5635
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5636
|
+
const elementUnder = document.elementFromPoint(
|
|
5637
|
+
touch.clientX,
|
|
5638
|
+
touch.clientY
|
|
5639
|
+
);
|
|
5640
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-matching-drop-zone]");
|
|
5641
|
+
if (dropZone) {
|
|
5642
|
+
const dropKey = dropZone.getAttribute("data-matching-drop-zone");
|
|
5643
|
+
setDropTargetKey(dropKey);
|
|
5644
|
+
} else {
|
|
5645
|
+
setDropTargetKey(null);
|
|
5646
|
+
}
|
|
5647
|
+
};
|
|
5648
|
+
const handleTouchEnd = () => {
|
|
5649
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5650
|
+
onChange(answer, dropTargetKey, draggedValue);
|
|
5651
|
+
}
|
|
5652
|
+
setDraggedValue(null);
|
|
5653
|
+
setDropTargetKey(null);
|
|
5654
|
+
setDraggedElement(null);
|
|
5655
|
+
setTouchPosition({ x: 0, y: 0 });
|
|
5656
|
+
};
|
|
5657
|
+
const handleSelectItem = (materialValue) => {
|
|
5658
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5659
|
+
setSelectedValue(materialValue);
|
|
5660
|
+
setDraggedValue(null);
|
|
5661
|
+
};
|
|
5662
|
+
const handleDropZoneClick = (answerMapKey) => {
|
|
5663
|
+
if (selectedValue !== null) {
|
|
5664
|
+
onChange(answer, answerMapKey, selectedValue);
|
|
5509
5665
|
setSelectedValue(null);
|
|
5510
5666
|
}
|
|
5511
5667
|
};
|
|
5512
5668
|
const answerMap = retrieveAnswerMap();
|
|
5513
5669
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5514
|
-
return /* @__PURE__ */ jsxs21(
|
|
5670
|
+
return /* @__PURE__ */ jsxs21("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5671
|
+
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ jsx32(
|
|
5672
|
+
"div",
|
|
5673
|
+
{
|
|
5674
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5675
|
+
style: {
|
|
5676
|
+
left: `${mousePosition.x}px`,
|
|
5677
|
+
top: `${mousePosition.y}px`,
|
|
5678
|
+
transform: "translate(-50%, -50%)"
|
|
5679
|
+
},
|
|
5680
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5681
|
+
(inputPart, index) => /* @__PURE__ */ jsx32(
|
|
5682
|
+
"span",
|
|
5683
|
+
{
|
|
5684
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5685
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-xl", children: /* @__PURE__ */ jsx32(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5686
|
+
},
|
|
5687
|
+
index
|
|
5688
|
+
)
|
|
5689
|
+
) }) }) }) : /* @__PURE__ */ jsx32("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx32(
|
|
5690
|
+
ShowMaterialMediaByContentType_default,
|
|
5691
|
+
{
|
|
5692
|
+
contentType: contentMap.type,
|
|
5693
|
+
src: draggedValue,
|
|
5694
|
+
canFullScreen: false
|
|
5695
|
+
},
|
|
5696
|
+
`${uniqueValue}-drag-mouse`
|
|
5697
|
+
) })
|
|
5698
|
+
}
|
|
5699
|
+
),
|
|
5700
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ jsx32(
|
|
5701
|
+
"div",
|
|
5702
|
+
{
|
|
5703
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5704
|
+
style: {
|
|
5705
|
+
left: `${touchPosition.x}px`,
|
|
5706
|
+
top: `${touchPosition.y}px`,
|
|
5707
|
+
transform: "translate(-50%, -50%)"
|
|
5708
|
+
},
|
|
5709
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5710
|
+
(inputPart, index) => /* @__PURE__ */ jsx32(
|
|
5711
|
+
"span",
|
|
5712
|
+
{
|
|
5713
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5714
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-xl", children: /* @__PURE__ */ jsx32(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5715
|
+
},
|
|
5716
|
+
index
|
|
5717
|
+
)
|
|
5718
|
+
) }) }) }) : /* @__PURE__ */ jsx32("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx32(
|
|
5719
|
+
ShowMaterialMediaByContentType_default,
|
|
5720
|
+
{
|
|
5721
|
+
contentType: contentMap.type,
|
|
5722
|
+
src: draggedValue,
|
|
5723
|
+
canFullScreen: false
|
|
5724
|
+
},
|
|
5725
|
+
`${uniqueValue}-drag-touch`
|
|
5726
|
+
) })
|
|
5727
|
+
}
|
|
5728
|
+
),
|
|
5515
5729
|
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5516
|
-
/* @__PURE__ */
|
|
5730
|
+
/* @__PURE__ */ jsx32(
|
|
5517
5731
|
"div",
|
|
5518
5732
|
{
|
|
5519
5733
|
ref: itemsRef,
|
|
5520
5734
|
className: "flex-shrink-0 flex flex-row gap-x-4 gap-y-4 overflow-x-auto py-2",
|
|
5521
|
-
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */
|
|
5522
|
-
|
|
5735
|
+
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ jsx32(
|
|
5736
|
+
"div",
|
|
5523
5737
|
{
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5738
|
+
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5739
|
+
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5740
|
+
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5741
|
+
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5742
|
+
onTouchMove: handleTouchMove,
|
|
5743
|
+
onTouchEnd: handleTouchEnd,
|
|
5744
|
+
children: /* @__PURE__ */ jsx32(
|
|
5527
5745
|
"div",
|
|
5528
5746
|
{
|
|
5529
5747
|
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`,
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
setSelectedValue(materialValue);
|
|
5533
|
-
}
|
|
5534
|
-
},
|
|
5535
|
-
onTouchEnd: () => {
|
|
5536
|
-
if (checkCanAnswerQuestion()) {
|
|
5537
|
-
setSelectedValue(materialValue);
|
|
5538
|
-
}
|
|
5539
|
-
},
|
|
5540
|
-
onMouseUp: () => {
|
|
5541
|
-
if (checkCanAnswerQuestion()) {
|
|
5542
|
-
setSelectedValue(null);
|
|
5543
|
-
}
|
|
5544
|
-
},
|
|
5545
|
-
onTouchStart: () => {
|
|
5546
|
-
if (checkCanAnswerQuestion()) {
|
|
5547
|
-
setSelectedValue(null);
|
|
5548
|
-
}
|
|
5549
|
-
},
|
|
5550
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx34("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto px-4", children: /* @__PURE__ */ jsx34("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5748
|
+
onClick: () => handleSelectItem(materialValue),
|
|
5749
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto px-4", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5551
5750
|
materialValue
|
|
5552
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
5751
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx32(
|
|
5553
5752
|
"span",
|
|
5554
5753
|
{
|
|
5555
5754
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5556
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5755
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-xl", children: /* @__PURE__ */ jsx32(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5557
5756
|
},
|
|
5558
5757
|
index2
|
|
5559
|
-
)) }) }) : /* @__PURE__ */
|
|
5758
|
+
)) }) }) : /* @__PURE__ */ jsx32(
|
|
5560
5759
|
ShowMaterialMediaByContentType_default,
|
|
5561
5760
|
{
|
|
5562
5761
|
contentType: contentMap.type,
|
|
@@ -5566,97 +5765,75 @@ var MatchingActivityMaterialContent = ({
|
|
|
5566
5765
|
`${uniqueValue}-${index}`
|
|
5567
5766
|
)
|
|
5568
5767
|
}
|
|
5569
|
-
)
|
|
5570
|
-
moveCardHandler: () => {
|
|
5571
|
-
if (!selectedTargetKey) return;
|
|
5572
|
-
if (!selectedValue) return;
|
|
5573
|
-
handleMatchingActivityItemOnChange(
|
|
5574
|
-
selectedTargetKey,
|
|
5575
|
-
selectedValue
|
|
5576
|
-
);
|
|
5577
|
-
}
|
|
5768
|
+
)
|
|
5578
5769
|
},
|
|
5579
5770
|
index
|
|
5580
5771
|
))
|
|
5581
5772
|
}
|
|
5582
5773
|
),
|
|
5583
|
-
/* @__PURE__ */
|
|
5774
|
+
/* @__PURE__ */ jsx32("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx32(DividerLine_default, {}) })
|
|
5584
5775
|
] }) : null,
|
|
5585
|
-
/* @__PURE__ */
|
|
5776
|
+
/* @__PURE__ */ jsx32("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
|
|
5586
5777
|
const learnerAnswerState = checkAnswerState(
|
|
5587
5778
|
materialMap[answerMapKey],
|
|
5588
5779
|
answerMap[answerMapKey]
|
|
5589
5780
|
);
|
|
5590
5781
|
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-row w-full", children: [
|
|
5591
|
-
/* @__PURE__ */
|
|
5782
|
+
/* @__PURE__ */ jsx32("div", { className: "w-1/3", children: /* @__PURE__ */ jsx32(
|
|
5592
5783
|
"div",
|
|
5593
5784
|
{
|
|
5594
5785
|
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"}`,
|
|
5595
|
-
children: /* @__PURE__ */
|
|
5786
|
+
children: /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5596
5787
|
answerMapKey
|
|
5597
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
5788
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx32(
|
|
5598
5789
|
"span",
|
|
5599
5790
|
{
|
|
5600
5791
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5601
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5792
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-xl", children: /* @__PURE__ */ jsx32(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5602
5793
|
},
|
|
5603
5794
|
index2
|
|
5604
5795
|
)) }) })
|
|
5605
5796
|
}
|
|
5606
5797
|
) }),
|
|
5607
|
-
/* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5798
|
+
/* @__PURE__ */ jsx32("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5799
|
+
/* @__PURE__ */ jsx32("div", { className: "flex-1", children: /* @__PURE__ */ jsx32(
|
|
5609
5800
|
"div",
|
|
5610
5801
|
{
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
DroppableItem_default,
|
|
5802
|
+
"data-matching-drop-zone": answerMapKey,
|
|
5803
|
+
onMouseEnter: () => draggedValue && setDropTargetKey(answerMapKey),
|
|
5804
|
+
onMouseLeave: () => setDropTargetKey(null),
|
|
5805
|
+
onClick: () => handleDropZoneClick(answerMapKey),
|
|
5806
|
+
className: `${dropTargetKey === answerMapKey ? "bg-catchup-light-blue ring-2 ring-blue-400" : ""} ${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"}`,
|
|
5807
|
+
children: /* @__PURE__ */ jsx32(
|
|
5808
|
+
"div",
|
|
5619
5809
|
{
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
"div",
|
|
5627
|
-
{
|
|
5628
|
-
className: "h-full flex-1 flex flex-row items-center justify-center px-4",
|
|
5629
|
-
onClick: (e) => {
|
|
5630
|
-
e.preventDefault();
|
|
5631
|
-
if (checkCanAnswerQuestion()) {
|
|
5632
|
-
handleMatchingActivityItemOnChange(
|
|
5633
|
-
answerMapKey,
|
|
5634
|
-
null
|
|
5635
|
-
);
|
|
5636
|
-
}
|
|
5637
|
-
},
|
|
5638
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx34("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5639
|
-
answerMap[answerMapKey]
|
|
5640
|
-
).map((inputPart, index2) => /* @__PURE__ */ jsx34(
|
|
5641
|
-
"span",
|
|
5642
|
-
{
|
|
5643
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5644
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx34("span", { className: "text-xl", children: /* @__PURE__ */ jsx34(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5645
|
-
},
|
|
5646
|
-
index2
|
|
5647
|
-
)) }) : /* @__PURE__ */ jsx34(
|
|
5648
|
-
ShowMaterialMediaByContentType_default,
|
|
5649
|
-
{
|
|
5650
|
-
contentType: contentMap.type,
|
|
5651
|
-
src: answerMap[answerMapKey],
|
|
5652
|
-
canFullScreen: false
|
|
5653
|
-
},
|
|
5654
|
-
`${uniqueValue}-${index}`
|
|
5655
|
-
)
|
|
5810
|
+
className: "h-full flex-1 flex flex-row items-center justify-center px-4",
|
|
5811
|
+
onClick: (e) => {
|
|
5812
|
+
e.stopPropagation();
|
|
5813
|
+
if (checkCanAnswerQuestion() && answerMap[answerMapKey]) {
|
|
5814
|
+
onChange(answer, answerMapKey, null);
|
|
5815
|
+
setSelectedValue(null);
|
|
5656
5816
|
}
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5817
|
+
},
|
|
5818
|
+
children: answerMap[answerMapKey] ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5819
|
+
answerMap[answerMapKey]
|
|
5820
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx32(
|
|
5821
|
+
"span",
|
|
5822
|
+
{
|
|
5823
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5824
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx32("span", { className: "text-xl", children: /* @__PURE__ */ jsx32(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
5825
|
+
},
|
|
5826
|
+
index2
|
|
5827
|
+
)) }) : /* @__PURE__ */ jsx32(
|
|
5828
|
+
ShowMaterialMediaByContentType_default,
|
|
5829
|
+
{
|
|
5830
|
+
contentType: contentMap.type,
|
|
5831
|
+
src: answerMap[answerMapKey],
|
|
5832
|
+
canFullScreen: false
|
|
5833
|
+
},
|
|
5834
|
+
`${uniqueValue}-${index}`
|
|
5835
|
+
) : null
|
|
5836
|
+
}
|
|
5660
5837
|
)
|
|
5661
5838
|
}
|
|
5662
5839
|
) })
|
|
@@ -5667,7 +5844,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5667
5844
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
5668
5845
|
|
|
5669
5846
|
// src/components/activities/MatchingActivityContent.tsx
|
|
5670
|
-
import { Fragment as Fragment6, jsx as
|
|
5847
|
+
import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5671
5848
|
var MatchingActivityContent = ({
|
|
5672
5849
|
answer,
|
|
5673
5850
|
data,
|
|
@@ -5689,15 +5866,15 @@ var MatchingActivityContent = ({
|
|
|
5689
5866
|
changeAnswer(answer2);
|
|
5690
5867
|
};
|
|
5691
5868
|
return /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
5692
|
-
/* @__PURE__ */
|
|
5869
|
+
/* @__PURE__ */ jsx33(
|
|
5693
5870
|
ActivityBodyContent_default,
|
|
5694
5871
|
{
|
|
5695
5872
|
bodyMap: matchingBodyMap,
|
|
5696
5873
|
templateType: "MATCHING"
|
|
5697
5874
|
}
|
|
5698
5875
|
),
|
|
5699
|
-
/* @__PURE__ */
|
|
5700
|
-
/* @__PURE__ */
|
|
5876
|
+
/* @__PURE__ */ jsx33(DividerLine_default, {}),
|
|
5877
|
+
/* @__PURE__ */ jsx33(
|
|
5701
5878
|
MatchingActivityMaterialContent_default,
|
|
5702
5879
|
{
|
|
5703
5880
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5716,7 +5893,7 @@ var MatchingActivityContent_default = MatchingActivityContent;
|
|
|
5716
5893
|
|
|
5717
5894
|
// src/components/activities/material-contents/MCMAActivityMaterialContent.tsx
|
|
5718
5895
|
import { InlineMath as InlineMath7 } from "react-katex";
|
|
5719
|
-
import { jsx as
|
|
5896
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5720
5897
|
var MCMAActivityMaterialContent = ({
|
|
5721
5898
|
uniqueValue,
|
|
5722
5899
|
answer,
|
|
@@ -5749,10 +5926,10 @@ var MCMAActivityMaterialContent = ({
|
|
|
5749
5926
|
const answerMap = retrieveAnswerMap();
|
|
5750
5927
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
5751
5928
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5752
|
-
return /* @__PURE__ */
|
|
5753
|
-
/* @__PURE__ */
|
|
5754
|
-
/* @__PURE__ */
|
|
5755
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
5929
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ jsxs23("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0", children: [
|
|
5930
|
+
/* @__PURE__ */ jsx34("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx34("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
5931
|
+
/* @__PURE__ */ jsx34("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx34(DividerLine_default, {}) }),
|
|
5932
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx34("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
5756
5933
|
(materialSubKey, index2) => {
|
|
5757
5934
|
const foundAnswer = answerMap[materialKey].find(
|
|
5758
5935
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -5773,7 +5950,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5773
5950
|
onChange(answer, materialKey, materialSubKey);
|
|
5774
5951
|
},
|
|
5775
5952
|
children: [
|
|
5776
|
-
/* @__PURE__ */
|
|
5953
|
+
/* @__PURE__ */ jsx34(
|
|
5777
5954
|
BaseImage_default,
|
|
5778
5955
|
{
|
|
5779
5956
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -5783,16 +5960,16 @@ var MCMAActivityMaterialContent = ({
|
|
|
5783
5960
|
}
|
|
5784
5961
|
}
|
|
5785
5962
|
),
|
|
5786
|
-
/* @__PURE__ */
|
|
5963
|
+
/* @__PURE__ */ jsx34("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx34("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5787
5964
|
materialSubKey
|
|
5788
|
-
).map((inputPart, index3) => /* @__PURE__ */
|
|
5965
|
+
).map((inputPart, index3) => /* @__PURE__ */ jsx34(
|
|
5789
5966
|
"span",
|
|
5790
5967
|
{
|
|
5791
5968
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5792
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5969
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx34("span", { className: "text-xl", children: /* @__PURE__ */ jsx34(InlineMath7, { math: inputPart.value }) }) : inputPart.value
|
|
5793
5970
|
},
|
|
5794
5971
|
index3
|
|
5795
|
-
)) }) : /* @__PURE__ */
|
|
5972
|
+
)) }) : /* @__PURE__ */ jsx34(
|
|
5796
5973
|
ShowMaterialMediaByContentType_default,
|
|
5797
5974
|
{
|
|
5798
5975
|
contentType: contentMap.type,
|
|
@@ -5806,13 +5983,13 @@ var MCMAActivityMaterialContent = ({
|
|
|
5806
5983
|
index2
|
|
5807
5984
|
);
|
|
5808
5985
|
}
|
|
5809
|
-
) }) : /* @__PURE__ */
|
|
5986
|
+
) }) : /* @__PURE__ */ jsx34("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
5810
5987
|
answerMap[materialKey]
|
|
5811
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
5988
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx34(
|
|
5812
5989
|
"span",
|
|
5813
5990
|
{
|
|
5814
5991
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5815
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5992
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx34("span", { className: "text-xl", children: /* @__PURE__ */ jsx34(InlineMath7, { math: inputPart.value }) }) : inputPart.value
|
|
5816
5993
|
},
|
|
5817
5994
|
index2
|
|
5818
5995
|
)) }, materialKey)
|
|
@@ -5822,7 +5999,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5822
5999
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
5823
6000
|
|
|
5824
6001
|
// src/components/activities/MCMAActivityContent.tsx
|
|
5825
|
-
import { jsx as
|
|
6002
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5826
6003
|
var MCMAActivityContent = ({
|
|
5827
6004
|
answer,
|
|
5828
6005
|
data,
|
|
@@ -5851,10 +6028,10 @@ var MCMAActivityContent = ({
|
|
|
5851
6028
|
changeAnswer(answer2);
|
|
5852
6029
|
};
|
|
5853
6030
|
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-row flex-wrap", children: [
|
|
5854
|
-
/* @__PURE__ */
|
|
5855
|
-
/* @__PURE__ */
|
|
5856
|
-
/* @__PURE__ */
|
|
5857
|
-
/* @__PURE__ */
|
|
6031
|
+
/* @__PURE__ */ jsx35("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ jsx35(ActivityBodyContent_default, { bodyMap: MCMABodyMap, templateType: "MCMA" }) }),
|
|
6032
|
+
/* @__PURE__ */ jsx35("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx35(DividerLine_default, {}) }),
|
|
6033
|
+
/* @__PURE__ */ jsx35("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx35(VerticalDividerLine_default, {}) }),
|
|
6034
|
+
/* @__PURE__ */ jsx35("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx35(
|
|
5858
6035
|
MCMAActivityMaterialContent_default,
|
|
5859
6036
|
{
|
|
5860
6037
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5872,7 +6049,7 @@ var MCMAActivityContent_default = MCMAActivityContent;
|
|
|
5872
6049
|
|
|
5873
6050
|
// src/components/activities/material-contents/MCSAActivityMaterialContent.tsx
|
|
5874
6051
|
import { InlineMath as InlineMath8 } from "react-katex";
|
|
5875
|
-
import { jsx as
|
|
6052
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5876
6053
|
var MCSAActivityMaterialContent = ({
|
|
5877
6054
|
uniqueValue,
|
|
5878
6055
|
answer,
|
|
@@ -5902,10 +6079,10 @@ var MCSAActivityMaterialContent = ({
|
|
|
5902
6079
|
const answerMap = retrieveAnswerMap();
|
|
5903
6080
|
const correctAnswer = retrieveCorrectAnswer();
|
|
5904
6081
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5905
|
-
return /* @__PURE__ */
|
|
5906
|
-
/* @__PURE__ */
|
|
5907
|
-
/* @__PURE__ */
|
|
5908
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
6082
|
+
return /* @__PURE__ */ jsx36("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ jsxs25("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0", children: [
|
|
6083
|
+
/* @__PURE__ */ jsx36("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx36("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6084
|
+
/* @__PURE__ */ jsx36("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx36(DividerLine_default, {}) }),
|
|
6085
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx36(
|
|
5909
6086
|
"div",
|
|
5910
6087
|
{
|
|
5911
6088
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -5924,7 +6101,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5924
6101
|
onChange(answer, materialKey, materialSubKey);
|
|
5925
6102
|
},
|
|
5926
6103
|
children: [
|
|
5927
|
-
/* @__PURE__ */
|
|
6104
|
+
/* @__PURE__ */ jsx36(
|
|
5928
6105
|
BaseImage_default,
|
|
5929
6106
|
{
|
|
5930
6107
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -5934,16 +6111,16 @@ var MCSAActivityMaterialContent = ({
|
|
|
5934
6111
|
}
|
|
5935
6112
|
}
|
|
5936
6113
|
),
|
|
5937
|
-
/* @__PURE__ */
|
|
6114
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx36("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5938
6115
|
materialSubKey
|
|
5939
|
-
).map((inputPart, index3) => /* @__PURE__ */
|
|
6116
|
+
).map((inputPart, index3) => /* @__PURE__ */ jsx36(
|
|
5940
6117
|
"span",
|
|
5941
6118
|
{
|
|
5942
6119
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5943
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
6120
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx36("span", { className: "text-xl", children: /* @__PURE__ */ jsx36(InlineMath8, { math: inputPart.value }) }) : inputPart.value
|
|
5944
6121
|
},
|
|
5945
6122
|
index3
|
|
5946
|
-
)) }) : /* @__PURE__ */
|
|
6123
|
+
)) }) : /* @__PURE__ */ jsx36(
|
|
5947
6124
|
ShowMaterialMediaByContentType_default,
|
|
5948
6125
|
{
|
|
5949
6126
|
contentType: contentMap.type,
|
|
@@ -5959,13 +6136,13 @@ var MCSAActivityMaterialContent = ({
|
|
|
5959
6136
|
}
|
|
5960
6137
|
)
|
|
5961
6138
|
}
|
|
5962
|
-
) : /* @__PURE__ */
|
|
6139
|
+
) : /* @__PURE__ */ jsx36("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5963
6140
|
answerMap[materialKey]
|
|
5964
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
6141
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx36(
|
|
5965
6142
|
"span",
|
|
5966
6143
|
{
|
|
5967
6144
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5968
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
6145
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx36("span", { className: "text-xl", children: /* @__PURE__ */ jsx36(InlineMath8, { math: inputPart.value }) }) : inputPart.value
|
|
5969
6146
|
},
|
|
5970
6147
|
index2
|
|
5971
6148
|
)) })
|
|
@@ -5975,7 +6152,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5975
6152
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
5976
6153
|
|
|
5977
6154
|
// src/components/activities/MCSAActivityContent.tsx
|
|
5978
|
-
import { jsx as
|
|
6155
|
+
import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5979
6156
|
var MCSAActivityContent = ({
|
|
5980
6157
|
answer,
|
|
5981
6158
|
data,
|
|
@@ -5997,10 +6174,10 @@ var MCSAActivityContent = ({
|
|
|
5997
6174
|
changeAnswer(answer2);
|
|
5998
6175
|
};
|
|
5999
6176
|
return /* @__PURE__ */ jsxs26("div", { className: "flex flex-row flex-wrap", children: [
|
|
6000
|
-
/* @__PURE__ */
|
|
6001
|
-
/* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6177
|
+
/* @__PURE__ */ jsx37("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ jsx37(ActivityBodyContent_default, { bodyMap: MCSABodyMap, templateType: "MCSA" }) }),
|
|
6178
|
+
/* @__PURE__ */ jsx37("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
|
|
6179
|
+
/* @__PURE__ */ jsx37("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx37(VerticalDividerLine_default, {}) }),
|
|
6180
|
+
/* @__PURE__ */ jsx37("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx37(
|
|
6004
6181
|
MCSAActivityMaterialContent_default,
|
|
6005
6182
|
{
|
|
6006
6183
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6045,7 +6222,7 @@ var retrieveDocumentTypeFromExtension = (format) => {
|
|
|
6045
6222
|
};
|
|
6046
6223
|
|
|
6047
6224
|
// src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx
|
|
6048
|
-
import { Fragment as Fragment7, jsx as
|
|
6225
|
+
import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6049
6226
|
var OpenEndedActivityMaterialContent = ({
|
|
6050
6227
|
answer,
|
|
6051
6228
|
contentMap,
|
|
@@ -6075,7 +6252,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6075
6252
|
documentType = retrieveDocumentTypeFromExtension(extension);
|
|
6076
6253
|
}
|
|
6077
6254
|
if (documentType === "IMAGE") {
|
|
6078
|
-
return /* @__PURE__ */
|
|
6255
|
+
return /* @__PURE__ */ jsx38("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ jsx38(
|
|
6079
6256
|
BaseImage_default,
|
|
6080
6257
|
{
|
|
6081
6258
|
src: answerMapAnswer,
|
|
@@ -6085,9 +6262,9 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6085
6262
|
}
|
|
6086
6263
|
) });
|
|
6087
6264
|
} else if (documentType === "PDF") {
|
|
6088
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ jsx38(BasePDF_default, { file: answerMapAnswer });
|
|
6089
6266
|
} else if (documentType === "AUDIO") {
|
|
6090
|
-
return /* @__PURE__ */
|
|
6267
|
+
return /* @__PURE__ */ jsx38("div", { className: "h-[56px]", children: /* @__PURE__ */ jsx38(
|
|
6091
6268
|
"audio",
|
|
6092
6269
|
{
|
|
6093
6270
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6098,7 +6275,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6098
6275
|
}
|
|
6099
6276
|
) });
|
|
6100
6277
|
} else if (documentType === "TEXT") {
|
|
6101
|
-
return /* @__PURE__ */
|
|
6278
|
+
return /* @__PURE__ */ jsx38(
|
|
6102
6279
|
InputGroup_default,
|
|
6103
6280
|
{
|
|
6104
6281
|
type: "textarea",
|
|
@@ -6117,7 +6294,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6117
6294
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6118
6295
|
const extension = answerMapAnswer.split(".").pop();
|
|
6119
6296
|
const documentType = retrieveDocumentTypeFromExtension(extension);
|
|
6120
|
-
return /* @__PURE__ */
|
|
6297
|
+
return /* @__PURE__ */ jsx38(Fragment7, { children: documentType === "IMAGE" ? /* @__PURE__ */ jsx38("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ jsx38(
|
|
6121
6298
|
BaseImage_default,
|
|
6122
6299
|
{
|
|
6123
6300
|
src: answerMapAnswer,
|
|
@@ -6125,11 +6302,11 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6125
6302
|
size: "custom",
|
|
6126
6303
|
className: "w-[80%] rounded-catchup-xlarge"
|
|
6127
6304
|
}
|
|
6128
|
-
) }) : documentType === "PDF" ? /* @__PURE__ */
|
|
6305
|
+
) }) : documentType === "PDF" ? /* @__PURE__ */ jsx38("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ jsx38(BasePDF_default, { file: answerMapAnswer }) }) : null });
|
|
6129
6306
|
};
|
|
6130
6307
|
const RenderAudioContent = (answerMap2) => {
|
|
6131
6308
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6132
|
-
return /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ jsx38("div", { className: "h-[56px]", children: /* @__PURE__ */ jsx38(
|
|
6133
6310
|
"audio",
|
|
6134
6311
|
{
|
|
6135
6312
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6141,16 +6318,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6141
6318
|
) });
|
|
6142
6319
|
};
|
|
6143
6320
|
const answerMap = retrieveAnswerMap();
|
|
6144
|
-
return /* @__PURE__ */
|
|
6145
|
-
/* @__PURE__ */
|
|
6146
|
-
/* @__PURE__ */
|
|
6321
|
+
return /* @__PURE__ */ jsx38(Fragment7, { children: /* @__PURE__ */ jsxs27("div", { className: "", children: [
|
|
6322
|
+
/* @__PURE__ */ jsx38("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx38("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6323
|
+
/* @__PURE__ */ jsx38("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx38(DividerLine_default, {}) }),
|
|
6147
6324
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null
|
|
6148
6325
|
] }) });
|
|
6149
6326
|
};
|
|
6150
6327
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
6151
6328
|
|
|
6152
6329
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
6153
|
-
import { Fragment as Fragment8, jsx as
|
|
6330
|
+
import { Fragment as Fragment8, jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6154
6331
|
var OpenEndedActivityContent = ({
|
|
6155
6332
|
answer,
|
|
6156
6333
|
data,
|
|
@@ -6172,11 +6349,11 @@ var OpenEndedActivityContent = ({
|
|
|
6172
6349
|
changeAnswer(answer2);
|
|
6173
6350
|
};
|
|
6174
6351
|
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-row flex-wrap", children: [
|
|
6175
|
-
/* @__PURE__ */
|
|
6352
|
+
/* @__PURE__ */ jsx39(
|
|
6176
6353
|
"div",
|
|
6177
6354
|
{
|
|
6178
6355
|
className: `${showMaterialContent ? isFullScreen ? "w-full" : "w-full md:w-[40%]" : "w-full"}`,
|
|
6179
|
-
children: /* @__PURE__ */
|
|
6356
|
+
children: /* @__PURE__ */ jsx39(
|
|
6180
6357
|
ActivityBodyContent_default,
|
|
6181
6358
|
{
|
|
6182
6359
|
bodyMap: openEndedBodyMap,
|
|
@@ -6186,15 +6363,15 @@ var OpenEndedActivityContent = ({
|
|
|
6186
6363
|
}
|
|
6187
6364
|
),
|
|
6188
6365
|
showMaterialContent ? /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
6189
|
-
/* @__PURE__ */
|
|
6366
|
+
/* @__PURE__ */ jsx39(
|
|
6190
6367
|
"div",
|
|
6191
6368
|
{
|
|
6192
6369
|
className: `${isFullScreen ? "contents" : "contents md:hidden"}`,
|
|
6193
|
-
children: /* @__PURE__ */
|
|
6370
|
+
children: /* @__PURE__ */ jsx39(DividerLine_default, {})
|
|
6194
6371
|
}
|
|
6195
6372
|
),
|
|
6196
|
-
/* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6373
|
+
/* @__PURE__ */ jsx39("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx39(VerticalDividerLine_default, {}) }),
|
|
6374
|
+
/* @__PURE__ */ jsx39("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx39(
|
|
6198
6375
|
OpenEndedActivityMaterialContent_default,
|
|
6199
6376
|
{
|
|
6200
6377
|
answer,
|
|
@@ -6209,7 +6386,7 @@ var OpenEndedActivityContent = ({
|
|
|
6209
6386
|
var OpenEndedActivityContent_default = OpenEndedActivityContent;
|
|
6210
6387
|
|
|
6211
6388
|
// src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
|
|
6212
|
-
import { useEffect as useEffect13, useState as useState22, useRef as
|
|
6389
|
+
import { useEffect as useEffect13, useState as useState22, useRef as useRef7 } from "react";
|
|
6213
6390
|
import { InlineMath as InlineMath9 } from "react-katex";
|
|
6214
6391
|
|
|
6215
6392
|
// src/hooks/useScreenSize.ts
|
|
@@ -6248,7 +6425,7 @@ var useScreenSize = () => {
|
|
|
6248
6425
|
var useScreenSize_default = useScreenSize;
|
|
6249
6426
|
|
|
6250
6427
|
// src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
|
|
6251
|
-
import { jsx as
|
|
6428
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6252
6429
|
var OrderingActivityMaterialContent = ({
|
|
6253
6430
|
uniqueValue,
|
|
6254
6431
|
answer,
|
|
@@ -6265,7 +6442,11 @@ var OrderingActivityMaterialContent = ({
|
|
|
6265
6442
|
const [draggedElement, setDraggedElement] = useState22(
|
|
6266
6443
|
null
|
|
6267
6444
|
);
|
|
6268
|
-
const dragElementRef =
|
|
6445
|
+
const dragElementRef = useRef7(null);
|
|
6446
|
+
const [mousePosition, setMousePosition] = useState22({
|
|
6447
|
+
x: 0,
|
|
6448
|
+
y: 0
|
|
6449
|
+
});
|
|
6269
6450
|
const [touchPosition, setTouchPosition] = useState22({
|
|
6270
6451
|
x: 0,
|
|
6271
6452
|
y: 0
|
|
@@ -6327,6 +6508,19 @@ var OrderingActivityMaterialContent = ({
|
|
|
6327
6508
|
e.preventDefault();
|
|
6328
6509
|
setDraggedKey(materialKey);
|
|
6329
6510
|
setSelectedKey(null);
|
|
6511
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
6512
|
+
};
|
|
6513
|
+
const handleMouseMove = (e) => {
|
|
6514
|
+
if (!draggedKey) return;
|
|
6515
|
+
setMousePosition({ x: e.clientX, y: e.clientY });
|
|
6516
|
+
const elementUnder = document.elementFromPoint(e.clientX, e.clientY);
|
|
6517
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-ordering-drop-zone]");
|
|
6518
|
+
if (dropZone) {
|
|
6519
|
+
const dropKey = dropZone.getAttribute("data-ordering-drop-zone");
|
|
6520
|
+
setDropTargetKey(dropKey);
|
|
6521
|
+
} else {
|
|
6522
|
+
setDropTargetKey(null);
|
|
6523
|
+
}
|
|
6330
6524
|
};
|
|
6331
6525
|
const handleMouseUp = () => {
|
|
6332
6526
|
if (dropTargetKey !== null && draggedKey !== null && dropTargetKey !== draggedKey) {
|
|
@@ -6334,6 +6528,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6334
6528
|
}
|
|
6335
6529
|
setDraggedKey(null);
|
|
6336
6530
|
setDropTargetKey(null);
|
|
6531
|
+
setMousePosition({ x: 0, y: 0 });
|
|
6337
6532
|
};
|
|
6338
6533
|
const handleTouchStart = (e, materialKey, element) => {
|
|
6339
6534
|
if (!checkCanAnswerQuestion()) return;
|
|
@@ -6366,6 +6561,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6366
6561
|
setDraggedKey(null);
|
|
6367
6562
|
setDropTargetKey(null);
|
|
6368
6563
|
setDraggedElement(null);
|
|
6564
|
+
setTouchPosition({ x: 0, y: 0 });
|
|
6369
6565
|
};
|
|
6370
6566
|
const handleSelectItem = (materialKey) => {
|
|
6371
6567
|
if (!checkCanAnswerQuestion()) return;
|
|
@@ -6380,105 +6576,142 @@ var OrderingActivityMaterialContent = ({
|
|
|
6380
6576
|
setDraggedKey(null);
|
|
6381
6577
|
};
|
|
6382
6578
|
const answerMap = retrieveAnswerMap();
|
|
6383
|
-
return /* @__PURE__ */ jsxs29(
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
},
|
|
6393
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx42("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx42("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6394
|
-
materialMap[answerMap[draggedKey]]
|
|
6395
|
-
).map((inputPart, index) => /* @__PURE__ */ jsx42(
|
|
6396
|
-
"span",
|
|
6579
|
+
return /* @__PURE__ */ jsxs29(
|
|
6580
|
+
"div",
|
|
6581
|
+
{
|
|
6582
|
+
className: "flex flex-row flex-wrap",
|
|
6583
|
+
onMouseMove: handleMouseMove,
|
|
6584
|
+
onMouseUp: handleMouseUp,
|
|
6585
|
+
children: [
|
|
6586
|
+
draggedKey && mousePosition.x > 0 && /* @__PURE__ */ jsx40(
|
|
6587
|
+
"div",
|
|
6397
6588
|
{
|
|
6398
|
-
className:
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6589
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
6590
|
+
style: {
|
|
6591
|
+
left: `${mousePosition.x}px`,
|
|
6592
|
+
top: `${mousePosition.y}px`,
|
|
6593
|
+
transform: "translate(-50%, -50%)"
|
|
6594
|
+
},
|
|
6595
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx40("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx40("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6596
|
+
materialMap[answerMap[draggedKey]]
|
|
6597
|
+
).map((inputPart, index) => /* @__PURE__ */ jsx40(
|
|
6598
|
+
"span",
|
|
6599
|
+
{
|
|
6600
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6601
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx40("span", { className: "text-xl", children: /* @__PURE__ */ jsx40(InlineMath9, { math: inputPart.value }) }) : inputPart.value
|
|
6602
|
+
},
|
|
6603
|
+
index
|
|
6604
|
+
)) }) }) : /* @__PURE__ */ jsx40("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx40(
|
|
6605
|
+
ShowMaterialMediaByContentType_default,
|
|
6606
|
+
{
|
|
6607
|
+
contentType: contentMap.type,
|
|
6608
|
+
src: materialMap[answerMap[draggedKey]],
|
|
6609
|
+
canFullScreen: false
|
|
6610
|
+
},
|
|
6611
|
+
`${uniqueValue}-drag-mouse`
|
|
6612
|
+
) })
|
|
6613
|
+
}
|
|
6614
|
+
),
|
|
6615
|
+
draggedKey && touchPosition.x > 0 && /* @__PURE__ */ jsx40(
|
|
6616
|
+
"div",
|
|
6404
6617
|
{
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
answerMap[materialKey] + "",
|
|
6416
|
-
index + ""
|
|
6417
|
-
);
|
|
6418
|
-
return /* @__PURE__ */ jsx42("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ jsxs29(
|
|
6419
|
-
"div",
|
|
6420
|
-
{
|
|
6421
|
-
className: `flex flex-row items-center my-4 mx-2`,
|
|
6422
|
-
style: {
|
|
6423
|
-
marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
|
|
6424
|
-
},
|
|
6425
|
-
children: [
|
|
6426
|
-
/* @__PURE__ */ jsx42("div", { className: "mr-3", children: /* @__PURE__ */ jsx42("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__ */ jsx42(
|
|
6427
|
-
"div",
|
|
6618
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
6619
|
+
style: {
|
|
6620
|
+
left: `${touchPosition.x}px`,
|
|
6621
|
+
top: `${touchPosition.y}px`,
|
|
6622
|
+
transform: "translate(-50%, -50%)"
|
|
6623
|
+
},
|
|
6624
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx40("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx40("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6625
|
+
materialMap[answerMap[draggedKey]]
|
|
6626
|
+
).map((inputPart, index) => /* @__PURE__ */ jsx40(
|
|
6627
|
+
"span",
|
|
6428
6628
|
{
|
|
6429
|
-
className: `${
|
|
6430
|
-
children: /* @__PURE__ */
|
|
6431
|
-
}
|
|
6432
|
-
|
|
6433
|
-
/* @__PURE__ */
|
|
6434
|
-
|
|
6629
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6630
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx40("span", { className: "text-xl", children: /* @__PURE__ */ jsx40(InlineMath9, { math: inputPart.value }) }) : inputPart.value
|
|
6631
|
+
},
|
|
6632
|
+
index
|
|
6633
|
+
)) }) }) : /* @__PURE__ */ jsx40("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ jsx40(
|
|
6634
|
+
ShowMaterialMediaByContentType_default,
|
|
6435
6635
|
{
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6636
|
+
contentType: contentMap.type,
|
|
6637
|
+
src: materialMap[answerMap[draggedKey]],
|
|
6638
|
+
canFullScreen: false
|
|
6639
|
+
},
|
|
6640
|
+
`${uniqueValue}-drag-touch`
|
|
6641
|
+
) })
|
|
6642
|
+
}
|
|
6643
|
+
),
|
|
6644
|
+
Object.keys(answerMap).map((materialKey, index) => {
|
|
6645
|
+
const learnerAnswerState = checkAnswerState(
|
|
6646
|
+
answerMap[materialKey] + "",
|
|
6647
|
+
index + ""
|
|
6648
|
+
);
|
|
6649
|
+
return /* @__PURE__ */ jsx40("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ jsxs29(
|
|
6650
|
+
"div",
|
|
6651
|
+
{
|
|
6652
|
+
className: `flex flex-row items-center my-4 mx-2`,
|
|
6653
|
+
style: {
|
|
6654
|
+
marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
|
|
6655
|
+
},
|
|
6656
|
+
children: [
|
|
6657
|
+
/* @__PURE__ */ jsx40("div", { className: "mr-3", children: /* @__PURE__ */ jsx40("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__ */ jsx40(
|
|
6446
6658
|
"div",
|
|
6447
6659
|
{
|
|
6448
|
-
className: `${
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6660
|
+
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]`,
|
|
6661
|
+
children: /* @__PURE__ */ jsx40("p", { className: "", children: parseFloat(materialKey) + 1 })
|
|
6662
|
+
}
|
|
6663
|
+
) }) }),
|
|
6664
|
+
/* @__PURE__ */ jsx40(
|
|
6665
|
+
"div",
|
|
6666
|
+
{
|
|
6667
|
+
ref: draggedKey === materialKey ? dragElementRef : null,
|
|
6668
|
+
"data-ordering-drop-zone": materialKey,
|
|
6669
|
+
className: `flex-1 ${draggedKey === materialKey ? "opacity-40" : selectedKey === materialKey ? "ring-2 ring-blue-500" : "opacity-100"} ${dropTargetKey === materialKey && draggedKey !== materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200`,
|
|
6670
|
+
onMouseDown: (e) => handleMouseDown(e, materialKey),
|
|
6671
|
+
onMouseEnter: () => draggedKey && draggedKey !== materialKey && setDropTargetKey(materialKey),
|
|
6672
|
+
onMouseLeave: () => setDropTargetKey(null),
|
|
6673
|
+
onTouchStart: (e) => handleTouchStart(e, materialKey, e.currentTarget),
|
|
6674
|
+
onTouchMove: handleTouchMove,
|
|
6675
|
+
onTouchEnd: handleTouchEnd,
|
|
6676
|
+
children: /* @__PURE__ */ jsx40(
|
|
6677
|
+
"div",
|
|
6461
6678
|
{
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6679
|
+
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 cursor-pointer p-3 ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
6680
|
+
onClick: () => handleSelectItem(materialKey),
|
|
6681
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx40("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6682
|
+
materialMap[answerMap[materialKey]]
|
|
6683
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx40(
|
|
6684
|
+
"span",
|
|
6685
|
+
{
|
|
6686
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6687
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx40("span", { className: "text-xl", children: /* @__PURE__ */ jsx40(InlineMath9, { math: inputPart.value }) }) : inputPart.value
|
|
6688
|
+
},
|
|
6689
|
+
index2
|
|
6690
|
+
)) }) : /* @__PURE__ */ jsx40(
|
|
6691
|
+
ShowMaterialMediaByContentType_default,
|
|
6692
|
+
{
|
|
6693
|
+
contentType: contentMap.type,
|
|
6694
|
+
src: materialMap[answerMap[materialKey]],
|
|
6695
|
+
canFullScreen: true
|
|
6696
|
+
},
|
|
6697
|
+
`${uniqueValue}-${index}`
|
|
6698
|
+
)
|
|
6699
|
+
}
|
|
6467
6700
|
)
|
|
6468
6701
|
}
|
|
6469
6702
|
)
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
}
|
|
6474
|
-
|
|
6475
|
-
}
|
|
6476
|
-
|
|
6703
|
+
]
|
|
6704
|
+
}
|
|
6705
|
+
) }, index);
|
|
6706
|
+
})
|
|
6707
|
+
]
|
|
6708
|
+
}
|
|
6709
|
+
);
|
|
6477
6710
|
};
|
|
6478
6711
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6479
6712
|
|
|
6480
6713
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6481
|
-
import { Fragment as Fragment9, jsx as
|
|
6714
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6482
6715
|
var OrderingActivityContent = ({
|
|
6483
6716
|
answer,
|
|
6484
6717
|
data,
|
|
@@ -6503,15 +6736,15 @@ var OrderingActivityContent = ({
|
|
|
6503
6736
|
changeAnswer(answer2);
|
|
6504
6737
|
};
|
|
6505
6738
|
return /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
6506
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx41(
|
|
6507
6740
|
ActivityBodyContent_default,
|
|
6508
6741
|
{
|
|
6509
6742
|
bodyMap: orderingBodyMap,
|
|
6510
6743
|
templateType: "ORDERING"
|
|
6511
6744
|
}
|
|
6512
6745
|
),
|
|
6513
|
-
/* @__PURE__ */
|
|
6514
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx41(DividerLine_default, {}),
|
|
6747
|
+
/* @__PURE__ */ jsx41(
|
|
6515
6748
|
OrderingActivityMaterialContent_default,
|
|
6516
6749
|
{
|
|
6517
6750
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6531,7 +6764,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
|
|
|
6531
6764
|
// src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
|
|
6532
6765
|
import { useEffect as useEffect14, useState as useState23 } from "react";
|
|
6533
6766
|
import { InlineMath as InlineMath10 } from "react-katex";
|
|
6534
|
-
import { Fragment as Fragment10, jsx as
|
|
6767
|
+
import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6535
6768
|
var TrueFalseActivityMaterialContent = ({
|
|
6536
6769
|
uniqueValue,
|
|
6537
6770
|
answer,
|
|
@@ -6585,13 +6818,13 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6585
6818
|
};
|
|
6586
6819
|
const answerMap = retrieveAnswerMap();
|
|
6587
6820
|
return /* @__PURE__ */ jsxs31("div", { className: "", children: [
|
|
6588
|
-
/* @__PURE__ */
|
|
6589
|
-
/* @__PURE__ */
|
|
6821
|
+
/* @__PURE__ */ jsx42("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx42("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
6822
|
+
/* @__PURE__ */ jsx42("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx42(DividerLine_default, {}) }),
|
|
6590
6823
|
/* @__PURE__ */ jsxs31("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
6591
|
-
/* @__PURE__ */
|
|
6592
|
-
/* @__PURE__ */
|
|
6824
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
6825
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
6593
6826
|
] }),
|
|
6594
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
6827
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx42("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
6595
6828
|
const correctAnswer = materialMap.trueList.find(
|
|
6596
6829
|
(trueItem) => trueItem === shuffleOption
|
|
6597
6830
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -6607,16 +6840,16 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6607
6840
|
{
|
|
6608
6841
|
className: `w-full flex flex-row items-center justify-center cursor-pointer my-2 ${learnerAnswerState === "CORRECT" ? "border-2 border-catchup-green rounded-catchup-xlarge p-2" : learnerAnswerState === "INCORRECT" ? "border-2 border-catchup-red rounded-catchup-xlarge p-2" : ""}`,
|
|
6609
6842
|
children: [
|
|
6610
|
-
/* @__PURE__ */
|
|
6843
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx42("p", { className: "text-xl p-2 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6611
6844
|
shuffleOption
|
|
6612
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
6845
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx42(
|
|
6613
6846
|
"span",
|
|
6614
6847
|
{
|
|
6615
6848
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6616
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
6849
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx42("span", { className: "text-xl", children: /* @__PURE__ */ jsx42(InlineMath10, { math: inputPart.value }) }) : inputPart.value
|
|
6617
6850
|
},
|
|
6618
6851
|
index2
|
|
6619
|
-
)) }) : /* @__PURE__ */
|
|
6852
|
+
)) }) : /* @__PURE__ */ jsx42(
|
|
6620
6853
|
ShowMaterialMediaByContentType_default,
|
|
6621
6854
|
{
|
|
6622
6855
|
contentType: contentMap.type,
|
|
@@ -6626,7 +6859,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6626
6859
|
`${uniqueValue}-${index}`
|
|
6627
6860
|
) }),
|
|
6628
6861
|
/* @__PURE__ */ jsxs31("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6629
|
-
/* @__PURE__ */
|
|
6862
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ jsx42(
|
|
6630
6863
|
BaseImage_default,
|
|
6631
6864
|
{
|
|
6632
6865
|
src: answerMap.trueList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6637,7 +6870,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6637
6870
|
}
|
|
6638
6871
|
}
|
|
6639
6872
|
) }) }),
|
|
6640
|
-
/* @__PURE__ */
|
|
6873
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ jsx42(
|
|
6641
6874
|
BaseImage_default,
|
|
6642
6875
|
{
|
|
6643
6876
|
src: answerMap.falseList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6655,12 +6888,12 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6655
6888
|
);
|
|
6656
6889
|
}) }) : /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
6657
6890
|
answerMap.trueList.map((item) => /* @__PURE__ */ jsxs31("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6658
|
-
/* @__PURE__ */
|
|
6659
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: item }) }),
|
|
6892
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
6660
6893
|
] })),
|
|
6661
6894
|
answerMap.falseList.map((item) => /* @__PURE__ */ jsxs31("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6662
|
-
/* @__PURE__ */
|
|
6663
|
-
/* @__PURE__ */
|
|
6895
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: item }) }),
|
|
6896
|
+
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
6664
6897
|
] }))
|
|
6665
6898
|
] })
|
|
6666
6899
|
] });
|
|
@@ -6668,7 +6901,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6668
6901
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
6669
6902
|
|
|
6670
6903
|
// src/components/activities/TrueFalseActivityContent.tsx
|
|
6671
|
-
import { jsx as
|
|
6904
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6672
6905
|
var TrueFalseActivityContent = ({
|
|
6673
6906
|
answer,
|
|
6674
6907
|
data,
|
|
@@ -6720,16 +6953,16 @@ var TrueFalseActivityContent = ({
|
|
|
6720
6953
|
changeAnswer(answer2);
|
|
6721
6954
|
};
|
|
6722
6955
|
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-row flex-wrap", children: [
|
|
6723
|
-
/* @__PURE__ */
|
|
6956
|
+
/* @__PURE__ */ jsx43("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ jsx43(
|
|
6724
6957
|
ActivityBodyContent_default,
|
|
6725
6958
|
{
|
|
6726
6959
|
bodyMap: trueFalseBodyMap,
|
|
6727
6960
|
templateType: "GROUPING"
|
|
6728
6961
|
}
|
|
6729
6962
|
) }),
|
|
6730
|
-
/* @__PURE__ */
|
|
6731
|
-
/* @__PURE__ */
|
|
6732
|
-
/* @__PURE__ */
|
|
6963
|
+
/* @__PURE__ */ jsx43("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx43(DividerLine_default, {}) }),
|
|
6964
|
+
/* @__PURE__ */ jsx43("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx43(VerticalDividerLine_default, {}) }),
|
|
6965
|
+
/* @__PURE__ */ jsx43("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx43(
|
|
6733
6966
|
TrueFalseActivityMaterialContent_default,
|
|
6734
6967
|
{
|
|
6735
6968
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6748,7 +6981,7 @@ var TrueFalseActivityContent_default = TrueFalseActivityContent;
|
|
|
6748
6981
|
|
|
6749
6982
|
// src/components/activities/solution-contents/ActivitySolutionContent.tsx
|
|
6750
6983
|
import { InlineMath as InlineMath11 } from "react-katex";
|
|
6751
|
-
import { jsx as
|
|
6984
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6752
6985
|
var ActivitySolutionContent = ({
|
|
6753
6986
|
activityTemplateType,
|
|
6754
6987
|
data
|
|
@@ -6778,8 +7011,8 @@ var ActivitySolutionContent = ({
|
|
|
6778
7011
|
return null;
|
|
6779
7012
|
}
|
|
6780
7013
|
if (!solutionMap || Object.keys(solutionMap).length === 0) return null;
|
|
6781
|
-
return /* @__PURE__ */
|
|
6782
|
-
/* @__PURE__ */
|
|
7014
|
+
return /* @__PURE__ */ jsx44("div", { className: "mx-2", children: /* @__PURE__ */ jsxs33("div", { className: "p-4 border-catchup-blue border-2 rounded-catchup-xlarge", children: [
|
|
7015
|
+
/* @__PURE__ */ jsx44("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("solution") }),
|
|
6783
7016
|
Object.keys(solutionMap).map((key) => {
|
|
6784
7017
|
let currentItem;
|
|
6785
7018
|
try {
|
|
@@ -6789,12 +7022,12 @@ var ActivitySolutionContent = ({
|
|
|
6789
7022
|
return null;
|
|
6790
7023
|
}
|
|
6791
7024
|
const { value } = currentItem;
|
|
6792
|
-
return /* @__PURE__ */
|
|
6793
|
-
(inputPart, partIndex) => /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsx44("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
7026
|
+
(inputPart, partIndex) => /* @__PURE__ */ jsx44(
|
|
6794
7027
|
"span",
|
|
6795
7028
|
{
|
|
6796
7029
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6797
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
7030
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx44("span", { className: "text-xl", children: /* @__PURE__ */ jsx44(InlineMath11, { math: inputPart.value }) }) : inputPart.value
|
|
6798
7031
|
},
|
|
6799
7032
|
`${key}_part_${partIndex}`
|
|
6800
7033
|
)
|
|
@@ -6806,7 +7039,7 @@ var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
|
6806
7039
|
|
|
6807
7040
|
// src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
|
|
6808
7041
|
import { InlineMath as InlineMath12 } from "react-katex";
|
|
6809
|
-
import { jsx as
|
|
7042
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6810
7043
|
var ActivityEvaluationRubricContent = ({
|
|
6811
7044
|
activityTemplateType,
|
|
6812
7045
|
data
|
|
@@ -6836,21 +7069,21 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6836
7069
|
}
|
|
6837
7070
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
6838
7071
|
return null;
|
|
6839
|
-
return /* @__PURE__ */
|
|
6840
|
-
/* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsx45("div", { className: "mx-2", children: /* @__PURE__ */ jsxs34("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
7073
|
+
/* @__PURE__ */ jsx45("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
6841
7074
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
6842
7075
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
6843
7076
|
const { value } = currentItem;
|
|
6844
|
-
return /* @__PURE__ */
|
|
7077
|
+
return /* @__PURE__ */ jsx45(
|
|
6845
7078
|
"p",
|
|
6846
7079
|
{
|
|
6847
7080
|
className: "my-1 text-xl whitespace-pre-wrap",
|
|
6848
7081
|
children: constructInputWithSpecialExpressionList(value).map(
|
|
6849
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
7082
|
+
(inputPart, index2) => /* @__PURE__ */ jsx45(
|
|
6850
7083
|
"span",
|
|
6851
7084
|
{
|
|
6852
7085
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6853
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
7086
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx45("span", { className: "text-xl", children: /* @__PURE__ */ jsx45(InlineMath12, { math: inputPart.value }) }) : inputPart.value
|
|
6854
7087
|
},
|
|
6855
7088
|
index2
|
|
6856
7089
|
)
|
|
@@ -6867,13 +7100,13 @@ var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
|
6867
7100
|
import { useEffect as useEffect15, useState as useState24 } from "react";
|
|
6868
7101
|
|
|
6869
7102
|
// src/components/boxes/SelectionBox.tsx
|
|
6870
|
-
import { jsx as
|
|
7103
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6871
7104
|
var SelectionBox = ({
|
|
6872
7105
|
optionList,
|
|
6873
7106
|
selectedId,
|
|
6874
7107
|
handleSelectOnClick
|
|
6875
7108
|
}) => {
|
|
6876
|
-
return /* @__PURE__ */
|
|
7109
|
+
return /* @__PURE__ */ jsx46("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx46(
|
|
6877
7110
|
"div",
|
|
6878
7111
|
{
|
|
6879
7112
|
className: `${option.id === selectedId ? "border-catchup-blue-400" : "border-catchup-gray-100 hover:border-catchup-blue-500"} border-2 rounded-catchup-xlarge py-3 px-8 cursor-pointer duration-300 transition-all`,
|
|
@@ -6887,7 +7120,7 @@ var SelectionBox = ({
|
|
|
6887
7120
|
children: [
|
|
6888
7121
|
option.icon,
|
|
6889
7122
|
/* @__PURE__ */ jsxs35("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
6890
|
-
/* @__PURE__ */
|
|
7123
|
+
/* @__PURE__ */ jsx46("p", { children: option.text }),
|
|
6891
7124
|
option.subText ? /* @__PURE__ */ jsxs35("p", { className: "text-md", children: [
|
|
6892
7125
|
"(",
|
|
6893
7126
|
option.subText,
|
|
@@ -6904,7 +7137,7 @@ var SelectionBox = ({
|
|
|
6904
7137
|
var SelectionBox_default = SelectionBox;
|
|
6905
7138
|
|
|
6906
7139
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
6907
|
-
import { Fragment as Fragment11, jsx as
|
|
7140
|
+
import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6908
7141
|
var ActivityPreviewByData = ({
|
|
6909
7142
|
data,
|
|
6910
7143
|
showType,
|
|
@@ -6965,8 +7198,8 @@ var ActivityPreviewByData = ({
|
|
|
6965
7198
|
return /* @__PURE__ */ jsxs36("div", { children: [
|
|
6966
7199
|
showType ? /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
6967
7200
|
/* @__PURE__ */ jsxs36("div", { className: "mb-4", children: [
|
|
6968
|
-
showDescription ? /* @__PURE__ */
|
|
6969
|
-
/* @__PURE__ */
|
|
7201
|
+
showDescription ? /* @__PURE__ */ jsx47("div", { className: "my-2", children: /* @__PURE__ */ jsx47("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7202
|
+
/* @__PURE__ */ jsx47(
|
|
6970
7203
|
SelectionBox_default,
|
|
6971
7204
|
{
|
|
6972
7205
|
optionList,
|
|
@@ -6977,9 +7210,9 @@ var ActivityPreviewByData = ({
|
|
|
6977
7210
|
}
|
|
6978
7211
|
)
|
|
6979
7212
|
] }),
|
|
6980
|
-
/* @__PURE__ */
|
|
7213
|
+
/* @__PURE__ */ jsx47(DividerLine_default, {})
|
|
6981
7214
|
] }) : null,
|
|
6982
|
-
selectedType ? /* @__PURE__ */
|
|
7215
|
+
selectedType ? /* @__PURE__ */ jsx47("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
6983
7216
|
OrderingActivityContent_default,
|
|
6984
7217
|
{
|
|
6985
7218
|
answer,
|
|
@@ -6993,7 +7226,7 @@ var ActivityPreviewByData = ({
|
|
|
6993
7226
|
showCorrectAnswer: true,
|
|
6994
7227
|
isFullScreen
|
|
6995
7228
|
}
|
|
6996
|
-
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */
|
|
7229
|
+
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
6997
7230
|
DropdownActivityContent_default,
|
|
6998
7231
|
{
|
|
6999
7232
|
answer,
|
|
@@ -7007,7 +7240,7 @@ var ActivityPreviewByData = ({
|
|
|
7007
7240
|
showCorrectAnswer: true,
|
|
7008
7241
|
isFullScreen
|
|
7009
7242
|
}
|
|
7010
|
-
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */
|
|
7243
|
+
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7011
7244
|
MCSAActivityContent_default,
|
|
7012
7245
|
{
|
|
7013
7246
|
answer,
|
|
@@ -7021,7 +7254,7 @@ var ActivityPreviewByData = ({
|
|
|
7021
7254
|
showCorrectAnswer: true,
|
|
7022
7255
|
isFullScreen
|
|
7023
7256
|
}
|
|
7024
|
-
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */
|
|
7257
|
+
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7025
7258
|
MCMAActivityContent_default,
|
|
7026
7259
|
{
|
|
7027
7260
|
answer,
|
|
@@ -7035,7 +7268,7 @@ var ActivityPreviewByData = ({
|
|
|
7035
7268
|
showCorrectAnswer: true,
|
|
7036
7269
|
isFullScreen
|
|
7037
7270
|
}
|
|
7038
|
-
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */
|
|
7271
|
+
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7039
7272
|
MatchingActivityContent_default,
|
|
7040
7273
|
{
|
|
7041
7274
|
answer,
|
|
@@ -7048,7 +7281,7 @@ var ActivityPreviewByData = ({
|
|
|
7048
7281
|
isPreview: true,
|
|
7049
7282
|
showCorrectAnswer: true
|
|
7050
7283
|
}
|
|
7051
|
-
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */
|
|
7284
|
+
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7052
7285
|
GroupingActivityContent_default,
|
|
7053
7286
|
{
|
|
7054
7287
|
answer,
|
|
@@ -7061,7 +7294,7 @@ var ActivityPreviewByData = ({
|
|
|
7061
7294
|
isPreview: true,
|
|
7062
7295
|
showCorrectAnswer: true
|
|
7063
7296
|
}
|
|
7064
|
-
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */
|
|
7297
|
+
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7065
7298
|
FillInTheBlanksActivityContent_default,
|
|
7066
7299
|
{
|
|
7067
7300
|
answer,
|
|
@@ -7075,7 +7308,7 @@ var ActivityPreviewByData = ({
|
|
|
7075
7308
|
showCorrectAnswer: true,
|
|
7076
7309
|
isFullScreen
|
|
7077
7310
|
}
|
|
7078
|
-
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */
|
|
7311
|
+
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7079
7312
|
OpenEndedActivityContent_default,
|
|
7080
7313
|
{
|
|
7081
7314
|
answer,
|
|
@@ -7087,7 +7320,7 @@ var ActivityPreviewByData = ({
|
|
|
7087
7320
|
isPreview: true,
|
|
7088
7321
|
isFullScreen
|
|
7089
7322
|
}
|
|
7090
|
-
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */
|
|
7323
|
+
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7091
7324
|
TrueFalseActivityContent_default,
|
|
7092
7325
|
{
|
|
7093
7326
|
answer,
|
|
@@ -7102,14 +7335,14 @@ var ActivityPreviewByData = ({
|
|
|
7102
7335
|
isFullScreen
|
|
7103
7336
|
}
|
|
7104
7337
|
) : null }, selectedType) : null,
|
|
7105
|
-
selectedType && showSolution ? /* @__PURE__ */
|
|
7338
|
+
selectedType && showSolution ? /* @__PURE__ */ jsx47("div", { className: "my-4", children: /* @__PURE__ */ jsx47(
|
|
7106
7339
|
ActivitySolutionContent_default,
|
|
7107
7340
|
{
|
|
7108
7341
|
activityTemplateType: selectedType,
|
|
7109
7342
|
data
|
|
7110
7343
|
}
|
|
7111
7344
|
) }) : null,
|
|
7112
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */
|
|
7345
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ jsx47("div", { className: "my-4", children: /* @__PURE__ */ jsx47(
|
|
7113
7346
|
ActivityEvaluationRubricContent_default,
|
|
7114
7347
|
{
|
|
7115
7348
|
activityTemplateType: selectedType,
|
|
@@ -7122,7 +7355,7 @@ var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
|
7122
7355
|
|
|
7123
7356
|
// src/components/activities/ActivityPreviewByAnswerData.tsx
|
|
7124
7357
|
import { useEffect as useEffect16, useState as useState25 } from "react";
|
|
7125
|
-
import { Fragment as Fragment12, jsx as
|
|
7358
|
+
import { Fragment as Fragment12, jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7126
7359
|
var ActivityPreviewByAnswerData = ({
|
|
7127
7360
|
data,
|
|
7128
7361
|
showType = true,
|
|
@@ -7230,28 +7463,28 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7230
7463
|
};
|
|
7231
7464
|
switch (selectedType) {
|
|
7232
7465
|
case "ORDERING":
|
|
7233
|
-
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */
|
|
7466
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ jsx48(OrderingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7234
7467
|
case "DROPDOWN":
|
|
7235
|
-
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */
|
|
7468
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ jsx48(DropdownActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7236
7469
|
case "MCSA":
|
|
7237
|
-
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */
|
|
7470
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ jsx48(MCSAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7238
7471
|
case "MCMA":
|
|
7239
|
-
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */
|
|
7472
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ jsx48(MCMAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7240
7473
|
case "MATCHING":
|
|
7241
|
-
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */
|
|
7474
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ jsx48(MatchingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7242
7475
|
case "GROUPING":
|
|
7243
|
-
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */
|
|
7476
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ jsx48(GroupingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7244
7477
|
case "FILL_IN_THE_BLANKS":
|
|
7245
|
-
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */
|
|
7478
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ jsx48(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7246
7479
|
case "OPEN_ENDED":
|
|
7247
|
-
return data.openEndedBodyMap ? /* @__PURE__ */
|
|
7480
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ jsx48(
|
|
7248
7481
|
OpenEndedActivityContent_default,
|
|
7249
7482
|
__spreadProps(__spreadValues({}, commonProps), {
|
|
7250
7483
|
showMaterialContent: true
|
|
7251
7484
|
})
|
|
7252
7485
|
) : null;
|
|
7253
7486
|
case "TRUE_FALSE":
|
|
7254
|
-
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */
|
|
7487
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ jsx48(TrueFalseActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7255
7488
|
default:
|
|
7256
7489
|
return null;
|
|
7257
7490
|
}
|
|
@@ -7260,8 +7493,8 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7260
7493
|
return /* @__PURE__ */ jsxs37("div", { children: [
|
|
7261
7494
|
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs37(Fragment12, { children: [
|
|
7262
7495
|
/* @__PURE__ */ jsxs37("div", { className: "mb-4", children: [
|
|
7263
|
-
showDescription ? /* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7496
|
+
showDescription ? /* @__PURE__ */ jsx48("div", { className: "my-2", children: /* @__PURE__ */ jsx48("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7497
|
+
/* @__PURE__ */ jsx48(
|
|
7265
7498
|
SelectionBox_default,
|
|
7266
7499
|
{
|
|
7267
7500
|
optionList,
|
|
@@ -7272,20 +7505,20 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7272
7505
|
}
|
|
7273
7506
|
)
|
|
7274
7507
|
] }),
|
|
7275
|
-
/* @__PURE__ */
|
|
7508
|
+
/* @__PURE__ */ jsx48(DividerLine_default, {})
|
|
7276
7509
|
] }) : null,
|
|
7277
7510
|
/* @__PURE__ */ jsxs37("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
7278
|
-
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */
|
|
7279
|
-
selectedType ? /* @__PURE__ */
|
|
7511
|
+
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ jsx48(ActivityEmptyContent_default, {}) : null,
|
|
7512
|
+
selectedType ? /* @__PURE__ */ jsx48("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
|
7280
7513
|
] }),
|
|
7281
|
-
selectedType && showSolution ? /* @__PURE__ */
|
|
7514
|
+
selectedType && showSolution ? /* @__PURE__ */ jsx48("div", { className: "my-4", children: /* @__PURE__ */ jsx48(
|
|
7282
7515
|
ActivitySolutionContent_default,
|
|
7283
7516
|
{
|
|
7284
7517
|
activityTemplateType: selectedType,
|
|
7285
7518
|
data
|
|
7286
7519
|
}
|
|
7287
7520
|
) }) : null,
|
|
7288
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */
|
|
7521
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ jsx48("div", { className: "my-4", children: /* @__PURE__ */ jsx48(
|
|
7289
7522
|
ActivityEvaluationRubricContent_default,
|
|
7290
7523
|
{
|
|
7291
7524
|
activityTemplateType: selectedType,
|
|
@@ -7297,16 +7530,16 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7297
7530
|
var ActivityPreviewByAnswerData_default = ActivityPreviewByAnswerData;
|
|
7298
7531
|
|
|
7299
7532
|
// src/components/errors/StatusError.tsx
|
|
7300
|
-
import { jsx as
|
|
7533
|
+
import { jsx as jsx49, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7301
7534
|
var StatusError = ({
|
|
7302
7535
|
statusCode,
|
|
7303
7536
|
statusText,
|
|
7304
7537
|
textSize
|
|
7305
7538
|
}) => {
|
|
7306
7539
|
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col justify-center items-center", children: [
|
|
7307
|
-
/* @__PURE__ */
|
|
7540
|
+
/* @__PURE__ */ jsx49("p", { className: "text-6xl text-catchup-red my-5", children: i18n_default.t("ooops_text") }),
|
|
7308
7541
|
/* @__PURE__ */ jsxs38("div", { className: "text-center my-5", children: [
|
|
7309
|
-
/* @__PURE__ */
|
|
7542
|
+
/* @__PURE__ */ jsx49("p", { className: "italic", children: i18n_default.t("unexcepted_error_text") }),
|
|
7310
7543
|
/* @__PURE__ */ jsxs38("p", { className: `${textSize ? textSize : "text-lg"}`, children: [
|
|
7311
7544
|
"(",
|
|
7312
7545
|
statusCode ? `${statusCode} - ` : null,
|
|
@@ -7319,9 +7552,9 @@ var StatusError = ({
|
|
|
7319
7552
|
var StatusError_default = StatusError;
|
|
7320
7553
|
|
|
7321
7554
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
7322
|
-
import { jsx as
|
|
7555
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7323
7556
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
7324
|
-
return /* @__PURE__ */
|
|
7557
|
+
return /* @__PURE__ */ jsx50(
|
|
7325
7558
|
"div",
|
|
7326
7559
|
{
|
|
7327
7560
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -7331,7 +7564,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
7331
7564
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
7332
7565
|
|
|
7333
7566
|
// src/components/groups/LeftTextRightInputGroup.tsx
|
|
7334
|
-
import { jsx as
|
|
7567
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7335
7568
|
var LeftTextRightInputGroup = ({
|
|
7336
7569
|
type,
|
|
7337
7570
|
title,
|
|
@@ -7342,8 +7575,8 @@ var LeftTextRightInputGroup = ({
|
|
|
7342
7575
|
errorText
|
|
7343
7576
|
}) => {
|
|
7344
7577
|
return /* @__PURE__ */ jsxs39("div", { className: "w-full flex flex-row mx-2", children: [
|
|
7345
|
-
/* @__PURE__ */
|
|
7346
|
-
/* @__PURE__ */
|
|
7578
|
+
/* @__PURE__ */ jsx51("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ jsx51("p", { children: title }) }),
|
|
7579
|
+
/* @__PURE__ */ jsx51("div", { className: "flex-1", children: /* @__PURE__ */ jsx51(
|
|
7347
7580
|
InputGroup_default,
|
|
7348
7581
|
{
|
|
7349
7582
|
type,
|
|
@@ -7360,7 +7593,7 @@ var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
|
|
|
7360
7593
|
|
|
7361
7594
|
// src/components/groups/PageTravelGroup.tsx
|
|
7362
7595
|
import { useEffect as useEffect17, useState as useState26 } from "react";
|
|
7363
|
-
import { jsx as
|
|
7596
|
+
import { jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7364
7597
|
var PageTravelGroup = ({
|
|
7365
7598
|
isImageProcessing,
|
|
7366
7599
|
handleImageProcessing,
|
|
@@ -7379,7 +7612,7 @@ var PageTravelGroup = ({
|
|
|
7379
7612
|
setNewPageNumber(pageNumber + 1);
|
|
7380
7613
|
}, [pageNumber]);
|
|
7381
7614
|
return /* @__PURE__ */ jsxs40("div", { className: "flex-1 flex flex-row justify-center items-center flex-wrap", children: [
|
|
7382
|
-
pageNumber === 0 ? null : /* @__PURE__ */
|
|
7615
|
+
pageNumber === 0 ? null : /* @__PURE__ */ jsx52("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ jsx52(
|
|
7383
7616
|
BaseImage_default,
|
|
7384
7617
|
{
|
|
7385
7618
|
size: "small",
|
|
@@ -7397,7 +7630,7 @@ var PageTravelGroup = ({
|
|
|
7397
7630
|
}
|
|
7398
7631
|
}
|
|
7399
7632
|
) }),
|
|
7400
|
-
Array.from(Array(totalPageNumber).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */
|
|
7633
|
+
Array.from(Array(totalPageNumber).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ jsx52("div", { className: "px-2", children: /* @__PURE__ */ jsx52(
|
|
7401
7634
|
"p",
|
|
7402
7635
|
{
|
|
7403
7636
|
className: `${pageNumber === index ? "text-2xl" : "text-md"} cursor-pointer`,
|
|
@@ -7412,7 +7645,7 @@ var PageTravelGroup = ({
|
|
|
7412
7645
|
children: index + 1
|
|
7413
7646
|
}
|
|
7414
7647
|
) }, index)),
|
|
7415
|
-
totalPageNumber === 0 || pageNumber === totalPageNumber - 1 ? null : /* @__PURE__ */
|
|
7648
|
+
totalPageNumber === 0 || pageNumber === totalPageNumber - 1 ? null : /* @__PURE__ */ jsx52("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ jsx52(
|
|
7416
7649
|
BaseImage_default,
|
|
7417
7650
|
{
|
|
7418
7651
|
size: "small",
|
|
@@ -7430,7 +7663,7 @@ var PageTravelGroup = ({
|
|
|
7430
7663
|
}
|
|
7431
7664
|
}
|
|
7432
7665
|
) }),
|
|
7433
|
-
/* @__PURE__ */
|
|
7666
|
+
/* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52(
|
|
7434
7667
|
"input",
|
|
7435
7668
|
{
|
|
7436
7669
|
className: `w-[90px] py-2 px-4 border border-catchup-gray-100 rounded-catchup-xlarge focus:outline-none placeholder-catchup-gray-200 focus:border-catchup-blue-400 focus:shadow-input`,
|
|
@@ -7454,14 +7687,14 @@ var PageTravelGroup = ({
|
|
|
7454
7687
|
var PageTravelGroup_default = PageTravelGroup;
|
|
7455
7688
|
|
|
7456
7689
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
7457
|
-
import { jsx as
|
|
7690
|
+
import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7458
7691
|
var SelectionCheckbox = ({
|
|
7459
7692
|
optionList,
|
|
7460
7693
|
selectedIdList,
|
|
7461
7694
|
handleSelectOnClick,
|
|
7462
7695
|
handleRemoveOnClick
|
|
7463
7696
|
}) => {
|
|
7464
|
-
return /* @__PURE__ */
|
|
7697
|
+
return /* @__PURE__ */ jsx53("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx53(
|
|
7465
7698
|
"div",
|
|
7466
7699
|
{
|
|
7467
7700
|
className: `${selectedIdList.findIndex(
|
|
@@ -7483,7 +7716,7 @@ var SelectionCheckbox = ({
|
|
|
7483
7716
|
(selectedId) => selectedId === option.id
|
|
7484
7717
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
7485
7718
|
children: [
|
|
7486
|
-
/* @__PURE__ */
|
|
7719
|
+
/* @__PURE__ */ jsx53(
|
|
7487
7720
|
BaseImage_default,
|
|
7488
7721
|
{
|
|
7489
7722
|
src: selectedIdList.findIndex(
|
|
@@ -7493,7 +7726,7 @@ var SelectionCheckbox = ({
|
|
|
7493
7726
|
size: "small"
|
|
7494
7727
|
}
|
|
7495
7728
|
),
|
|
7496
|
-
/* @__PURE__ */
|
|
7729
|
+
/* @__PURE__ */ jsx53("div", { className: "flex-1", children: /* @__PURE__ */ jsx53("p", { children: option.text }) })
|
|
7497
7730
|
]
|
|
7498
7731
|
}
|
|
7499
7732
|
)
|
|
@@ -7504,7 +7737,7 @@ var SelectionCheckbox = ({
|
|
|
7504
7737
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
7505
7738
|
|
|
7506
7739
|
// src/components/tabs/SelectionTab.tsx
|
|
7507
|
-
import { jsx as
|
|
7740
|
+
import { jsx as jsx54, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7508
7741
|
var SelectionTab = ({
|
|
7509
7742
|
optionList,
|
|
7510
7743
|
selectedId,
|
|
@@ -7514,7 +7747,7 @@ var SelectionTab = ({
|
|
|
7514
7747
|
textColor,
|
|
7515
7748
|
borderColor
|
|
7516
7749
|
}) => {
|
|
7517
|
-
return /* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ jsx54("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsxs42(
|
|
7518
7751
|
"div",
|
|
7519
7752
|
{
|
|
7520
7753
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
@@ -7522,8 +7755,8 @@ var SelectionTab = ({
|
|
|
7522
7755
|
handleSelectOnClick(option.id);
|
|
7523
7756
|
},
|
|
7524
7757
|
children: [
|
|
7525
|
-
/* @__PURE__ */
|
|
7526
|
-
option.subTitle ? /* @__PURE__ */
|
|
7758
|
+
/* @__PURE__ */ jsx54("p", { className: "text-lg", children: option.title }),
|
|
7759
|
+
option.subTitle ? /* @__PURE__ */ jsx54("p", { className: "text-md", children: option.subTitle }) : null
|
|
7527
7760
|
]
|
|
7528
7761
|
},
|
|
7529
7762
|
index
|
|
@@ -7532,20 +7765,20 @@ var SelectionTab = ({
|
|
|
7532
7765
|
var SelectionTab_default = SelectionTab;
|
|
7533
7766
|
|
|
7534
7767
|
// src/components/tabs/SelectionTabFill.tsx
|
|
7535
|
-
import { jsx as
|
|
7768
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7536
7769
|
var SelectionTabFill = ({
|
|
7537
7770
|
optionList,
|
|
7538
7771
|
selectedId,
|
|
7539
7772
|
handleSelectOnClick
|
|
7540
7773
|
}) => {
|
|
7541
|
-
return /* @__PURE__ */
|
|
7774
|
+
return /* @__PURE__ */ jsx55("div", { className: "w-full flex flex-row bg-catchup-gray-50 gap-x-2 rounded-catchup-medium px-4 py-2 justify-center text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx55(
|
|
7542
7775
|
"div",
|
|
7543
7776
|
{
|
|
7544
7777
|
className: "cursor-pointer",
|
|
7545
7778
|
onClick: () => {
|
|
7546
7779
|
handleSelectOnClick(option.id);
|
|
7547
7780
|
},
|
|
7548
|
-
children: /* @__PURE__ */
|
|
7781
|
+
children: /* @__PURE__ */ jsx55(
|
|
7549
7782
|
"p",
|
|
7550
7783
|
{
|
|
7551
7784
|
className: `${selectedId === option.id ? "text-catchup-white bg-catchup-blue-500" : "text-catchup-gray-300"} transition-all duration-300 rounded-catchup-medium px-2 py-1`,
|
|
@@ -7559,34 +7792,34 @@ var SelectionTabFill = ({
|
|
|
7559
7792
|
var SelectionTabFill_default = SelectionTabFill;
|
|
7560
7793
|
|
|
7561
7794
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
7562
|
-
import { jsx as
|
|
7795
|
+
import { jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7563
7796
|
var ActivityTemplateLabel = ({
|
|
7564
7797
|
title,
|
|
7565
7798
|
icon,
|
|
7566
7799
|
font
|
|
7567
7800
|
}) => {
|
|
7568
|
-
return /* @__PURE__ */
|
|
7569
|
-
icon ? icon : /* @__PURE__ */
|
|
7570
|
-
/* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx56("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs43("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7802
|
+
icon ? icon : /* @__PURE__ */ jsx56(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
|
|
7803
|
+
/* @__PURE__ */ jsx56("p", { className: font ? font : "text-sm", children: title })
|
|
7571
7804
|
] }) });
|
|
7572
7805
|
};
|
|
7573
7806
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
7574
7807
|
|
|
7575
7808
|
// src/components/labels/BrandLabel.tsx
|
|
7576
|
-
import { jsx as
|
|
7809
|
+
import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7577
7810
|
var BrandLabel = ({ title, icon, font }) => {
|
|
7578
|
-
return /* @__PURE__ */
|
|
7579
|
-
icon ? icon : /* @__PURE__ */
|
|
7580
|
-
/* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ jsx57("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs44("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7812
|
+
icon ? icon : /* @__PURE__ */ jsx57(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
|
|
7813
|
+
/* @__PURE__ */ jsx57("p", { className: font ? font : "text-sm", children: title })
|
|
7581
7814
|
] }) });
|
|
7582
7815
|
};
|
|
7583
7816
|
var BrandLabel_default = BrandLabel;
|
|
7584
7817
|
|
|
7585
7818
|
// src/components/labels/CategoryLabel.tsx
|
|
7586
|
-
import { jsx as
|
|
7819
|
+
import { jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7587
7820
|
var CategoryLabel = ({ title, icon, font }) => {
|
|
7588
|
-
return /* @__PURE__ */
|
|
7589
|
-
icon ? icon : /* @__PURE__ */
|
|
7821
|
+
return /* @__PURE__ */ jsx58("div", { className: "px-3 py-1 gap-x-3 border border-category-label-border bg-category-label text-category-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs45("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7822
|
+
icon ? icon : /* @__PURE__ */ jsx58(
|
|
7590
7823
|
BaseImage_default,
|
|
7591
7824
|
{
|
|
7592
7825
|
src: "/icons/category-label.webp",
|
|
@@ -7594,40 +7827,40 @@ var CategoryLabel = ({ title, icon, font }) => {
|
|
|
7594
7827
|
size: "xsmall"
|
|
7595
7828
|
}
|
|
7596
7829
|
),
|
|
7597
|
-
/* @__PURE__ */
|
|
7830
|
+
/* @__PURE__ */ jsx58("p", { className: font ? font : "text-sm", children: title })
|
|
7598
7831
|
] }) });
|
|
7599
7832
|
};
|
|
7600
7833
|
var CategoryLabel_default = CategoryLabel;
|
|
7601
7834
|
|
|
7602
7835
|
// src/components/labels/CoterieLabel.tsx
|
|
7603
|
-
import { jsx as
|
|
7836
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
7604
7837
|
var CoterieLabel = ({ title, font }) => {
|
|
7605
|
-
return /* @__PURE__ */
|
|
7838
|
+
return /* @__PURE__ */ jsx59("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsx59("p", { className: font ? font : "text-sm", children: title }) });
|
|
7606
7839
|
};
|
|
7607
7840
|
var CoterieLabel_default = CoterieLabel;
|
|
7608
7841
|
|
|
7609
7842
|
// src/components/labels/GradeLabel.tsx
|
|
7610
|
-
import { jsx as
|
|
7843
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7611
7844
|
var GradeLabel = ({ title, font }) => {
|
|
7612
|
-
return /* @__PURE__ */
|
|
7845
|
+
return /* @__PURE__ */ jsx60("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsx60("p", { className: font ? font : "text-sm", children: title }) });
|
|
7613
7846
|
};
|
|
7614
7847
|
var GradeLabel_default = GradeLabel;
|
|
7615
7848
|
|
|
7616
7849
|
// src/components/labels/OutcomeLabel.tsx
|
|
7617
|
-
import { jsx as
|
|
7850
|
+
import { jsx as jsx61, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7618
7851
|
var OutcomeLabel = ({ title, font }) => {
|
|
7619
|
-
return /* @__PURE__ */
|
|
7620
|
-
/* @__PURE__ */
|
|
7621
|
-
/* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsx61("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs46("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7853
|
+
/* @__PURE__ */ jsx61(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
|
|
7854
|
+
/* @__PURE__ */ jsx61("p", { className: font ? font : "text-sm", children: title })
|
|
7622
7855
|
] }) });
|
|
7623
7856
|
};
|
|
7624
7857
|
var OutcomeLabel_default = OutcomeLabel;
|
|
7625
7858
|
|
|
7626
7859
|
// src/components/labels/PersonalLabel.tsx
|
|
7627
|
-
import { jsx as
|
|
7860
|
+
import { jsx as jsx62, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7628
7861
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
7629
|
-
return /* @__PURE__ */
|
|
7630
|
-
icon ? icon : /* @__PURE__ */
|
|
7862
|
+
return /* @__PURE__ */ jsx62("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs47("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7863
|
+
icon ? icon : /* @__PURE__ */ jsx62(
|
|
7631
7864
|
BaseImage_default,
|
|
7632
7865
|
{
|
|
7633
7866
|
src: "/icons/personal-label.webp",
|
|
@@ -7635,16 +7868,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
7635
7868
|
size: "xsmall"
|
|
7636
7869
|
}
|
|
7637
7870
|
),
|
|
7638
|
-
/* @__PURE__ */
|
|
7871
|
+
/* @__PURE__ */ jsx62("p", { className: font ? font : "text-sm", children: title })
|
|
7639
7872
|
] }) });
|
|
7640
7873
|
};
|
|
7641
7874
|
var PersonalLabel_default = PersonalLabel;
|
|
7642
7875
|
|
|
7643
7876
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
7644
|
-
import { jsx as
|
|
7877
|
+
import { jsx as jsx63, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7645
7878
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
7646
|
-
return /* @__PURE__ */
|
|
7647
|
-
icon ? icon : /* @__PURE__ */
|
|
7879
|
+
return /* @__PURE__ */ jsx63("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7880
|
+
icon ? icon : /* @__PURE__ */ jsx63(
|
|
7648
7881
|
BaseImage_default,
|
|
7649
7882
|
{
|
|
7650
7883
|
src: "/icons/publishing-house-label.webp",
|
|
@@ -7652,31 +7885,31 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
7652
7885
|
size: "xsmall"
|
|
7653
7886
|
}
|
|
7654
7887
|
),
|
|
7655
|
-
/* @__PURE__ */
|
|
7888
|
+
/* @__PURE__ */ jsx63("p", { className: font ? font : "text-sm", children: title })
|
|
7656
7889
|
] }) });
|
|
7657
7890
|
};
|
|
7658
7891
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
7659
7892
|
|
|
7660
7893
|
// src/components/labels/ActivityLabel.tsx
|
|
7661
|
-
import { jsx as
|
|
7894
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
7662
7895
|
var ActivityLabel = ({ title, font }) => {
|
|
7663
|
-
return /* @__PURE__ */
|
|
7896
|
+
return /* @__PURE__ */ jsx64("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge text-center", children: /* @__PURE__ */ jsx64("p", { className: font ? font : "text-sm", children: title }) });
|
|
7664
7897
|
};
|
|
7665
7898
|
var ActivityLabel_default = ActivityLabel;
|
|
7666
7899
|
|
|
7667
7900
|
// src/components/infos/InfoWithText.tsx
|
|
7668
|
-
import { jsx as
|
|
7901
|
+
import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
7669
7902
|
var InfoWithText = (props) => {
|
|
7670
7903
|
const { value } = props;
|
|
7671
7904
|
return /* @__PURE__ */ jsxs49("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
|
|
7672
|
-
/* @__PURE__ */
|
|
7673
|
-
/* @__PURE__ */
|
|
7905
|
+
/* @__PURE__ */ jsx65(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
|
|
7906
|
+
/* @__PURE__ */ jsx65("div", { className: "flex-1", children: /* @__PURE__ */ jsx65("p", { className: "", children: value }) })
|
|
7674
7907
|
] });
|
|
7675
7908
|
};
|
|
7676
7909
|
var InfoWithText_default = InfoWithText;
|
|
7677
7910
|
|
|
7678
7911
|
// src/components/titles/BaseTitle.tsx
|
|
7679
|
-
import { jsx as
|
|
7912
|
+
import { jsx as jsx66, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
7680
7913
|
var BaseTitle = ({
|
|
7681
7914
|
title,
|
|
7682
7915
|
totalItemCount,
|
|
@@ -7692,15 +7925,15 @@ var BaseTitle = ({
|
|
|
7692
7925
|
itemName
|
|
7693
7926
|
] }) : null
|
|
7694
7927
|
] }),
|
|
7695
|
-
description ? /* @__PURE__ */
|
|
7928
|
+
description ? /* @__PURE__ */ jsx66("p", { className: "", children: description }) : null
|
|
7696
7929
|
] });
|
|
7697
7930
|
};
|
|
7698
7931
|
var BaseTitle_default = BaseTitle;
|
|
7699
7932
|
|
|
7700
7933
|
// src/components/titles/SubTitle.tsx
|
|
7701
|
-
import { jsx as
|
|
7934
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
7702
7935
|
var SubTitle = ({ title }) => {
|
|
7703
|
-
return /* @__PURE__ */
|
|
7936
|
+
return /* @__PURE__ */ jsx67("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
|
|
7704
7937
|
};
|
|
7705
7938
|
var SubTitle_default = SubTitle;
|
|
7706
7939
|
|