catchup-library-web 2.5.15 → 2.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +259 -219
- package/dist/index.mjs +279 -239
- package/package.json +1 -1
- package/src/components/activities/GroupingActivityContent.tsx +33 -18
- package/src/components/activities/MatchingActivityContent.tsx +7 -3
- package/src/components/activities/OrderingActivityContent.tsx +7 -3
- package/src/components/activities/body-contents/ActivityBodyContent.tsx +8 -8
- package/src/components/activities/material-contents/DropdownActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +5 -3
- package/src/components/activities/material-contents/MCMAActivityMaterialContent.tsx +8 -6
- package/src/components/activities/material-contents/MCSAActivityMaterialContent.tsx +8 -6
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +3 -1
- package/src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx +5 -5
- package/src/components/activities/material-contents/OrderingActivityMaterialContent.tsx +3 -1
- package/src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx +6 -4
- package/src/properties/ActivityProperties.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -3819,7 +3819,7 @@ var ActivityBodyContent = ({
|
|
|
3819
3819
|
key
|
|
3820
3820
|
});
|
|
3821
3821
|
}).filter(Boolean);
|
|
3822
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col
|
|
3822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col h-full overflow-y-auto", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3823
3823
|
ShowBodyMediaByContentType_default,
|
|
3824
3824
|
{
|
|
3825
3825
|
index,
|
|
@@ -4658,10 +4658,10 @@ var DropdownActivityMaterialContent = ({
|
|
|
4658
4658
|
}
|
|
4659
4659
|
return "INCORRECT";
|
|
4660
4660
|
};
|
|
4661
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-
|
|
4662
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4663
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "hidden md:
|
|
4664
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
4662
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4663
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DividerLine_default, {}) }),
|
|
4664
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4665
4665
|
(materialKey, index) => {
|
|
4666
4666
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
4667
4667
|
const learnerAnswerState = checkAnswerState(
|
|
@@ -4768,7 +4768,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
4768
4768
|
] })
|
|
4769
4769
|
] }) }) }, index);
|
|
4770
4770
|
}
|
|
4771
|
-
) })
|
|
4771
|
+
) }) })
|
|
4772
4772
|
] });
|
|
4773
4773
|
};
|
|
4774
4774
|
var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
@@ -4987,12 +4987,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4987
4987
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4988
4988
|
"div",
|
|
4989
4989
|
{
|
|
4990
|
-
className: "flex flex-
|
|
4990
|
+
className: "flex flex-col h-full",
|
|
4991
4991
|
onMouseMove: handleMouseMove,
|
|
4992
4992
|
onMouseUp: handleMouseUp,
|
|
4993
4993
|
children: [
|
|
4994
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4995
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "hidden md:
|
|
4994
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4995
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DividerLine_default, {}) }),
|
|
4996
4996
|
draggedOption && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4997
4997
|
"div",
|
|
4998
4998
|
{
|
|
@@ -5045,148 +5045,150 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5045
5045
|
) })
|
|
5046
5046
|
}
|
|
5047
5047
|
),
|
|
5048
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
"
|
|
5068
|
-
{
|
|
5069
|
-
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5070
|
-
onClick: () => handleSelectOption(option),
|
|
5071
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5072
|
-
InputWithSpecialExpression_default,
|
|
5073
|
-
{
|
|
5074
|
-
value: option,
|
|
5075
|
-
showSpecialOnly: false
|
|
5076
|
-
}
|
|
5077
|
-
) })
|
|
5078
|
-
}
|
|
5079
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5080
|
-
"div",
|
|
5081
|
-
{
|
|
5082
|
-
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5083
|
-
onClick: () => handleSelectOption(option),
|
|
5084
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5085
|
-
ShowMaterialMediaByContentType_default,
|
|
5086
|
-
{
|
|
5087
|
-
contentType: contentMap.type,
|
|
5088
|
-
src: option,
|
|
5089
|
-
canFullScreen: true
|
|
5090
|
-
},
|
|
5091
|
-
`${uniqueValue}-${index}`
|
|
5092
|
-
)
|
|
5093
|
-
}
|
|
5094
|
-
)
|
|
5095
|
-
},
|
|
5096
|
-
index
|
|
5097
|
-
)
|
|
5098
|
-
) }),
|
|
5099
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
5100
|
-
const learnerAnswerState = checkAnswerState(
|
|
5101
|
-
JSON.parse(materialMap[materialKey]),
|
|
5102
|
-
displayAnswerMap[materialKey]
|
|
5103
|
-
);
|
|
5104
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5105
|
-
"div",
|
|
5106
|
-
{
|
|
5107
|
-
"data-drop-zone": materialKey,
|
|
5108
|
-
onMouseEnter: () => draggedOption && setDropTargetIndex(materialKey),
|
|
5109
|
-
onMouseLeave: () => setDropTargetIndex(null),
|
|
5110
|
-
onClick: () => handleDropZoneClick(materialKey),
|
|
5111
|
-
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
5112
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
5113
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("p", { className: "text-xl", children: [
|
|
5114
|
-
parseFloat(materialKey) + 1,
|
|
5115
|
-
"."
|
|
5116
|
-
] }) }),
|
|
5117
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "relative", children: [
|
|
5118
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5119
|
-
"div",
|
|
5120
|
-
{
|
|
5121
|
-
className: `w-full min-h-[44px] border rounded-lg ${displayAnswerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
5122
|
-
onClick: (e) => {
|
|
5123
|
-
if (displayAnswerMap[materialKey]) {
|
|
5124
|
-
e.stopPropagation();
|
|
5125
|
-
onChange(answerMap, materialKey, "");
|
|
5126
|
-
}
|
|
5127
|
-
},
|
|
5128
|
-
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5129
|
-
InputWithSpecialExpression_default,
|
|
5130
|
-
{
|
|
5131
|
-
value: displayAnswerMap[materialKey],
|
|
5132
|
-
showSpecialOnly: false
|
|
5133
|
-
}
|
|
5134
|
-
) : null
|
|
5135
|
-
}
|
|
5136
|
-
) }),
|
|
5137
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5138
|
-
BaseImage_default,
|
|
5139
|
-
{
|
|
5140
|
-
src: "/icons/checkbox.webp",
|
|
5141
|
-
alt: "checkbox",
|
|
5142
|
-
size: "small"
|
|
5143
|
-
}
|
|
5144
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5145
|
-
BaseImage_default,
|
|
5146
|
-
{
|
|
5147
|
-
src: "/icons/cross-red.webp",
|
|
5148
|
-
alt: "cross-red",
|
|
5149
|
-
size: "small"
|
|
5150
|
-
}
|
|
5151
|
-
) }) : null
|
|
5152
|
-
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5048
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: [
|
|
5049
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
5050
|
+
(option, index) => checkAnswerProvided(displayAnswerMap, option) ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5051
|
+
ShowMaterialMediaByContentType_default,
|
|
5052
|
+
{
|
|
5053
|
+
contentType: contentMap.type,
|
|
5054
|
+
src: option,
|
|
5055
|
+
canFullScreen: true
|
|
5056
|
+
},
|
|
5057
|
+
`${uniqueValue}-${index}`
|
|
5058
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5059
|
+
"div",
|
|
5060
|
+
{
|
|
5061
|
+
ref: draggedOption === option ? dragElementRef : null,
|
|
5062
|
+
className: `${draggedOption === option ? "opacity-40" : selectedOption === option ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5063
|
+
onMouseDown: (e) => handleMouseDown(e, option),
|
|
5064
|
+
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
5065
|
+
onTouchMove: handleTouchMove,
|
|
5066
|
+
onTouchEnd: handleTouchEnd,
|
|
5067
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5153
5068
|
"div",
|
|
5154
5069
|
{
|
|
5155
|
-
className:
|
|
5156
|
-
|
|
5070
|
+
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5071
|
+
onClick: () => handleSelectOption(option),
|
|
5072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5073
|
+
InputWithSpecialExpression_default,
|
|
5074
|
+
{
|
|
5075
|
+
value: option,
|
|
5076
|
+
showSpecialOnly: false
|
|
5077
|
+
}
|
|
5078
|
+
) })
|
|
5157
5079
|
}
|
|
5158
5080
|
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5159
5081
|
"div",
|
|
5160
5082
|
{
|
|
5161
|
-
className: "
|
|
5162
|
-
onClick: (
|
|
5163
|
-
e.stopPropagation();
|
|
5164
|
-
onChange(answerMap, materialKey, "");
|
|
5165
|
-
},
|
|
5083
|
+
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5084
|
+
onClick: () => handleSelectOption(option),
|
|
5166
5085
|
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5167
5086
|
ShowMaterialMediaByContentType_default,
|
|
5168
5087
|
{
|
|
5169
5088
|
contentType: contentMap.type,
|
|
5170
|
-
src:
|
|
5089
|
+
src: option,
|
|
5171
5090
|
canFullScreen: true
|
|
5172
5091
|
},
|
|
5173
5092
|
`${uniqueValue}-${index}`
|
|
5174
5093
|
)
|
|
5175
5094
|
}
|
|
5176
|
-
)
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5095
|
+
)
|
|
5096
|
+
},
|
|
5097
|
+
index
|
|
5098
|
+
)
|
|
5099
|
+
) }),
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
5101
|
+
const learnerAnswerState = checkAnswerState(
|
|
5102
|
+
JSON.parse(materialMap[materialKey]),
|
|
5103
|
+
displayAnswerMap[materialKey]
|
|
5104
|
+
);
|
|
5105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5106
|
+
"div",
|
|
5107
|
+
{
|
|
5108
|
+
"data-drop-zone": materialKey,
|
|
5109
|
+
onMouseEnter: () => draggedOption && setDropTargetIndex(materialKey),
|
|
5110
|
+
onMouseLeave: () => setDropTargetIndex(null),
|
|
5111
|
+
onClick: () => handleDropZoneClick(materialKey),
|
|
5112
|
+
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
5113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
5114
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("p", { className: "text-xl", children: [
|
|
5115
|
+
parseFloat(materialKey) + 1,
|
|
5116
|
+
"."
|
|
5117
|
+
] }) }),
|
|
5118
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "relative", children: [
|
|
5119
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5120
|
+
"div",
|
|
5121
|
+
{
|
|
5122
|
+
className: `w-full min-h-[44px] border rounded-lg ${displayAnswerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
5123
|
+
onClick: (e) => {
|
|
5124
|
+
if (displayAnswerMap[materialKey]) {
|
|
5125
|
+
e.stopPropagation();
|
|
5126
|
+
onChange(answerMap, materialKey, "");
|
|
5127
|
+
}
|
|
5128
|
+
},
|
|
5129
|
+
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5130
|
+
InputWithSpecialExpression_default,
|
|
5131
|
+
{
|
|
5132
|
+
value: displayAnswerMap[materialKey],
|
|
5133
|
+
showSpecialOnly: false
|
|
5134
|
+
}
|
|
5135
|
+
) : null
|
|
5136
|
+
}
|
|
5137
|
+
) }),
|
|
5138
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5139
|
+
BaseImage_default,
|
|
5140
|
+
{
|
|
5141
|
+
src: "/icons/checkbox.webp",
|
|
5142
|
+
alt: "checkbox",
|
|
5143
|
+
size: "small"
|
|
5144
|
+
}
|
|
5145
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5146
|
+
BaseImage_default,
|
|
5147
|
+
{
|
|
5148
|
+
src: "/icons/cross-red.webp",
|
|
5149
|
+
alt: "cross-red",
|
|
5150
|
+
size: "small"
|
|
5151
|
+
}
|
|
5152
|
+
) }) : null
|
|
5153
|
+
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5154
|
+
"div",
|
|
5155
|
+
{
|
|
5156
|
+
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"}`,
|
|
5157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
|
|
5158
|
+
}
|
|
5159
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5160
|
+
"div",
|
|
5161
|
+
{
|
|
5162
|
+
className: "flex-1 cursor-pointer",
|
|
5163
|
+
onClick: (e) => {
|
|
5164
|
+
e.stopPropagation();
|
|
5165
|
+
onChange(answerMap, materialKey, "");
|
|
5166
|
+
},
|
|
5167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5168
|
+
ShowMaterialMediaByContentType_default,
|
|
5169
|
+
{
|
|
5170
|
+
contentType: contentMap.type,
|
|
5171
|
+
src: displayAnswerMap[materialKey],
|
|
5172
|
+
canFullScreen: true
|
|
5173
|
+
},
|
|
5174
|
+
`${uniqueValue}-${index}`
|
|
5175
|
+
)
|
|
5176
|
+
}
|
|
5177
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
5178
|
+
displayAnswerMap[materialKey]
|
|
5179
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5180
|
+
"span",
|
|
5181
|
+
{
|
|
5182
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5183
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5184
|
+
},
|
|
5185
|
+
index2
|
|
5186
|
+
)) }, materialKey) })
|
|
5187
|
+
] })
|
|
5188
|
+
}
|
|
5189
|
+
) }) }, index);
|
|
5190
|
+
}) })
|
|
5191
|
+
] })
|
|
5190
5192
|
]
|
|
5191
5193
|
}
|
|
5192
5194
|
);
|
|
@@ -5472,7 +5474,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5472
5474
|
}
|
|
5473
5475
|
};
|
|
5474
5476
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5475
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5476
5478
|
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5477
5479
|
"div",
|
|
5478
5480
|
{
|
|
@@ -5532,7 +5534,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5532
5534
|
}
|
|
5533
5535
|
),
|
|
5534
5536
|
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
5535
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-
|
|
5537
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-shrink-0 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
|
|
5536
5538
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5537
5539
|
"div",
|
|
5538
5540
|
{
|
|
@@ -5571,9 +5573,9 @@ var GroupingActivityMaterialContent = ({
|
|
|
5571
5573
|
index
|
|
5572
5574
|
);
|
|
5573
5575
|
}) }),
|
|
5574
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {})
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {}) })
|
|
5575
5577
|
] }) : null,
|
|
5576
|
-
Object.keys(displayAnswerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5578
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5577
5579
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5578
5580
|
"div",
|
|
5579
5581
|
{
|
|
@@ -5657,7 +5659,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5657
5659
|
) }) })
|
|
5658
5660
|
}
|
|
5659
5661
|
) }) })
|
|
5660
|
-
] }, index))
|
|
5662
|
+
] }, index)) })
|
|
5661
5663
|
] });
|
|
5662
5664
|
};
|
|
5663
5665
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
@@ -5670,7 +5672,8 @@ var GroupingActivityContent = ({
|
|
|
5670
5672
|
canAnswerQuestion,
|
|
5671
5673
|
changeAnswer,
|
|
5672
5674
|
isPreview,
|
|
5673
|
-
showCorrectAnswer
|
|
5675
|
+
showCorrectAnswer,
|
|
5676
|
+
isFullScreen
|
|
5674
5677
|
}) => {
|
|
5675
5678
|
const contentMap = parseContentMapFromData(data);
|
|
5676
5679
|
const groupingBodyMap = parseBodyMapFromData(data, "GROUPING");
|
|
@@ -5684,26 +5687,39 @@ var GroupingActivityContent = ({
|
|
|
5684
5687
|
}
|
|
5685
5688
|
changeAnswer(answerMap2);
|
|
5686
5689
|
};
|
|
5687
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
5688
5691
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5689
|
-
|
|
5692
|
+
"div",
|
|
5690
5693
|
{
|
|
5691
|
-
|
|
5692
|
-
|
|
5694
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
5695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5696
|
+
ActivityBodyContent_default,
|
|
5697
|
+
{
|
|
5698
|
+
bodyMap: groupingBodyMap,
|
|
5699
|
+
templateType: "GROUPING"
|
|
5700
|
+
}
|
|
5701
|
+
)
|
|
5693
5702
|
}
|
|
5694
5703
|
),
|
|
5695
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {}),
|
|
5704
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {}) }),
|
|
5705
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VerticalDividerLine_default, {}) }),
|
|
5696
5706
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5697
|
-
|
|
5707
|
+
"div",
|
|
5698
5708
|
{
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5709
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
5710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5711
|
+
GroupingActivityMaterialContent_default,
|
|
5712
|
+
{
|
|
5713
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
5714
|
+
answerMap,
|
|
5715
|
+
materialMap: groupingMaterialMap,
|
|
5716
|
+
contentMap,
|
|
5717
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
5718
|
+
onChange: handleGroupingAnswerOnChange,
|
|
5719
|
+
isPreview,
|
|
5720
|
+
showCorrectAnswer
|
|
5721
|
+
}
|
|
5722
|
+
)
|
|
5707
5723
|
}
|
|
5708
5724
|
)
|
|
5709
5725
|
] });
|
|
@@ -5901,7 +5917,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5901
5917
|
}
|
|
5902
5918
|
};
|
|
5903
5919
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5904
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5905
5921
|
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5906
5922
|
"div",
|
|
5907
5923
|
{
|
|
@@ -6007,7 +6023,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
6007
6023
|
),
|
|
6008
6024
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}) })
|
|
6009
6025
|
] }) : null,
|
|
6010
|
-
Object.keys(displayAnswerMap).map((answerMapKey, index) => {
|
|
6026
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => {
|
|
6011
6027
|
const learnerAnswerState = checkAnswerState(
|
|
6012
6028
|
materialMap[answerMapKey],
|
|
6013
6029
|
displayAnswerMap[answerMapKey]
|
|
@@ -6073,7 +6089,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
6073
6089
|
}
|
|
6074
6090
|
) })
|
|
6075
6091
|
] }, index);
|
|
6076
|
-
})
|
|
6092
|
+
}) })
|
|
6077
6093
|
] });
|
|
6078
6094
|
};
|
|
6079
6095
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
@@ -6098,28 +6114,40 @@ var MatchingActivityContent = ({
|
|
|
6098
6114
|
changeAnswer(answerMap2);
|
|
6099
6115
|
};
|
|
6100
6116
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
6101
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6102
|
-
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6118
|
+
"div",
|
|
6103
6119
|
{
|
|
6104
|
-
|
|
6105
|
-
|
|
6120
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
6121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6122
|
+
ActivityBodyContent_default,
|
|
6123
|
+
{
|
|
6124
|
+
bodyMap: matchingBodyMap,
|
|
6125
|
+
templateType: "MATCHING"
|
|
6126
|
+
}
|
|
6127
|
+
)
|
|
6106
6128
|
}
|
|
6107
|
-
)
|
|
6129
|
+
),
|
|
6108
6130
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) }),
|
|
6109
6131
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerticalDividerLine_default, {}) }),
|
|
6110
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6111
|
-
|
|
6132
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6133
|
+
"div",
|
|
6112
6134
|
{
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6135
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
6136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6137
|
+
MatchingActivityMaterialContent_default,
|
|
6138
|
+
{
|
|
6139
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
6140
|
+
answerMap,
|
|
6141
|
+
materialMap: matchingMaterialMap,
|
|
6142
|
+
contentMap,
|
|
6143
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
6144
|
+
onChange: handleMatchingAnswerOnChange,
|
|
6145
|
+
isPreview,
|
|
6146
|
+
showCorrectAnswer
|
|
6147
|
+
}
|
|
6148
|
+
)
|
|
6121
6149
|
}
|
|
6122
|
-
)
|
|
6150
|
+
)
|
|
6123
6151
|
] });
|
|
6124
6152
|
};
|
|
6125
6153
|
var MatchingActivityContent_default = MatchingActivityContent;
|
|
@@ -6165,11 +6193,11 @@ var MCMAActivityMaterialContent = ({
|
|
|
6165
6193
|
return "INCORRECT";
|
|
6166
6194
|
};
|
|
6167
6195
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
6168
|
-
return Object.keys(materialMap).map((materialKey, index) => {
|
|
6169
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-
|
|
6170
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
6171
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:
|
|
6172
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
6196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
6197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
6198
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
6199
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DividerLine_default, {}) }),
|
|
6200
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
6173
6201
|
(materialSubKey, index2) => {
|
|
6174
6202
|
const foundAnswer = displayAnswerMap[materialKey].find(
|
|
6175
6203
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -6232,9 +6260,9 @@ var MCMAActivityMaterialContent = ({
|
|
|
6232
6260
|
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6233
6261
|
},
|
|
6234
6262
|
index2
|
|
6235
|
-
)) }, materialKey)
|
|
6263
|
+
)) }, materialKey) })
|
|
6236
6264
|
] }) }, index);
|
|
6237
|
-
});
|
|
6265
|
+
}) });
|
|
6238
6266
|
};
|
|
6239
6267
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
6240
6268
|
|
|
@@ -6320,11 +6348,11 @@ var MCSAActivityMaterialContent = ({
|
|
|
6320
6348
|
return "INCORRECT";
|
|
6321
6349
|
};
|
|
6322
6350
|
const correctAnswer = retrieveCorrectAnswer();
|
|
6323
|
-
return Object.keys(materialMap).map((materialKey, index) => {
|
|
6324
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-
|
|
6325
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6326
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:
|
|
6327
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
6352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
6353
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6354
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DividerLine_default, {}) }),
|
|
6355
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6328
6356
|
"div",
|
|
6329
6357
|
{
|
|
6330
6358
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -6387,9 +6415,9 @@ var MCSAActivityMaterialContent = ({
|
|
|
6387
6415
|
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6388
6416
|
},
|
|
6389
6417
|
index2
|
|
6390
|
-
)) })
|
|
6418
|
+
)) }) })
|
|
6391
6419
|
] }) }, index);
|
|
6392
|
-
});
|
|
6420
|
+
}) });
|
|
6393
6421
|
};
|
|
6394
6422
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
6395
6423
|
|
|
@@ -6603,11 +6631,11 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6603
6631
|
}
|
|
6604
6632
|
) });
|
|
6605
6633
|
};
|
|
6606
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.
|
|
6607
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6608
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "hidden md:
|
|
6609
|
-
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null
|
|
6610
|
-
] })
|
|
6634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
6635
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DividerLine_default, {}) }),
|
|
6637
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null })
|
|
6638
|
+
] });
|
|
6611
6639
|
};
|
|
6612
6640
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
6613
6641
|
|
|
@@ -6789,7 +6817,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6789
6817
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6790
6818
|
"div",
|
|
6791
6819
|
{
|
|
6792
|
-
className: "flex flex-
|
|
6820
|
+
className: "flex flex-col h-full",
|
|
6793
6821
|
onMouseMove: handleMouseMove,
|
|
6794
6822
|
onMouseUp: handleMouseUp,
|
|
6795
6823
|
children: [
|
|
@@ -6851,7 +6879,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6851
6879
|
) })
|
|
6852
6880
|
}
|
|
6853
6881
|
),
|
|
6854
|
-
Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
6882
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
6855
6883
|
const learnerAnswerState = checkAnswerState(
|
|
6856
6884
|
displayAnswerMap[materialKey] + "",
|
|
6857
6885
|
index + ""
|
|
@@ -6910,7 +6938,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6910
6938
|
]
|
|
6911
6939
|
}
|
|
6912
6940
|
) }, index);
|
|
6913
|
-
})
|
|
6941
|
+
}) })
|
|
6914
6942
|
]
|
|
6915
6943
|
}
|
|
6916
6944
|
);
|
|
@@ -6939,28 +6967,40 @@ var OrderingActivityContent = ({
|
|
|
6939
6967
|
changeAnswer(answerMap2);
|
|
6940
6968
|
};
|
|
6941
6969
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row flex-wrap h-full", children: [
|
|
6942
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6943
|
-
|
|
6970
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6971
|
+
"div",
|
|
6944
6972
|
{
|
|
6945
|
-
|
|
6946
|
-
|
|
6973
|
+
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
6974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6975
|
+
ActivityBodyContent_default,
|
|
6976
|
+
{
|
|
6977
|
+
bodyMap: orderingBodyMap,
|
|
6978
|
+
templateType: "ORDERING"
|
|
6979
|
+
}
|
|
6980
|
+
)
|
|
6947
6981
|
}
|
|
6948
|
-
)
|
|
6982
|
+
),
|
|
6949
6983
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}) }),
|
|
6950
6984
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VerticalDividerLine_default, {}) }),
|
|
6951
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6952
|
-
|
|
6985
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6986
|
+
"div",
|
|
6953
6987
|
{
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6988
|
+
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
6989
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6990
|
+
OrderingActivityMaterialContent_default,
|
|
6991
|
+
{
|
|
6992
|
+
uniqueValue: JSON.stringify(data.contentMap),
|
|
6993
|
+
answerMap,
|
|
6994
|
+
materialMap: orderingMaterialMap,
|
|
6995
|
+
contentMap,
|
|
6996
|
+
checkCanAnswerQuestion: canAnswerQuestion,
|
|
6997
|
+
onChange: handleOrderingAnswerOnChange,
|
|
6998
|
+
isPreview,
|
|
6999
|
+
showCorrectAnswer
|
|
7000
|
+
}
|
|
7001
|
+
)
|
|
6962
7002
|
}
|
|
6963
|
-
)
|
|
7003
|
+
)
|
|
6964
7004
|
] });
|
|
6965
7005
|
};
|
|
6966
7006
|
var OrderingActivityContent_default = OrderingActivityContent;
|
|
@@ -7005,14 +7045,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7005
7045
|
}
|
|
7006
7046
|
return "INCORRECT";
|
|
7007
7047
|
};
|
|
7008
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "", children: [
|
|
7009
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
7010
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "hidden md:
|
|
7011
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
7048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
7049
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
7050
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DividerLine_default, {}) }),
|
|
7051
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-row justify-end items-center gap-x-2 flex-shrink-0", children: [
|
|
7012
7052
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
7013
7053
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
7014
7054
|
] }),
|
|
7015
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
7055
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
7016
7056
|
const correctAnswer = materialMap.trueList.find(
|
|
7017
7057
|
(trueItem) => trueItem === shuffleOption
|
|
7018
7058
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -7083,7 +7123,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7083
7123
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: item }) }),
|
|
7084
7124
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
7085
7125
|
] }))
|
|
7086
|
-
] })
|
|
7126
|
+
] }) })
|
|
7087
7127
|
] });
|
|
7088
7128
|
};
|
|
7089
7129
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|