catchup-library-web 1.20.34 → 1.20.36
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 +626 -598
- package/dist/index.mjs +540 -512
- package/package.json +1 -1
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +291 -203
- package/src/components/activities/material-contents/GroupingActivityMaterialContent2.tsx +362 -0
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +246 -172
- package/src/components/activities/material-contents/MatchingActivityMaterialContent2.tsx +350 -0
package/dist/index.js
CHANGED
|
@@ -5275,71 +5275,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5275
5275
|
var FillInTheBlanksActivityContent_default = FillInTheBlanksActivityContent;
|
|
5276
5276
|
|
|
5277
5277
|
// src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
|
|
5278
|
-
var
|
|
5279
|
-
var import_react_dnd3 = require("react-dnd");
|
|
5278
|
+
var import_react20 = require("react");
|
|
5280
5279
|
var import_react_katex5 = require("react-katex");
|
|
5281
|
-
|
|
5282
|
-
// src/components/dnds/DraggableItem.tsx
|
|
5283
|
-
var import_react_dnd = require("react-dnd");
|
|
5284
5280
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5285
|
-
var DraggableItem = ({
|
|
5286
|
-
item,
|
|
5287
|
-
type,
|
|
5288
|
-
component,
|
|
5289
|
-
moveCardHandler
|
|
5290
|
-
}) => {
|
|
5291
|
-
const [{ isDragging }, drag] = (0, import_react_dnd.useDrag)({
|
|
5292
|
-
type,
|
|
5293
|
-
item,
|
|
5294
|
-
end: (item2, monitor) => {
|
|
5295
|
-
const dropResult = monitor.getDropResult();
|
|
5296
|
-
if (dropResult) {
|
|
5297
|
-
moveCardHandler();
|
|
5298
|
-
}
|
|
5299
|
-
},
|
|
5300
|
-
collect: (monitor) => ({
|
|
5301
|
-
isDragging: monitor.isDragging()
|
|
5302
|
-
})
|
|
5303
|
-
});
|
|
5304
|
-
const opacity = isDragging ? 0.4 : 1;
|
|
5305
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5306
|
-
"div",
|
|
5307
|
-
{
|
|
5308
|
-
className: `${isDragging ? "w-[0px] opacity-0" : "opacity-100"} transition-all duration-500`,
|
|
5309
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref: drag, className: "", style: { opacity }, children: component })
|
|
5310
|
-
}
|
|
5311
|
-
);
|
|
5312
|
-
};
|
|
5313
|
-
var DraggableItem_default = DraggableItem;
|
|
5314
|
-
|
|
5315
|
-
// src/components/dnds/DroppableItem.tsx
|
|
5316
|
-
var import_react20 = require("react");
|
|
5317
|
-
var import_react_dnd2 = require("react-dnd");
|
|
5318
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5319
|
-
var DroppableItem = ({
|
|
5320
|
-
item,
|
|
5321
|
-
type,
|
|
5322
|
-
component,
|
|
5323
|
-
dropRef,
|
|
5324
|
-
target,
|
|
5325
|
-
setTarget
|
|
5326
|
-
}) => {
|
|
5327
|
-
const ref = (0, import_react20.useRef)(null);
|
|
5328
|
-
const [, drop] = (0, import_react_dnd2.useDrop)({
|
|
5329
|
-
accept: type,
|
|
5330
|
-
hover() {
|
|
5331
|
-
if (item.index !== null && target !== item.index) {
|
|
5332
|
-
setTarget(item.index);
|
|
5333
|
-
}
|
|
5334
|
-
}
|
|
5335
|
-
});
|
|
5336
|
-
dropRef(drop(ref));
|
|
5337
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `w-full transition-all duration-500 h-full`, ref, children: component });
|
|
5338
|
-
};
|
|
5339
|
-
var DroppableItem_default = DroppableItem;
|
|
5340
|
-
|
|
5341
|
-
// src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
|
|
5342
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5343
5281
|
var GroupingActivityMaterialContent = ({
|
|
5344
5282
|
uniqueValue,
|
|
5345
5283
|
answer,
|
|
@@ -5350,21 +5288,21 @@ var GroupingActivityMaterialContent = ({
|
|
|
5350
5288
|
isPreview,
|
|
5351
5289
|
showCorrectAnswer
|
|
5352
5290
|
}) => {
|
|
5353
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5354
|
-
const [
|
|
5355
|
-
const [
|
|
5356
|
-
const [
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5291
|
+
const [selectedValue, setSelectedValue] = (0, import_react20.useState)(null);
|
|
5292
|
+
const [draggedValue, setDraggedValue] = (0, import_react20.useState)(null);
|
|
5293
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react20.useState)(null);
|
|
5294
|
+
const [draggedElement, setDraggedElement] = (0, import_react20.useState)(
|
|
5295
|
+
null
|
|
5296
|
+
);
|
|
5297
|
+
const [isShuffled, setIsShuffled] = (0, import_react20.useState)(false);
|
|
5298
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react20.useState)([]);
|
|
5299
|
+
const dragElementRef = (0, import_react20.useRef)(null);
|
|
5300
|
+
const [touchPosition, setTouchPosition] = (0, import_react20.useState)({
|
|
5301
|
+
x: 0,
|
|
5302
|
+
y: 0
|
|
5365
5303
|
});
|
|
5366
|
-
const ref = (0,
|
|
5367
|
-
(0,
|
|
5304
|
+
const ref = (0, import_react20.useRef)(null);
|
|
5305
|
+
(0, import_react20.useEffect)(() => {
|
|
5368
5306
|
const shuffleArray2 = (array) => {
|
|
5369
5307
|
if (!isShuffled) {
|
|
5370
5308
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5384,13 +5322,13 @@ var GroupingActivityMaterialContent = ({
|
|
|
5384
5322
|
}
|
|
5385
5323
|
});
|
|
5386
5324
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5387
|
-
}, []);
|
|
5388
|
-
(0,
|
|
5325
|
+
}, [materialMap, isShuffled]);
|
|
5326
|
+
(0, import_react20.useEffect)(() => {
|
|
5389
5327
|
if (!showCorrectAnswer) return;
|
|
5390
5328
|
answer.data.find(
|
|
5391
5329
|
(answerData) => answerData.type === "GROUPING"
|
|
5392
5330
|
).answerMap = materialMap;
|
|
5393
|
-
}, [showCorrectAnswer]);
|
|
5331
|
+
}, [showCorrectAnswer, answer, materialMap]);
|
|
5394
5332
|
const retrieveAnswerMap = () => {
|
|
5395
5333
|
const foundIndex = answer.data.findIndex(
|
|
5396
5334
|
(answerData) => answerData.type === "GROUPING"
|
|
@@ -5421,56 +5359,120 @@ var GroupingActivityMaterialContent = ({
|
|
|
5421
5359
|
}
|
|
5422
5360
|
return "INCORRECT";
|
|
5423
5361
|
};
|
|
5424
|
-
const
|
|
5425
|
-
if (checkCanAnswerQuestion())
|
|
5426
|
-
|
|
5362
|
+
const handleMouseDown = (e, materialValue) => {
|
|
5363
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5364
|
+
e.preventDefault();
|
|
5365
|
+
setDraggedValue(materialValue);
|
|
5366
|
+
setSelectedValue(null);
|
|
5367
|
+
};
|
|
5368
|
+
const handleMouseUp = () => {
|
|
5369
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5370
|
+
onChange(answer, dropTargetKey, draggedValue, null);
|
|
5371
|
+
}
|
|
5372
|
+
setDraggedValue(null);
|
|
5373
|
+
setDropTargetKey(null);
|
|
5374
|
+
};
|
|
5375
|
+
const handleTouchStart = (e, materialValue, element) => {
|
|
5376
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5377
|
+
const touch = e.touches[0];
|
|
5378
|
+
setDraggedValue(materialValue);
|
|
5379
|
+
setDraggedElement(element);
|
|
5380
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5381
|
+
setSelectedValue(null);
|
|
5382
|
+
};
|
|
5383
|
+
const handleTouchMove = (e) => {
|
|
5384
|
+
if (!draggedValue) return;
|
|
5385
|
+
const touch = e.touches[0];
|
|
5386
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5387
|
+
const elementUnder = document.elementFromPoint(
|
|
5388
|
+
touch.clientX,
|
|
5389
|
+
touch.clientY
|
|
5390
|
+
);
|
|
5391
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-grouping-drop-zone]");
|
|
5392
|
+
if (dropZone) {
|
|
5393
|
+
const dropKey = dropZone.getAttribute("data-grouping-drop-zone");
|
|
5394
|
+
setDropTargetKey(dropKey);
|
|
5395
|
+
} else {
|
|
5396
|
+
setDropTargetKey(null);
|
|
5397
|
+
}
|
|
5398
|
+
};
|
|
5399
|
+
const handleTouchEnd = () => {
|
|
5400
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5401
|
+
onChange(answer, dropTargetKey, draggedValue, null);
|
|
5402
|
+
}
|
|
5403
|
+
setDraggedValue(null);
|
|
5404
|
+
setDropTargetKey(null);
|
|
5405
|
+
setDraggedElement(null);
|
|
5406
|
+
};
|
|
5407
|
+
const handleSelectItem = (materialValue) => {
|
|
5408
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5409
|
+
setSelectedValue(materialValue);
|
|
5410
|
+
setDraggedValue(null);
|
|
5411
|
+
};
|
|
5412
|
+
const handleDropZoneClick = (answerMapKey) => {
|
|
5413
|
+
if (selectedValue !== null) {
|
|
5414
|
+
onChange(answer, answerMapKey, selectedValue, null);
|
|
5427
5415
|
setSelectedValue(null);
|
|
5428
5416
|
}
|
|
5429
5417
|
};
|
|
5430
5418
|
const answerMap = retrieveAnswerMap();
|
|
5431
5419
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5432
|
-
return /* @__PURE__ */ (0,
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { onMouseUp: handleMouseUp, children: [
|
|
5421
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5422
|
+
"div",
|
|
5423
|
+
{
|
|
5424
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5425
|
+
style: {
|
|
5426
|
+
left: `${touchPosition.x}px`,
|
|
5427
|
+
top: `${touchPosition.y}px`,
|
|
5428
|
+
transform: "translate(-50%, -50%)"
|
|
5429
|
+
},
|
|
5430
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5431
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5432
|
+
"span",
|
|
5433
|
+
{
|
|
5434
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5435
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5436
|
+
},
|
|
5437
|
+
index
|
|
5438
|
+
)
|
|
5439
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5440
|
+
ShowMaterialMediaByContentType_default,
|
|
5441
|
+
{
|
|
5442
|
+
contentType: contentMap.type,
|
|
5443
|
+
src: draggedValue,
|
|
5444
|
+
canFullScreen: false
|
|
5445
|
+
},
|
|
5446
|
+
`${uniqueValue}-drag`
|
|
5447
|
+
) })
|
|
5448
|
+
}
|
|
5449
|
+
),
|
|
5450
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
5451
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
|
|
5452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5453
|
+
"div",
|
|
5437
5454
|
{
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5455
|
+
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5456
|
+
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5457
|
+
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5458
|
+
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5459
|
+
onTouchMove: handleTouchMove,
|
|
5460
|
+
onTouchEnd: handleTouchEnd,
|
|
5461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5441
5462
|
"div",
|
|
5442
5463
|
{
|
|
5443
5464
|
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`,
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
setSelectedValue(materialValue);
|
|
5447
|
-
}
|
|
5448
|
-
},
|
|
5449
|
-
onTouchEnd: () => {
|
|
5450
|
-
if (checkCanAnswerQuestion()) {
|
|
5451
|
-
setSelectedValue(materialValue);
|
|
5452
|
-
}
|
|
5453
|
-
},
|
|
5454
|
-
onMouseUp: () => {
|
|
5455
|
-
if (checkCanAnswerQuestion()) {
|
|
5456
|
-
setSelectedValue(null);
|
|
5457
|
-
}
|
|
5458
|
-
},
|
|
5459
|
-
onTouchStart: () => {
|
|
5460
|
-
if (checkCanAnswerQuestion()) {
|
|
5461
|
-
setSelectedValue(null);
|
|
5462
|
-
}
|
|
5463
|
-
},
|
|
5464
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5465
|
+
onClick: () => handleSelectItem(materialValue),
|
|
5466
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5465
5467
|
materialValue
|
|
5466
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5468
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5467
5469
|
"span",
|
|
5468
5470
|
{
|
|
5469
5471
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5470
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5472
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5471
5473
|
},
|
|
5472
5474
|
index2
|
|
5473
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
5475
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5474
5476
|
ShowMaterialMediaByContentType_default,
|
|
5475
5477
|
{
|
|
5476
5478
|
contentType: contentMap.type,
|
|
@@ -5480,109 +5482,94 @@ var GroupingActivityMaterialContent = ({
|
|
|
5480
5482
|
`${uniqueValue}-${index}`
|
|
5481
5483
|
)
|
|
5482
5484
|
}
|
|
5483
|
-
)
|
|
5484
|
-
moveCardHandler: () => {
|
|
5485
|
-
if (!selectedTargetKey) return;
|
|
5486
|
-
if (!selectedValue) return;
|
|
5487
|
-
handleGroupingActivityItemOnChange(
|
|
5488
|
-
selectedTargetKey,
|
|
5489
|
-
selectedValue
|
|
5490
|
-
);
|
|
5491
|
-
}
|
|
5485
|
+
)
|
|
5492
5486
|
},
|
|
5493
5487
|
index
|
|
5494
5488
|
);
|
|
5495
5489
|
}) }),
|
|
5496
|
-
/* @__PURE__ */ (0,
|
|
5490
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DividerLine_default, {})
|
|
5497
5491
|
] }) : null,
|
|
5498
|
-
/* @__PURE__ */ (0,
|
|
5499
|
-
/* @__PURE__ */ (0,
|
|
5492
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5493
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5500
5494
|
"div",
|
|
5501
5495
|
{
|
|
5502
5496
|
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`,
|
|
5503
|
-
children: /* @__PURE__ */ (0,
|
|
5504
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
5497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5498
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5505
5499
|
"span",
|
|
5506
5500
|
{
|
|
5507
5501
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5508
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5502
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5509
5503
|
},
|
|
5510
5504
|
index2
|
|
5511
5505
|
)
|
|
5512
5506
|
) }) })
|
|
5513
5507
|
}
|
|
5514
5508
|
) }),
|
|
5515
|
-
/* @__PURE__ */ (0,
|
|
5516
|
-
/* @__PURE__ */ (0,
|
|
5509
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5510
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1 min-w-0", ref, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-full py-3", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5517
5511
|
"div",
|
|
5518
5512
|
{
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5513
|
+
"data-grouping-drop-zone": answerMapKey,
|
|
5514
|
+
onMouseEnter: () => draggedValue && setDropTargetKey(answerMapKey),
|
|
5515
|
+
onMouseLeave: () => setDropTargetKey(null),
|
|
5516
|
+
onClick: () => handleDropZoneClick(answerMapKey),
|
|
5517
|
+
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`,
|
|
5518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-full w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-row items-center gap-2 w-max h-full", children: answerMap[answerMapKey].map(
|
|
5519
|
+
(answerMapValue, answerMapIndex) => {
|
|
5520
|
+
const learnerAnswerState = checkAnswerState(
|
|
5521
|
+
materialMap[answerMapKey],
|
|
5522
|
+
answerMapValue
|
|
5523
|
+
);
|
|
5524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5525
|
+
"div",
|
|
5526
|
+
{
|
|
5527
|
+
className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"}`,
|
|
5528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5535
5529
|
"div",
|
|
5536
5530
|
{
|
|
5537
|
-
className: `${
|
|
5538
|
-
|
|
5539
|
-
|
|
5531
|
+
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`,
|
|
5532
|
+
onClick: (e) => {
|
|
5533
|
+
e.stopPropagation();
|
|
5534
|
+
if (checkCanAnswerQuestion()) {
|
|
5535
|
+
onChange(
|
|
5536
|
+
answer,
|
|
5537
|
+
answerMapKey,
|
|
5538
|
+
null,
|
|
5539
|
+
answerMapIndex
|
|
5540
|
+
);
|
|
5541
|
+
setSelectedValue(null);
|
|
5542
|
+
}
|
|
5543
|
+
},
|
|
5544
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5545
|
+
answerMapValue
|
|
5546
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5547
|
+
"span",
|
|
5540
5548
|
{
|
|
5541
|
-
className: `${
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
if (checkCanAnswerQuestion()) {
|
|
5545
|
-
onChange(
|
|
5546
|
-
answer,
|
|
5547
|
-
answerMapKey,
|
|
5548
|
-
null,
|
|
5549
|
-
answerMapIndex
|
|
5550
|
-
);
|
|
5551
|
-
setSelectedValue(null);
|
|
5552
|
-
}
|
|
5553
|
-
},
|
|
5554
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 min-w-[200px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5555
|
-
answerMapValue
|
|
5556
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5557
|
-
"span",
|
|
5549
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5550
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5551
|
+
import_react_katex5.InlineMath,
|
|
5558
5552
|
{
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
src: answerMapValue,
|
|
5573
|
-
canFullScreen: false
|
|
5574
|
-
},
|
|
5575
|
-
`${uniqueValue}-${answerMapIndex}`
|
|
5576
|
-
)
|
|
5577
|
-
}
|
|
5553
|
+
math: inputPart.value
|
|
5554
|
+
}
|
|
5555
|
+
) }) : inputPart.value
|
|
5556
|
+
},
|
|
5557
|
+
index2
|
|
5558
|
+
)) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5559
|
+
ShowMaterialMediaByContentType_default,
|
|
5560
|
+
{
|
|
5561
|
+
contentType: contentMap.type,
|
|
5562
|
+
src: answerMapValue,
|
|
5563
|
+
canFullScreen: false
|
|
5564
|
+
},
|
|
5565
|
+
`${uniqueValue}-${answerMapIndex}`
|
|
5578
5566
|
)
|
|
5579
5567
|
}
|
|
5580
|
-
)
|
|
5568
|
+
)
|
|
5581
5569
|
}
|
|
5582
|
-
) }
|
|
5583
|
-
}
|
|
5584
|
-
|
|
5585
|
-
)
|
|
5570
|
+
) }, answerMapIndex);
|
|
5571
|
+
}
|
|
5572
|
+
) }) })
|
|
5586
5573
|
}
|
|
5587
5574
|
) }) })
|
|
5588
5575
|
] }, index)) })
|
|
@@ -5591,7 +5578,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5591
5578
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5592
5579
|
|
|
5593
5580
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5594
|
-
var
|
|
5581
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5595
5582
|
var GroupingActivityContent = ({
|
|
5596
5583
|
answer,
|
|
5597
5584
|
data,
|
|
@@ -5616,16 +5603,16 @@ var GroupingActivityContent = ({
|
|
|
5616
5603
|
}
|
|
5617
5604
|
changeAnswer(answer2);
|
|
5618
5605
|
};
|
|
5619
|
-
return /* @__PURE__ */ (0,
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
5607
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5621
5608
|
ActivityBodyContent_default,
|
|
5622
5609
|
{
|
|
5623
5610
|
bodyMap: groupingBodyMap,
|
|
5624
5611
|
templateType: "GROUPING"
|
|
5625
5612
|
}
|
|
5626
5613
|
),
|
|
5627
|
-
/* @__PURE__ */ (0,
|
|
5628
|
-
/* @__PURE__ */ (0,
|
|
5614
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {}),
|
|
5615
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5629
5616
|
GroupingActivityMaterialContent_default,
|
|
5630
5617
|
{
|
|
5631
5618
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5643,10 +5630,9 @@ var GroupingActivityContent = ({
|
|
|
5643
5630
|
var GroupingActivityContent_default = GroupingActivityContent;
|
|
5644
5631
|
|
|
5645
5632
|
// src/components/activities/material-contents/MatchingActivityMaterialContent.tsx
|
|
5646
|
-
var
|
|
5647
|
-
var import_react_dnd4 = require("react-dnd");
|
|
5633
|
+
var import_react21 = require("react");
|
|
5648
5634
|
var import_react_katex6 = require("react-katex");
|
|
5649
|
-
var
|
|
5635
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5650
5636
|
var MatchingActivityMaterialContent = ({
|
|
5651
5637
|
uniqueValue,
|
|
5652
5638
|
answer,
|
|
@@ -5657,21 +5643,21 @@ var MatchingActivityMaterialContent = ({
|
|
|
5657
5643
|
isPreview,
|
|
5658
5644
|
showCorrectAnswer
|
|
5659
5645
|
}) => {
|
|
5660
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5661
|
-
const [
|
|
5662
|
-
const [
|
|
5663
|
-
const [
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5646
|
+
const [selectedValue, setSelectedValue] = (0, import_react21.useState)(null);
|
|
5647
|
+
const [draggedValue, setDraggedValue] = (0, import_react21.useState)(null);
|
|
5648
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react21.useState)(null);
|
|
5649
|
+
const [draggedElement, setDraggedElement] = (0, import_react21.useState)(
|
|
5650
|
+
null
|
|
5651
|
+
);
|
|
5652
|
+
const [isShuffled, setIsShuffled] = (0, import_react21.useState)(false);
|
|
5653
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react21.useState)([]);
|
|
5654
|
+
const dragElementRef = (0, import_react21.useRef)(null);
|
|
5655
|
+
const [touchPosition, setTouchPosition] = (0, import_react21.useState)({
|
|
5656
|
+
x: 0,
|
|
5657
|
+
y: 0
|
|
5672
5658
|
});
|
|
5673
|
-
const itemsRef = (0,
|
|
5674
|
-
(0,
|
|
5659
|
+
const itemsRef = (0, import_react21.useRef)(null);
|
|
5660
|
+
(0, import_react21.useEffect)(() => {
|
|
5675
5661
|
const shuffleArray2 = (array) => {
|
|
5676
5662
|
if (!isShuffled) {
|
|
5677
5663
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5689,13 +5675,13 @@ var MatchingActivityMaterialContent = ({
|
|
|
5689
5675
|
materialList.push(materialMap[materialKey]);
|
|
5690
5676
|
});
|
|
5691
5677
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5692
|
-
}, []);
|
|
5693
|
-
(0,
|
|
5678
|
+
}, [materialMap, isShuffled]);
|
|
5679
|
+
(0, import_react21.useEffect)(() => {
|
|
5694
5680
|
if (!showCorrectAnswer) return;
|
|
5695
5681
|
answer.data.find(
|
|
5696
5682
|
(answerData) => answerData.type === "MATCHING"
|
|
5697
5683
|
).answerMap = materialMap;
|
|
5698
|
-
}, [showCorrectAnswer]);
|
|
5684
|
+
}, [showCorrectAnswer, answer, materialMap]);
|
|
5699
5685
|
const retrieveAnswerMap = () => {
|
|
5700
5686
|
const foundIndex = answer.data.findIndex(
|
|
5701
5687
|
(answerData) => answerData.type === "MATCHING"
|
|
@@ -5719,60 +5705,124 @@ var MatchingActivityMaterialContent = ({
|
|
|
5719
5705
|
}
|
|
5720
5706
|
return "INCORRECT";
|
|
5721
5707
|
};
|
|
5722
|
-
const
|
|
5723
|
-
if (checkCanAnswerQuestion())
|
|
5724
|
-
|
|
5708
|
+
const handleMouseDown = (e, materialValue) => {
|
|
5709
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5710
|
+
e.preventDefault();
|
|
5711
|
+
setDraggedValue(materialValue);
|
|
5712
|
+
setSelectedValue(null);
|
|
5713
|
+
};
|
|
5714
|
+
const handleMouseUp = () => {
|
|
5715
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5716
|
+
onChange(answer, dropTargetKey, draggedValue);
|
|
5717
|
+
}
|
|
5718
|
+
setDraggedValue(null);
|
|
5719
|
+
setDropTargetKey(null);
|
|
5720
|
+
};
|
|
5721
|
+
const handleTouchStart = (e, materialValue, element) => {
|
|
5722
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5723
|
+
const touch = e.touches[0];
|
|
5724
|
+
setDraggedValue(materialValue);
|
|
5725
|
+
setDraggedElement(element);
|
|
5726
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5727
|
+
setSelectedValue(null);
|
|
5728
|
+
};
|
|
5729
|
+
const handleTouchMove = (e) => {
|
|
5730
|
+
if (!draggedValue) return;
|
|
5731
|
+
const touch = e.touches[0];
|
|
5732
|
+
setTouchPosition({ x: touch.clientX, y: touch.clientY });
|
|
5733
|
+
const elementUnder = document.elementFromPoint(
|
|
5734
|
+
touch.clientX,
|
|
5735
|
+
touch.clientY
|
|
5736
|
+
);
|
|
5737
|
+
const dropZone = elementUnder == null ? void 0 : elementUnder.closest("[data-matching-drop-zone]");
|
|
5738
|
+
if (dropZone) {
|
|
5739
|
+
const dropKey = dropZone.getAttribute("data-matching-drop-zone");
|
|
5740
|
+
setDropTargetKey(dropKey);
|
|
5741
|
+
} else {
|
|
5742
|
+
setDropTargetKey(null);
|
|
5743
|
+
}
|
|
5744
|
+
};
|
|
5745
|
+
const handleTouchEnd = () => {
|
|
5746
|
+
if (dropTargetKey !== null && draggedValue !== null) {
|
|
5747
|
+
onChange(answer, dropTargetKey, draggedValue);
|
|
5748
|
+
}
|
|
5749
|
+
setDraggedValue(null);
|
|
5750
|
+
setDropTargetKey(null);
|
|
5751
|
+
setDraggedElement(null);
|
|
5752
|
+
};
|
|
5753
|
+
const handleSelectItem = (materialValue) => {
|
|
5754
|
+
if (!checkCanAnswerQuestion()) return;
|
|
5755
|
+
setSelectedValue(materialValue);
|
|
5756
|
+
setDraggedValue(null);
|
|
5757
|
+
};
|
|
5758
|
+
const handleDropZoneClick = (answerMapKey) => {
|
|
5759
|
+
if (selectedValue !== null) {
|
|
5760
|
+
onChange(answer, answerMapKey, selectedValue);
|
|
5725
5761
|
setSelectedValue(null);
|
|
5726
5762
|
}
|
|
5727
5763
|
};
|
|
5728
5764
|
const answerMap = retrieveAnswerMap();
|
|
5729
5765
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5730
|
-
return /* @__PURE__ */ (0,
|
|
5731
|
-
|
|
5732
|
-
|
|
5766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { onMouseUp: handleMouseUp, children: [
|
|
5767
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5768
|
+
"div",
|
|
5769
|
+
{
|
|
5770
|
+
className: "fixed pointer-events-none z-50 opacity-80",
|
|
5771
|
+
style: {
|
|
5772
|
+
left: `${touchPosition.x}px`,
|
|
5773
|
+
top: `${touchPosition.y}px`,
|
|
5774
|
+
transform: "translate(-50%, -50%)"
|
|
5775
|
+
},
|
|
5776
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5777
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5778
|
+
"span",
|
|
5779
|
+
{
|
|
5780
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5781
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5782
|
+
},
|
|
5783
|
+
index
|
|
5784
|
+
)
|
|
5785
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5786
|
+
ShowMaterialMediaByContentType_default,
|
|
5787
|
+
{
|
|
5788
|
+
contentType: contentMap.type,
|
|
5789
|
+
src: draggedValue,
|
|
5790
|
+
canFullScreen: false
|
|
5791
|
+
},
|
|
5792
|
+
`${uniqueValue}-drag`
|
|
5793
|
+
) })
|
|
5794
|
+
}
|
|
5795
|
+
),
|
|
5796
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
5797
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5733
5798
|
"div",
|
|
5734
5799
|
{
|
|
5735
5800
|
ref: itemsRef,
|
|
5736
5801
|
className: "flex-shrink-0 flex flex-row gap-x-4 gap-y-4 overflow-x-auto py-2",
|
|
5737
|
-
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0,
|
|
5738
|
-
|
|
5802
|
+
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5803
|
+
"div",
|
|
5739
5804
|
{
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5805
|
+
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5806
|
+
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5807
|
+
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5808
|
+
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5809
|
+
onTouchMove: handleTouchMove,
|
|
5810
|
+
onTouchEnd: handleTouchEnd,
|
|
5811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5743
5812
|
"div",
|
|
5744
5813
|
{
|
|
5745
5814
|
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`,
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
setSelectedValue(materialValue);
|
|
5749
|
-
}
|
|
5750
|
-
},
|
|
5751
|
-
onTouchEnd: () => {
|
|
5752
|
-
if (checkCanAnswerQuestion()) {
|
|
5753
|
-
setSelectedValue(materialValue);
|
|
5754
|
-
}
|
|
5755
|
-
},
|
|
5756
|
-
onMouseUp: () => {
|
|
5757
|
-
if (checkCanAnswerQuestion()) {
|
|
5758
|
-
setSelectedValue(null);
|
|
5759
|
-
}
|
|
5760
|
-
},
|
|
5761
|
-
onTouchStart: () => {
|
|
5762
|
-
if (checkCanAnswerQuestion()) {
|
|
5763
|
-
setSelectedValue(null);
|
|
5764
|
-
}
|
|
5765
|
-
},
|
|
5766
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5815
|
+
onClick: () => handleSelectItem(materialValue),
|
|
5816
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] overflow-y-auto px-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5767
5817
|
materialValue
|
|
5768
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5818
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5769
5819
|
"span",
|
|
5770
5820
|
{
|
|
5771
5821
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5772
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5822
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5773
5823
|
},
|
|
5774
5824
|
index2
|
|
5775
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
5825
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5776
5826
|
ShowMaterialMediaByContentType_default,
|
|
5777
5827
|
{
|
|
5778
5828
|
contentType: contentMap.type,
|
|
@@ -5782,97 +5832,75 @@ var MatchingActivityMaterialContent = ({
|
|
|
5782
5832
|
`${uniqueValue}-${index}`
|
|
5783
5833
|
)
|
|
5784
5834
|
}
|
|
5785
|
-
)
|
|
5786
|
-
moveCardHandler: () => {
|
|
5787
|
-
if (!selectedTargetKey) return;
|
|
5788
|
-
if (!selectedValue) return;
|
|
5789
|
-
handleMatchingActivityItemOnChange(
|
|
5790
|
-
selectedTargetKey,
|
|
5791
|
-
selectedValue
|
|
5792
|
-
);
|
|
5793
|
-
}
|
|
5835
|
+
)
|
|
5794
5836
|
},
|
|
5795
5837
|
index
|
|
5796
5838
|
))
|
|
5797
5839
|
}
|
|
5798
5840
|
),
|
|
5799
|
-
/* @__PURE__ */ (0,
|
|
5841
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {}) })
|
|
5800
5842
|
] }) : null,
|
|
5801
|
-
/* @__PURE__ */ (0,
|
|
5843
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
|
|
5802
5844
|
const learnerAnswerState = checkAnswerState(
|
|
5803
5845
|
materialMap[answerMapKey],
|
|
5804
5846
|
answerMap[answerMapKey]
|
|
5805
5847
|
);
|
|
5806
|
-
return /* @__PURE__ */ (0,
|
|
5807
|
-
/* @__PURE__ */ (0,
|
|
5848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5849
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5808
5850
|
"div",
|
|
5809
5851
|
{
|
|
5810
5852
|
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"}`,
|
|
5811
|
-
children: /* @__PURE__ */ (0,
|
|
5853
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5812
5854
|
answerMapKey
|
|
5813
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5855
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5814
5856
|
"span",
|
|
5815
5857
|
{
|
|
5816
5858
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5817
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5859
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5818
5860
|
},
|
|
5819
5861
|
index2
|
|
5820
5862
|
)) }) })
|
|
5821
5863
|
}
|
|
5822
5864
|
) }),
|
|
5823
|
-
/* @__PURE__ */ (0,
|
|
5824
|
-
/* @__PURE__ */ (0,
|
|
5865
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5825
5867
|
"div",
|
|
5826
5868
|
{
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
DroppableItem_default,
|
|
5869
|
+
"data-matching-drop-zone": answerMapKey,
|
|
5870
|
+
onMouseEnter: () => draggedValue && setDropTargetKey(answerMapKey),
|
|
5871
|
+
onMouseLeave: () => setDropTargetKey(null),
|
|
5872
|
+
onClick: () => handleDropZoneClick(answerMapKey),
|
|
5873
|
+
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"}`,
|
|
5874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5875
|
+
"div",
|
|
5835
5876
|
{
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
"div",
|
|
5843
|
-
{
|
|
5844
|
-
className: "h-full flex-1 flex flex-row items-center justify-center px-4",
|
|
5845
|
-
onClick: (e) => {
|
|
5846
|
-
e.preventDefault();
|
|
5847
|
-
if (checkCanAnswerQuestion()) {
|
|
5848
|
-
handleMatchingActivityItemOnChange(
|
|
5849
|
-
answerMapKey,
|
|
5850
|
-
null
|
|
5851
|
-
);
|
|
5852
|
-
}
|
|
5853
|
-
},
|
|
5854
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5855
|
-
answerMap[answerMapKey]
|
|
5856
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5857
|
-
"span",
|
|
5858
|
-
{
|
|
5859
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5860
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5861
|
-
},
|
|
5862
|
-
index2
|
|
5863
|
-
)) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5864
|
-
ShowMaterialMediaByContentType_default,
|
|
5865
|
-
{
|
|
5866
|
-
contentType: contentMap.type,
|
|
5867
|
-
src: answerMap[answerMapKey],
|
|
5868
|
-
canFullScreen: false
|
|
5869
|
-
},
|
|
5870
|
-
`${uniqueValue}-${index}`
|
|
5871
|
-
)
|
|
5877
|
+
className: "h-full flex-1 flex flex-row items-center justify-center px-4",
|
|
5878
|
+
onClick: (e) => {
|
|
5879
|
+
e.stopPropagation();
|
|
5880
|
+
if (checkCanAnswerQuestion() && answerMap[answerMapKey]) {
|
|
5881
|
+
onChange(answer, answerMapKey, null);
|
|
5882
|
+
setSelectedValue(null);
|
|
5872
5883
|
}
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5884
|
+
},
|
|
5885
|
+
children: answerMap[answerMapKey] ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5886
|
+
answerMap[answerMapKey]
|
|
5887
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5888
|
+
"span",
|
|
5889
|
+
{
|
|
5890
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5891
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5892
|
+
},
|
|
5893
|
+
index2
|
|
5894
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5895
|
+
ShowMaterialMediaByContentType_default,
|
|
5896
|
+
{
|
|
5897
|
+
contentType: contentMap.type,
|
|
5898
|
+
src: answerMap[answerMapKey],
|
|
5899
|
+
canFullScreen: false
|
|
5900
|
+
},
|
|
5901
|
+
`${uniqueValue}-${index}`
|
|
5902
|
+
) : null
|
|
5903
|
+
}
|
|
5876
5904
|
)
|
|
5877
5905
|
}
|
|
5878
5906
|
) })
|
|
@@ -5883,7 +5911,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5883
5911
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
5884
5912
|
|
|
5885
5913
|
// src/components/activities/MatchingActivityContent.tsx
|
|
5886
|
-
var
|
|
5914
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5887
5915
|
var MatchingActivityContent = ({
|
|
5888
5916
|
answer,
|
|
5889
5917
|
data,
|
|
@@ -5904,16 +5932,16 @@ var MatchingActivityContent = ({
|
|
|
5904
5932
|
answerMap[key] = value;
|
|
5905
5933
|
changeAnswer(answer2);
|
|
5906
5934
|
};
|
|
5907
|
-
return /* @__PURE__ */ (0,
|
|
5908
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5909
5937
|
ActivityBodyContent_default,
|
|
5910
5938
|
{
|
|
5911
5939
|
bodyMap: matchingBodyMap,
|
|
5912
5940
|
templateType: "MATCHING"
|
|
5913
5941
|
}
|
|
5914
5942
|
),
|
|
5915
|
-
/* @__PURE__ */ (0,
|
|
5916
|
-
/* @__PURE__ */ (0,
|
|
5943
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}),
|
|
5944
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5917
5945
|
MatchingActivityMaterialContent_default,
|
|
5918
5946
|
{
|
|
5919
5947
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5932,7 +5960,7 @@ var MatchingActivityContent_default = MatchingActivityContent;
|
|
|
5932
5960
|
|
|
5933
5961
|
// src/components/activities/material-contents/MCMAActivityMaterialContent.tsx
|
|
5934
5962
|
var import_react_katex7 = require("react-katex");
|
|
5935
|
-
var
|
|
5963
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5936
5964
|
var MCMAActivityMaterialContent = ({
|
|
5937
5965
|
uniqueValue,
|
|
5938
5966
|
answer,
|
|
@@ -5965,10 +5993,10 @@ var MCMAActivityMaterialContent = ({
|
|
|
5965
5993
|
const answerMap = retrieveAnswerMap();
|
|
5966
5994
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
5967
5995
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5968
|
-
return /* @__PURE__ */ (0,
|
|
5969
|
-
/* @__PURE__ */ (0,
|
|
5970
|
-
/* @__PURE__ */ (0,
|
|
5971
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
5996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0", children: [
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
5998
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) }),
|
|
5999
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
5972
6000
|
(materialSubKey, index2) => {
|
|
5973
6001
|
const foundAnswer = answerMap[materialKey].find(
|
|
5974
6002
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -5981,7 +6009,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5981
6009
|
const foundIndex = correctAnswerList.findIndex(
|
|
5982
6010
|
(correctAnswer) => correctAnswer === materialSubKey
|
|
5983
6011
|
);
|
|
5984
|
-
return /* @__PURE__ */ (0,
|
|
6012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5985
6013
|
"div",
|
|
5986
6014
|
{
|
|
5987
6015
|
className: `w-full flex flex-row items-center justify-center cursor-pointer my-2 gap-x-2 ${learnerAnswerState === "EMPTY" && foundIndex !== -1 || learnerAnswerState === "CORRECT" ? "border-2 border-catchup-green rounded-catchup-xlarge p-2" : learnerAnswerState === "INCORRECT" ? "border-2 border-catchup-red rounded-catchup-xlarge p-2" : ""}`,
|
|
@@ -5989,7 +6017,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5989
6017
|
onChange(answer, materialKey, materialSubKey);
|
|
5990
6018
|
},
|
|
5991
6019
|
children: [
|
|
5992
|
-
/* @__PURE__ */ (0,
|
|
6020
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5993
6021
|
BaseImage_default,
|
|
5994
6022
|
{
|
|
5995
6023
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -5999,16 +6027,16 @@ var MCMAActivityMaterialContent = ({
|
|
|
5999
6027
|
}
|
|
6000
6028
|
}
|
|
6001
6029
|
),
|
|
6002
|
-
/* @__PURE__ */ (0,
|
|
6030
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6003
6031
|
materialSubKey
|
|
6004
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
6032
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6005
6033
|
"span",
|
|
6006
6034
|
{
|
|
6007
6035
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6008
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6036
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6009
6037
|
},
|
|
6010
6038
|
index3
|
|
6011
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6039
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6012
6040
|
ShowMaterialMediaByContentType_default,
|
|
6013
6041
|
{
|
|
6014
6042
|
contentType: contentMap.type,
|
|
@@ -6022,13 +6050,13 @@ var MCMAActivityMaterialContent = ({
|
|
|
6022
6050
|
index2
|
|
6023
6051
|
);
|
|
6024
6052
|
}
|
|
6025
|
-
) }) : /* @__PURE__ */ (0,
|
|
6053
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
6026
6054
|
answerMap[materialKey]
|
|
6027
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6055
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6028
6056
|
"span",
|
|
6029
6057
|
{
|
|
6030
6058
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6031
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6059
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6032
6060
|
},
|
|
6033
6061
|
index2
|
|
6034
6062
|
)) }, materialKey)
|
|
@@ -6038,7 +6066,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
6038
6066
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
6039
6067
|
|
|
6040
6068
|
// src/components/activities/MCMAActivityContent.tsx
|
|
6041
|
-
var
|
|
6069
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6042
6070
|
var MCMAActivityContent = ({
|
|
6043
6071
|
answer,
|
|
6044
6072
|
data,
|
|
@@ -6066,11 +6094,11 @@ var MCMAActivityContent = ({
|
|
|
6066
6094
|
}
|
|
6067
6095
|
changeAnswer(answer2);
|
|
6068
6096
|
};
|
|
6069
|
-
return /* @__PURE__ */ (0,
|
|
6070
|
-
/* @__PURE__ */ (0,
|
|
6071
|
-
/* @__PURE__ */ (0,
|
|
6072
|
-
/* @__PURE__ */ (0,
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6098
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ActivityBodyContent_default, { bodyMap: MCMABodyMap, templateType: "MCMA" }) }),
|
|
6099
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DividerLine_default, {}) }),
|
|
6100
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VerticalDividerLine_default, {}) }),
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6074
6102
|
MCMAActivityMaterialContent_default,
|
|
6075
6103
|
{
|
|
6076
6104
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6088,7 +6116,7 @@ var MCMAActivityContent_default = MCMAActivityContent;
|
|
|
6088
6116
|
|
|
6089
6117
|
// src/components/activities/material-contents/MCSAActivityMaterialContent.tsx
|
|
6090
6118
|
var import_react_katex8 = require("react-katex");
|
|
6091
|
-
var
|
|
6119
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6092
6120
|
var MCSAActivityMaterialContent = ({
|
|
6093
6121
|
uniqueValue,
|
|
6094
6122
|
answer,
|
|
@@ -6118,10 +6146,10 @@ var MCSAActivityMaterialContent = ({
|
|
|
6118
6146
|
const answerMap = retrieveAnswerMap();
|
|
6119
6147
|
const correctAnswer = retrieveCorrectAnswer();
|
|
6120
6148
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
6121
|
-
return /* @__PURE__ */ (0,
|
|
6122
|
-
/* @__PURE__ */ (0,
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6124
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
6149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0", children: [
|
|
6150
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6151
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DividerLine_default, {}) }),
|
|
6152
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6125
6153
|
"div",
|
|
6126
6154
|
{
|
|
6127
6155
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -6132,7 +6160,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6132
6160
|
materialSubKey,
|
|
6133
6161
|
answerMap[materialKey]
|
|
6134
6162
|
);
|
|
6135
|
-
return /* @__PURE__ */ (0,
|
|
6163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
6136
6164
|
"div",
|
|
6137
6165
|
{
|
|
6138
6166
|
className: `w-full flex flex-row items-center justify-center cursor-pointer my-2 gap-x-2 ${learnerAnswerState === "EMPTY" && materialSubKey === correctAnswer || learnerAnswerState === "CORRECT" ? "border-2 border-catchup-green rounded-catchup-xlarge p-2" : learnerAnswerState === "INCORRECT" ? "border-2 border-catchup-red rounded-catchup-xlarge p-2" : ""}`,
|
|
@@ -6140,7 +6168,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6140
6168
|
onChange(answer, materialKey, materialSubKey);
|
|
6141
6169
|
},
|
|
6142
6170
|
children: [
|
|
6143
|
-
/* @__PURE__ */ (0,
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6144
6172
|
BaseImage_default,
|
|
6145
6173
|
{
|
|
6146
6174
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -6150,16 +6178,16 @@ var MCSAActivityMaterialContent = ({
|
|
|
6150
6178
|
}
|
|
6151
6179
|
}
|
|
6152
6180
|
),
|
|
6153
|
-
/* @__PURE__ */ (0,
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6154
6182
|
materialSubKey
|
|
6155
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
6183
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6156
6184
|
"span",
|
|
6157
6185
|
{
|
|
6158
6186
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6159
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6187
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6160
6188
|
},
|
|
6161
6189
|
index3
|
|
6162
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6190
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6163
6191
|
ShowMaterialMediaByContentType_default,
|
|
6164
6192
|
{
|
|
6165
6193
|
contentType: contentMap.type,
|
|
@@ -6175,13 +6203,13 @@ var MCSAActivityMaterialContent = ({
|
|
|
6175
6203
|
}
|
|
6176
6204
|
)
|
|
6177
6205
|
}
|
|
6178
|
-
) : /* @__PURE__ */ (0,
|
|
6206
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6179
6207
|
answerMap[materialKey]
|
|
6180
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6208
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6181
6209
|
"span",
|
|
6182
6210
|
{
|
|
6183
6211
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6184
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6212
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6185
6213
|
},
|
|
6186
6214
|
index2
|
|
6187
6215
|
)) })
|
|
@@ -6191,7 +6219,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6191
6219
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
6192
6220
|
|
|
6193
6221
|
// src/components/activities/MCSAActivityContent.tsx
|
|
6194
|
-
var
|
|
6222
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6195
6223
|
var MCSAActivityContent = ({
|
|
6196
6224
|
answer,
|
|
6197
6225
|
data,
|
|
@@ -6212,11 +6240,11 @@ var MCSAActivityContent = ({
|
|
|
6212
6240
|
answerMap[key] = value;
|
|
6213
6241
|
changeAnswer(answer2);
|
|
6214
6242
|
};
|
|
6215
|
-
return /* @__PURE__ */ (0,
|
|
6216
|
-
/* @__PURE__ */ (0,
|
|
6217
|
-
/* @__PURE__ */ (0,
|
|
6218
|
-
/* @__PURE__ */ (0,
|
|
6219
|
-
/* @__PURE__ */ (0,
|
|
6243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ActivityBodyContent_default, { bodyMap: MCSABodyMap, templateType: "MCSA" }) }),
|
|
6245
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DividerLine_default, {}) }),
|
|
6246
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VerticalDividerLine_default, {}) }),
|
|
6247
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6220
6248
|
MCSAActivityMaterialContent_default,
|
|
6221
6249
|
{
|
|
6222
6250
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6261,7 +6289,7 @@ var retrieveDocumentTypeFromExtension = (format) => {
|
|
|
6261
6289
|
};
|
|
6262
6290
|
|
|
6263
6291
|
// src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx
|
|
6264
|
-
var
|
|
6292
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6265
6293
|
var OpenEndedActivityMaterialContent = ({
|
|
6266
6294
|
answer,
|
|
6267
6295
|
contentMap,
|
|
@@ -6291,7 +6319,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6291
6319
|
documentType = retrieveDocumentTypeFromExtension(extension);
|
|
6292
6320
|
}
|
|
6293
6321
|
if (documentType === "IMAGE") {
|
|
6294
|
-
return /* @__PURE__ */ (0,
|
|
6322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6295
6323
|
BaseImage_default,
|
|
6296
6324
|
{
|
|
6297
6325
|
src: answerMapAnswer,
|
|
@@ -6301,9 +6329,9 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6301
6329
|
}
|
|
6302
6330
|
) });
|
|
6303
6331
|
} else if (documentType === "PDF") {
|
|
6304
|
-
return /* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(BasePDF_default, { file: answerMapAnswer });
|
|
6305
6333
|
} else if (documentType === "AUDIO") {
|
|
6306
|
-
return /* @__PURE__ */ (0,
|
|
6334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-[56px]", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6307
6335
|
"audio",
|
|
6308
6336
|
{
|
|
6309
6337
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6314,7 +6342,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6314
6342
|
}
|
|
6315
6343
|
) });
|
|
6316
6344
|
} else if (documentType === "TEXT") {
|
|
6317
|
-
return /* @__PURE__ */ (0,
|
|
6345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6318
6346
|
InputGroup_default,
|
|
6319
6347
|
{
|
|
6320
6348
|
type: "textarea",
|
|
@@ -6333,7 +6361,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6333
6361
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6334
6362
|
const extension = answerMapAnswer.split(".").pop();
|
|
6335
6363
|
const documentType = retrieveDocumentTypeFromExtension(extension);
|
|
6336
|
-
return /* @__PURE__ */ (0,
|
|
6364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: documentType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6337
6365
|
BaseImage_default,
|
|
6338
6366
|
{
|
|
6339
6367
|
src: answerMapAnswer,
|
|
@@ -6341,11 +6369,11 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6341
6369
|
size: "custom",
|
|
6342
6370
|
className: "w-[80%] rounded-catchup-xlarge"
|
|
6343
6371
|
}
|
|
6344
|
-
) }) : documentType === "PDF" ? /* @__PURE__ */ (0,
|
|
6372
|
+
) }) : documentType === "PDF" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(BasePDF_default, { file: answerMapAnswer }) }) : null });
|
|
6345
6373
|
};
|
|
6346
6374
|
const RenderAudioContent = (answerMap2) => {
|
|
6347
6375
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6348
|
-
return /* @__PURE__ */ (0,
|
|
6376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-[56px]", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6349
6377
|
"audio",
|
|
6350
6378
|
{
|
|
6351
6379
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6357,16 +6385,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6357
6385
|
) });
|
|
6358
6386
|
};
|
|
6359
6387
|
const answerMap = retrieveAnswerMap();
|
|
6360
|
-
return /* @__PURE__ */ (0,
|
|
6361
|
-
/* @__PURE__ */ (0,
|
|
6362
|
-
/* @__PURE__ */ (0,
|
|
6388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "", children: [
|
|
6389
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6390
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DividerLine_default, {}) }),
|
|
6363
6391
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null
|
|
6364
6392
|
] }) });
|
|
6365
6393
|
};
|
|
6366
6394
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
6367
6395
|
|
|
6368
6396
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
6369
|
-
var
|
|
6397
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6370
6398
|
var OpenEndedActivityContent = ({
|
|
6371
6399
|
answer,
|
|
6372
6400
|
data,
|
|
@@ -6387,12 +6415,12 @@ var OpenEndedActivityContent = ({
|
|
|
6387
6415
|
answerMap["ANSWER"] = value;
|
|
6388
6416
|
changeAnswer(answer2);
|
|
6389
6417
|
};
|
|
6390
|
-
return /* @__PURE__ */ (0,
|
|
6391
|
-
/* @__PURE__ */ (0,
|
|
6418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6419
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6392
6420
|
"div",
|
|
6393
6421
|
{
|
|
6394
6422
|
className: `${showMaterialContent ? isFullScreen ? "w-full" : "w-full md:w-[40%]" : "w-full"}`,
|
|
6395
|
-
children: /* @__PURE__ */ (0,
|
|
6423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6396
6424
|
ActivityBodyContent_default,
|
|
6397
6425
|
{
|
|
6398
6426
|
bodyMap: openEndedBodyMap,
|
|
@@ -6401,16 +6429,16 @@ var OpenEndedActivityContent = ({
|
|
|
6401
6429
|
)
|
|
6402
6430
|
}
|
|
6403
6431
|
),
|
|
6404
|
-
showMaterialContent ? /* @__PURE__ */ (0,
|
|
6405
|
-
/* @__PURE__ */ (0,
|
|
6432
|
+
showMaterialContent ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
6433
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6406
6434
|
"div",
|
|
6407
6435
|
{
|
|
6408
6436
|
className: `${isFullScreen ? "contents" : "contents md:hidden"}`,
|
|
6409
|
-
children: /* @__PURE__ */ (0,
|
|
6437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DividerLine_default, {})
|
|
6410
6438
|
}
|
|
6411
6439
|
),
|
|
6412
|
-
/* @__PURE__ */ (0,
|
|
6413
|
-
/* @__PURE__ */ (0,
|
|
6440
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VerticalDividerLine_default, {}) }),
|
|
6441
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6414
6442
|
OpenEndedActivityMaterialContent_default,
|
|
6415
6443
|
{
|
|
6416
6444
|
answer,
|
|
@@ -6425,21 +6453,21 @@ var OpenEndedActivityContent = ({
|
|
|
6425
6453
|
var OpenEndedActivityContent_default = OpenEndedActivityContent;
|
|
6426
6454
|
|
|
6427
6455
|
// src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
|
|
6428
|
-
var
|
|
6456
|
+
var import_react23 = require("react");
|
|
6429
6457
|
var import_react_katex9 = require("react-katex");
|
|
6430
6458
|
|
|
6431
6459
|
// src/hooks/useScreenSize.ts
|
|
6432
|
-
var
|
|
6460
|
+
var import_react22 = require("react");
|
|
6433
6461
|
var useScreenSize = () => {
|
|
6434
|
-
const [containerSize, setContainerSize] = (0,
|
|
6462
|
+
const [containerSize, setContainerSize] = (0, import_react22.useState)({
|
|
6435
6463
|
width: 0,
|
|
6436
6464
|
height: 0
|
|
6437
6465
|
});
|
|
6438
|
-
const [screenSize, setScreenSize] = (0,
|
|
6466
|
+
const [screenSize, setScreenSize] = (0, import_react22.useState)({
|
|
6439
6467
|
width: window.innerWidth,
|
|
6440
6468
|
height: window.innerHeight
|
|
6441
6469
|
});
|
|
6442
|
-
(0,
|
|
6470
|
+
(0, import_react22.useEffect)(() => {
|
|
6443
6471
|
const handleResize = () => {
|
|
6444
6472
|
setScreenSize({
|
|
6445
6473
|
width: window.innerWidth,
|
|
@@ -6464,7 +6492,7 @@ var useScreenSize = () => {
|
|
|
6464
6492
|
var useScreenSize_default = useScreenSize;
|
|
6465
6493
|
|
|
6466
6494
|
// src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
|
|
6467
|
-
var
|
|
6495
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6468
6496
|
var OrderingActivityMaterialContent = ({
|
|
6469
6497
|
uniqueValue,
|
|
6470
6498
|
answer,
|
|
@@ -6475,20 +6503,20 @@ var OrderingActivityMaterialContent = ({
|
|
|
6475
6503
|
isPreview,
|
|
6476
6504
|
showCorrectAnswer
|
|
6477
6505
|
}) => {
|
|
6478
|
-
const [selectedKey, setSelectedKey] = (0,
|
|
6479
|
-
const [draggedKey, setDraggedKey] = (0,
|
|
6480
|
-
const [dropTargetKey, setDropTargetKey] = (0,
|
|
6481
|
-
const [draggedElement, setDraggedElement] = (0,
|
|
6506
|
+
const [selectedKey, setSelectedKey] = (0, import_react23.useState)(null);
|
|
6507
|
+
const [draggedKey, setDraggedKey] = (0, import_react23.useState)(null);
|
|
6508
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react23.useState)(null);
|
|
6509
|
+
const [draggedElement, setDraggedElement] = (0, import_react23.useState)(
|
|
6482
6510
|
null
|
|
6483
6511
|
);
|
|
6484
|
-
const dragElementRef = (0,
|
|
6485
|
-
const [touchPosition, setTouchPosition] = (0,
|
|
6512
|
+
const dragElementRef = (0, import_react23.useRef)(null);
|
|
6513
|
+
const [touchPosition, setTouchPosition] = (0, import_react23.useState)({
|
|
6486
6514
|
x: 0,
|
|
6487
6515
|
y: 0
|
|
6488
6516
|
});
|
|
6489
6517
|
const { screenSize } = useScreenSize_default();
|
|
6490
|
-
const [view, setView] = (0,
|
|
6491
|
-
(0,
|
|
6518
|
+
const [view, setView] = (0, import_react23.useState)("PC");
|
|
6519
|
+
(0, import_react23.useEffect)(() => {
|
|
6492
6520
|
if (!screenSize) return;
|
|
6493
6521
|
if (screenSize.width <= 1024) {
|
|
6494
6522
|
setView("TABLET");
|
|
@@ -6496,7 +6524,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6496
6524
|
setView("PC");
|
|
6497
6525
|
}
|
|
6498
6526
|
}, [screenSize]);
|
|
6499
|
-
(0,
|
|
6527
|
+
(0, import_react23.useEffect)(() => {
|
|
6500
6528
|
if (!showCorrectAnswer) return;
|
|
6501
6529
|
const answerMap2 = answer.data.find(
|
|
6502
6530
|
(answerData) => answerData.type === "ORDERING"
|
|
@@ -6596,8 +6624,8 @@ var OrderingActivityMaterialContent = ({
|
|
|
6596
6624
|
setDraggedKey(null);
|
|
6597
6625
|
};
|
|
6598
6626
|
const answerMap = retrieveAnswerMap();
|
|
6599
|
-
return /* @__PURE__ */ (0,
|
|
6600
|
-
draggedKey && touchPosition.x > 0 && /* @__PURE__ */ (0,
|
|
6627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex flex-row flex-wrap", onMouseUp: handleMouseUp, children: [
|
|
6628
|
+
draggedKey && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6601
6629
|
"div",
|
|
6602
6630
|
{
|
|
6603
6631
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -6606,16 +6634,16 @@ var OrderingActivityMaterialContent = ({
|
|
|
6606
6634
|
top: `${touchPosition.y}px`,
|
|
6607
6635
|
transform: "translate(-50%, -50%)"
|
|
6608
6636
|
},
|
|
6609
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6637
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6610
6638
|
materialMap[answerMap[draggedKey]]
|
|
6611
|
-
).map((inputPart, index) => /* @__PURE__ */ (0,
|
|
6639
|
+
).map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6612
6640
|
"span",
|
|
6613
6641
|
{
|
|
6614
6642
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6615
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6643
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6616
6644
|
},
|
|
6617
6645
|
index
|
|
6618
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
6646
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6619
6647
|
ShowMaterialMediaByContentType_default,
|
|
6620
6648
|
{
|
|
6621
6649
|
contentType: contentMap.type,
|
|
@@ -6631,7 +6659,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6631
6659
|
answerMap[materialKey] + "",
|
|
6632
6660
|
index + ""
|
|
6633
6661
|
);
|
|
6634
|
-
return /* @__PURE__ */ (0,
|
|
6662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6635
6663
|
"div",
|
|
6636
6664
|
{
|
|
6637
6665
|
className: `flex flex-row items-center my-4 mx-2`,
|
|
@@ -6639,14 +6667,14 @@ var OrderingActivityMaterialContent = ({
|
|
|
6639
6667
|
marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
|
|
6640
6668
|
},
|
|
6641
6669
|
children: [
|
|
6642
|
-
/* @__PURE__ */ (0,
|
|
6670
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-catchup-activity-box-item w-catchup-activity-box-item flex flex-col items-center justify-center cursor-pointer transition-all duration-300 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6643
6671
|
"div",
|
|
6644
6672
|
{
|
|
6645
6673
|
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]`,
|
|
6646
|
-
children: /* @__PURE__ */ (0,
|
|
6674
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "", children: parseFloat(materialKey) + 1 })
|
|
6647
6675
|
}
|
|
6648
6676
|
) }) }),
|
|
6649
|
-
/* @__PURE__ */ (0,
|
|
6677
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6650
6678
|
"div",
|
|
6651
6679
|
{
|
|
6652
6680
|
ref: draggedKey === materialKey ? dragElementRef : null,
|
|
@@ -6658,21 +6686,21 @@ var OrderingActivityMaterialContent = ({
|
|
|
6658
6686
|
onTouchStart: (e) => handleTouchStart(e, materialKey, e.currentTarget),
|
|
6659
6687
|
onTouchMove: handleTouchMove,
|
|
6660
6688
|
onTouchEnd: handleTouchEnd,
|
|
6661
|
-
children: /* @__PURE__ */ (0,
|
|
6689
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6662
6690
|
"div",
|
|
6663
6691
|
{
|
|
6664
6692
|
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"}`,
|
|
6665
6693
|
onClick: () => handleSelectItem(materialKey),
|
|
6666
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6694
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6667
6695
|
materialMap[answerMap[materialKey]]
|
|
6668
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6696
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6669
6697
|
"span",
|
|
6670
6698
|
{
|
|
6671
6699
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6672
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6700
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6673
6701
|
},
|
|
6674
6702
|
index2
|
|
6675
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6703
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6676
6704
|
ShowMaterialMediaByContentType_default,
|
|
6677
6705
|
{
|
|
6678
6706
|
contentType: contentMap.type,
|
|
@@ -6694,7 +6722,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6694
6722
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6695
6723
|
|
|
6696
6724
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6697
|
-
var
|
|
6725
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6698
6726
|
var OrderingActivityContent = ({
|
|
6699
6727
|
answer,
|
|
6700
6728
|
data,
|
|
@@ -6718,16 +6746,16 @@ var OrderingActivityContent = ({
|
|
|
6718
6746
|
answerMap[secondaryKey] = prevValue;
|
|
6719
6747
|
changeAnswer(answer2);
|
|
6720
6748
|
};
|
|
6721
|
-
return /* @__PURE__ */ (0,
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
6750
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6723
6751
|
ActivityBodyContent_default,
|
|
6724
6752
|
{
|
|
6725
6753
|
bodyMap: orderingBodyMap,
|
|
6726
6754
|
templateType: "ORDERING"
|
|
6727
6755
|
}
|
|
6728
6756
|
),
|
|
6729
|
-
/* @__PURE__ */ (0,
|
|
6730
|
-
/* @__PURE__ */ (0,
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {}),
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6731
6759
|
OrderingActivityMaterialContent_default,
|
|
6732
6760
|
{
|
|
6733
6761
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6745,9 +6773,9 @@ var OrderingActivityContent = ({
|
|
|
6745
6773
|
var OrderingActivityContent_default = OrderingActivityContent;
|
|
6746
6774
|
|
|
6747
6775
|
// src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
|
|
6748
|
-
var
|
|
6776
|
+
var import_react24 = require("react");
|
|
6749
6777
|
var import_react_katex10 = require("react-katex");
|
|
6750
|
-
var
|
|
6778
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6751
6779
|
var TrueFalseActivityMaterialContent = ({
|
|
6752
6780
|
uniqueValue,
|
|
6753
6781
|
answer,
|
|
@@ -6759,8 +6787,8 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6759
6787
|
showCorrectAnswer
|
|
6760
6788
|
}) => {
|
|
6761
6789
|
const { screenSize } = useScreenSize_default();
|
|
6762
|
-
const [shuffleOptionList, setShuffleOptionList] = (0,
|
|
6763
|
-
(0,
|
|
6790
|
+
const [shuffleOptionList, setShuffleOptionList] = (0, import_react24.useState)([]);
|
|
6791
|
+
(0, import_react24.useEffect)(() => {
|
|
6764
6792
|
const optionList = [];
|
|
6765
6793
|
optionList.push(...materialMap.trueList);
|
|
6766
6794
|
optionList.push(...materialMap.falseList);
|
|
@@ -6770,7 +6798,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6770
6798
|
setShuffleOptionList(shuffleArray(optionList));
|
|
6771
6799
|
}
|
|
6772
6800
|
}, []);
|
|
6773
|
-
(0,
|
|
6801
|
+
(0, import_react24.useEffect)(() => {
|
|
6774
6802
|
if (!showCorrectAnswer) return;
|
|
6775
6803
|
answer.data.find(
|
|
6776
6804
|
(answerData) => answerData.type === "TRUE_FALSE"
|
|
@@ -6800,14 +6828,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6800
6828
|
return "INCORRECT";
|
|
6801
6829
|
};
|
|
6802
6830
|
const answerMap = retrieveAnswerMap();
|
|
6803
|
-
return /* @__PURE__ */ (0,
|
|
6804
|
-
/* @__PURE__ */ (0,
|
|
6805
|
-
/* @__PURE__ */ (0,
|
|
6806
|
-
/* @__PURE__ */ (0,
|
|
6807
|
-
/* @__PURE__ */ (0,
|
|
6808
|
-
/* @__PURE__ */ (0,
|
|
6831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "", children: [
|
|
6832
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
6833
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}) }),
|
|
6834
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
6835
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
6836
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
6809
6837
|
] }),
|
|
6810
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
6838
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
6811
6839
|
const correctAnswer = materialMap.trueList.find(
|
|
6812
6840
|
(trueItem) => trueItem === shuffleOption
|
|
6813
6841
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -6818,21 +6846,21 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6818
6846
|
correctAnswer,
|
|
6819
6847
|
learnerAnswer
|
|
6820
6848
|
);
|
|
6821
|
-
return /* @__PURE__ */ (0,
|
|
6849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6822
6850
|
"div",
|
|
6823
6851
|
{
|
|
6824
6852
|
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" : ""}`,
|
|
6825
6853
|
children: [
|
|
6826
|
-
/* @__PURE__ */ (0,
|
|
6854
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl p-2 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6827
6855
|
shuffleOption
|
|
6828
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6856
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6829
6857
|
"span",
|
|
6830
6858
|
{
|
|
6831
6859
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6832
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6860
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex10.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6833
6861
|
},
|
|
6834
6862
|
index2
|
|
6835
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6863
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6836
6864
|
ShowMaterialMediaByContentType_default,
|
|
6837
6865
|
{
|
|
6838
6866
|
contentType: contentMap.type,
|
|
@@ -6841,8 +6869,8 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6841
6869
|
},
|
|
6842
6870
|
`${uniqueValue}-${index}`
|
|
6843
6871
|
) }),
|
|
6844
|
-
/* @__PURE__ */ (0,
|
|
6845
|
-
/* @__PURE__ */ (0,
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6873
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6846
6874
|
BaseImage_default,
|
|
6847
6875
|
{
|
|
6848
6876
|
src: answerMap.trueList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6853,7 +6881,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6853
6881
|
}
|
|
6854
6882
|
}
|
|
6855
6883
|
) }) }),
|
|
6856
|
-
/* @__PURE__ */ (0,
|
|
6884
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6857
6885
|
BaseImage_default,
|
|
6858
6886
|
{
|
|
6859
6887
|
src: answerMap.falseList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6869,14 +6897,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6869
6897
|
},
|
|
6870
6898
|
index
|
|
6871
6899
|
);
|
|
6872
|
-
}) }) : /* @__PURE__ */ (0,
|
|
6873
|
-
answerMap.trueList.map((item) => /* @__PURE__ */ (0,
|
|
6874
|
-
/* @__PURE__ */ (0,
|
|
6875
|
-
/* @__PURE__ */ (0,
|
|
6900
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
6901
|
+
answerMap.trueList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6902
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: item }) }),
|
|
6903
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
6876
6904
|
] })),
|
|
6877
|
-
answerMap.falseList.map((item) => /* @__PURE__ */ (0,
|
|
6878
|
-
/* @__PURE__ */ (0,
|
|
6879
|
-
/* @__PURE__ */ (0,
|
|
6905
|
+
answerMap.falseList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6906
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: item }) }),
|
|
6907
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
6880
6908
|
] }))
|
|
6881
6909
|
] })
|
|
6882
6910
|
] });
|
|
@@ -6884,7 +6912,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6884
6912
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
6885
6913
|
|
|
6886
6914
|
// src/components/activities/TrueFalseActivityContent.tsx
|
|
6887
|
-
var
|
|
6915
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6888
6916
|
var TrueFalseActivityContent = ({
|
|
6889
6917
|
answer,
|
|
6890
6918
|
data,
|
|
@@ -6935,17 +6963,17 @@ var TrueFalseActivityContent = ({
|
|
|
6935
6963
|
}
|
|
6936
6964
|
changeAnswer(answer2);
|
|
6937
6965
|
};
|
|
6938
|
-
return /* @__PURE__ */ (0,
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
6966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6967
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6940
6968
|
ActivityBodyContent_default,
|
|
6941
6969
|
{
|
|
6942
6970
|
bodyMap: trueFalseBodyMap,
|
|
6943
6971
|
templateType: "GROUPING"
|
|
6944
6972
|
}
|
|
6945
6973
|
) }),
|
|
6946
|
-
/* @__PURE__ */ (0,
|
|
6947
|
-
/* @__PURE__ */ (0,
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
6974
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DividerLine_default, {}) }),
|
|
6975
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VerticalDividerLine_default, {}) }),
|
|
6976
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6949
6977
|
TrueFalseActivityMaterialContent_default,
|
|
6950
6978
|
{
|
|
6951
6979
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6964,7 +6992,7 @@ var TrueFalseActivityContent_default = TrueFalseActivityContent;
|
|
|
6964
6992
|
|
|
6965
6993
|
// src/components/activities/solution-contents/ActivitySolutionContent.tsx
|
|
6966
6994
|
var import_react_katex11 = require("react-katex");
|
|
6967
|
-
var
|
|
6995
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6968
6996
|
var ActivitySolutionContent = ({
|
|
6969
6997
|
activityTemplateType,
|
|
6970
6998
|
data
|
|
@@ -6994,8 +7022,8 @@ var ActivitySolutionContent = ({
|
|
|
6994
7022
|
return null;
|
|
6995
7023
|
}
|
|
6996
7024
|
if (!solutionMap || Object.keys(solutionMap).length === 0) return null;
|
|
6997
|
-
return /* @__PURE__ */ (0,
|
|
6998
|
-
/* @__PURE__ */ (0,
|
|
7025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "p-4 border-catchup-blue border-2 rounded-catchup-xlarge", children: [
|
|
7026
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("solution") }),
|
|
6999
7027
|
Object.keys(solutionMap).map((key) => {
|
|
7000
7028
|
let currentItem;
|
|
7001
7029
|
try {
|
|
@@ -7005,12 +7033,12 @@ var ActivitySolutionContent = ({
|
|
|
7005
7033
|
return null;
|
|
7006
7034
|
}
|
|
7007
7035
|
const { value } = currentItem;
|
|
7008
|
-
return /* @__PURE__ */ (0,
|
|
7009
|
-
(inputPart, partIndex) => /* @__PURE__ */ (0,
|
|
7036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
7037
|
+
(inputPart, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7010
7038
|
"span",
|
|
7011
7039
|
{
|
|
7012
7040
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7013
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7041
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_katex11.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7014
7042
|
},
|
|
7015
7043
|
`${key}_part_${partIndex}`
|
|
7016
7044
|
)
|
|
@@ -7022,7 +7050,7 @@ var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
|
7022
7050
|
|
|
7023
7051
|
// src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
|
|
7024
7052
|
var import_react_katex12 = require("react-katex");
|
|
7025
|
-
var
|
|
7053
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7026
7054
|
var ActivityEvaluationRubricContent = ({
|
|
7027
7055
|
activityTemplateType,
|
|
7028
7056
|
data
|
|
@@ -7052,21 +7080,21 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7052
7080
|
}
|
|
7053
7081
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
7054
7082
|
return null;
|
|
7055
|
-
return /* @__PURE__ */ (0,
|
|
7056
|
-
/* @__PURE__ */ (0,
|
|
7083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
7084
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
7057
7085
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
7058
7086
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
7059
7087
|
const { value } = currentItem;
|
|
7060
|
-
return /* @__PURE__ */ (0,
|
|
7088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7061
7089
|
"p",
|
|
7062
7090
|
{
|
|
7063
7091
|
className: "my-1 text-xl whitespace-pre-wrap",
|
|
7064
7092
|
children: constructInputWithSpecialExpressionList(value).map(
|
|
7065
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
7093
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7066
7094
|
"span",
|
|
7067
7095
|
{
|
|
7068
7096
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7069
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7097
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7070
7098
|
},
|
|
7071
7099
|
index2
|
|
7072
7100
|
)
|
|
@@ -7080,31 +7108,31 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7080
7108
|
var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
7081
7109
|
|
|
7082
7110
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
7083
|
-
var
|
|
7111
|
+
var import_react25 = require("react");
|
|
7084
7112
|
|
|
7085
7113
|
// src/components/boxes/SelectionBox.tsx
|
|
7086
|
-
var
|
|
7114
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7087
7115
|
var SelectionBox = ({
|
|
7088
7116
|
optionList,
|
|
7089
7117
|
selectedId,
|
|
7090
7118
|
handleSelectOnClick
|
|
7091
7119
|
}) => {
|
|
7092
|
-
return /* @__PURE__ */ (0,
|
|
7120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7093
7121
|
"div",
|
|
7094
7122
|
{
|
|
7095
7123
|
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`,
|
|
7096
7124
|
onClick: () => {
|
|
7097
7125
|
handleSelectOnClick(option.id);
|
|
7098
7126
|
},
|
|
7099
|
-
children: /* @__PURE__ */ (0,
|
|
7127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
7100
7128
|
"div",
|
|
7101
7129
|
{
|
|
7102
7130
|
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
7103
7131
|
children: [
|
|
7104
7132
|
option.icon,
|
|
7105
|
-
/* @__PURE__ */ (0,
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7107
|
-
option.subText ? /* @__PURE__ */ (0,
|
|
7133
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
7134
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: option.text }),
|
|
7135
|
+
option.subText ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-md", children: [
|
|
7108
7136
|
"(",
|
|
7109
7137
|
option.subText,
|
|
7110
7138
|
")"
|
|
@@ -7120,7 +7148,7 @@ var SelectionBox = ({
|
|
|
7120
7148
|
var SelectionBox_default = SelectionBox;
|
|
7121
7149
|
|
|
7122
7150
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
7123
|
-
var
|
|
7151
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7124
7152
|
var ActivityPreviewByData = ({
|
|
7125
7153
|
data,
|
|
7126
7154
|
showType,
|
|
@@ -7132,14 +7160,14 @@ var ActivityPreviewByData = ({
|
|
|
7132
7160
|
showDifficulty,
|
|
7133
7161
|
isFullScreen
|
|
7134
7162
|
}) => {
|
|
7135
|
-
const [key, setKey] = (0,
|
|
7136
|
-
const [selectedType, setSelectedType] = (0,
|
|
7137
|
-
const [optionList, setOptionList] = (0,
|
|
7138
|
-
(0,
|
|
7163
|
+
const [key, setKey] = (0, import_react25.useState)((/* @__PURE__ */ new Date()).getTime());
|
|
7164
|
+
const [selectedType, setSelectedType] = (0, import_react25.useState)(null);
|
|
7165
|
+
const [optionList, setOptionList] = (0, import_react25.useState)([]);
|
|
7166
|
+
(0, import_react25.useEffect)(() => {
|
|
7139
7167
|
if (!data) return;
|
|
7140
7168
|
setKey((/* @__PURE__ */ new Date()).getTime());
|
|
7141
7169
|
}, [data]);
|
|
7142
|
-
(0,
|
|
7170
|
+
(0, import_react25.useEffect)(() => {
|
|
7143
7171
|
if (!typeOptionList) return;
|
|
7144
7172
|
if (typeOptionList.length === 0) return;
|
|
7145
7173
|
let foundTypeOption;
|
|
@@ -7154,7 +7182,7 @@ var ActivityPreviewByData = ({
|
|
|
7154
7182
|
setSelectedType(typeOptionList[0].id);
|
|
7155
7183
|
}
|
|
7156
7184
|
}, [typeOptionList, lockedType]);
|
|
7157
|
-
(0,
|
|
7185
|
+
(0, import_react25.useEffect)(() => {
|
|
7158
7186
|
if (!data) return;
|
|
7159
7187
|
if (!typeOptionList) return;
|
|
7160
7188
|
if (typeOptionList.length === 0) return;
|
|
@@ -7178,11 +7206,11 @@ var ActivityPreviewByData = ({
|
|
|
7178
7206
|
}, [data, lockedType, typeOptionList, showDifficulty]);
|
|
7179
7207
|
if (!data) return;
|
|
7180
7208
|
const answer = constructAnswerBasedOnData(data);
|
|
7181
|
-
return /* @__PURE__ */ (0,
|
|
7182
|
-
showType ? /* @__PURE__ */ (0,
|
|
7183
|
-
/* @__PURE__ */ (0,
|
|
7184
|
-
showDescription ? /* @__PURE__ */ (0,
|
|
7185
|
-
/* @__PURE__ */ (0,
|
|
7209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
7210
|
+
showType ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
7211
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mb-4", children: [
|
|
7212
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7213
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7186
7214
|
SelectionBox_default,
|
|
7187
7215
|
{
|
|
7188
7216
|
optionList,
|
|
@@ -7193,9 +7221,9 @@ var ActivityPreviewByData = ({
|
|
|
7193
7221
|
}
|
|
7194
7222
|
)
|
|
7195
7223
|
] }),
|
|
7196
|
-
/* @__PURE__ */ (0,
|
|
7224
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DividerLine_default, {})
|
|
7197
7225
|
] }) : null,
|
|
7198
|
-
selectedType ? /* @__PURE__ */ (0,
|
|
7226
|
+
selectedType ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7199
7227
|
OrderingActivityContent_default,
|
|
7200
7228
|
{
|
|
7201
7229
|
answer,
|
|
@@ -7209,7 +7237,7 @@ var ActivityPreviewByData = ({
|
|
|
7209
7237
|
showCorrectAnswer: true,
|
|
7210
7238
|
isFullScreen
|
|
7211
7239
|
}
|
|
7212
|
-
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7240
|
+
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7213
7241
|
DropdownActivityContent_default,
|
|
7214
7242
|
{
|
|
7215
7243
|
answer,
|
|
@@ -7223,7 +7251,7 @@ var ActivityPreviewByData = ({
|
|
|
7223
7251
|
showCorrectAnswer: true,
|
|
7224
7252
|
isFullScreen
|
|
7225
7253
|
}
|
|
7226
|
-
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7254
|
+
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7227
7255
|
MCSAActivityContent_default,
|
|
7228
7256
|
{
|
|
7229
7257
|
answer,
|
|
@@ -7237,7 +7265,7 @@ var ActivityPreviewByData = ({
|
|
|
7237
7265
|
showCorrectAnswer: true,
|
|
7238
7266
|
isFullScreen
|
|
7239
7267
|
}
|
|
7240
|
-
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7268
|
+
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7241
7269
|
MCMAActivityContent_default,
|
|
7242
7270
|
{
|
|
7243
7271
|
answer,
|
|
@@ -7251,7 +7279,7 @@ var ActivityPreviewByData = ({
|
|
|
7251
7279
|
showCorrectAnswer: true,
|
|
7252
7280
|
isFullScreen
|
|
7253
7281
|
}
|
|
7254
|
-
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7282
|
+
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7255
7283
|
MatchingActivityContent_default,
|
|
7256
7284
|
{
|
|
7257
7285
|
answer,
|
|
@@ -7264,7 +7292,7 @@ var ActivityPreviewByData = ({
|
|
|
7264
7292
|
isPreview: true,
|
|
7265
7293
|
showCorrectAnswer: true
|
|
7266
7294
|
}
|
|
7267
|
-
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7295
|
+
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7268
7296
|
GroupingActivityContent_default,
|
|
7269
7297
|
{
|
|
7270
7298
|
answer,
|
|
@@ -7277,7 +7305,7 @@ var ActivityPreviewByData = ({
|
|
|
7277
7305
|
isPreview: true,
|
|
7278
7306
|
showCorrectAnswer: true
|
|
7279
7307
|
}
|
|
7280
|
-
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7308
|
+
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7281
7309
|
FillInTheBlanksActivityContent_default,
|
|
7282
7310
|
{
|
|
7283
7311
|
answer,
|
|
@@ -7291,7 +7319,7 @@ var ActivityPreviewByData = ({
|
|
|
7291
7319
|
showCorrectAnswer: true,
|
|
7292
7320
|
isFullScreen
|
|
7293
7321
|
}
|
|
7294
|
-
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ (0,
|
|
7322
|
+
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7295
7323
|
OpenEndedActivityContent_default,
|
|
7296
7324
|
{
|
|
7297
7325
|
answer,
|
|
@@ -7303,7 +7331,7 @@ var ActivityPreviewByData = ({
|
|
|
7303
7331
|
isPreview: true,
|
|
7304
7332
|
isFullScreen
|
|
7305
7333
|
}
|
|
7306
|
-
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7334
|
+
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7307
7335
|
TrueFalseActivityContent_default,
|
|
7308
7336
|
{
|
|
7309
7337
|
answer,
|
|
@@ -7318,14 +7346,14 @@ var ActivityPreviewByData = ({
|
|
|
7318
7346
|
isFullScreen
|
|
7319
7347
|
}
|
|
7320
7348
|
) : null }, selectedType) : null,
|
|
7321
|
-
selectedType && showSolution ? /* @__PURE__ */ (0,
|
|
7349
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7322
7350
|
ActivitySolutionContent_default,
|
|
7323
7351
|
{
|
|
7324
7352
|
activityTemplateType: selectedType,
|
|
7325
7353
|
data
|
|
7326
7354
|
}
|
|
7327
7355
|
) }) : null,
|
|
7328
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0,
|
|
7356
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7329
7357
|
ActivityEvaluationRubricContent_default,
|
|
7330
7358
|
{
|
|
7331
7359
|
activityTemplateType: selectedType,
|
|
@@ -7337,8 +7365,8 @@ var ActivityPreviewByData = ({
|
|
|
7337
7365
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
7338
7366
|
|
|
7339
7367
|
// src/components/activities/ActivityPreviewByAnswerData.tsx
|
|
7340
|
-
var
|
|
7341
|
-
var
|
|
7368
|
+
var import_react26 = require("react");
|
|
7369
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7342
7370
|
var ActivityPreviewByAnswerData = ({
|
|
7343
7371
|
data,
|
|
7344
7372
|
showType = true,
|
|
@@ -7352,11 +7380,11 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7352
7380
|
showCorrectAnswer = false
|
|
7353
7381
|
}) => {
|
|
7354
7382
|
var _a;
|
|
7355
|
-
const [key, setKey] = (0,
|
|
7356
|
-
const [selectedType, setSelectedType] = (0,
|
|
7357
|
-
const [optionList, setOptionList] = (0,
|
|
7358
|
-
const [answer, setAnswer] = (0,
|
|
7359
|
-
(0,
|
|
7383
|
+
const [key, setKey] = (0, import_react26.useState)((/* @__PURE__ */ new Date()).getTime());
|
|
7384
|
+
const [selectedType, setSelectedType] = (0, import_react26.useState)(null);
|
|
7385
|
+
const [optionList, setOptionList] = (0, import_react26.useState)([]);
|
|
7386
|
+
const [answer, setAnswer] = (0, import_react26.useState)({ data: [] });
|
|
7387
|
+
(0, import_react26.useEffect)(() => {
|
|
7360
7388
|
if (!data) return;
|
|
7361
7389
|
setKey((/* @__PURE__ */ new Date()).getTime());
|
|
7362
7390
|
}, [data]);
|
|
@@ -7369,7 +7397,7 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7369
7397
|
}
|
|
7370
7398
|
return null;
|
|
7371
7399
|
};
|
|
7372
|
-
(0,
|
|
7400
|
+
(0, import_react26.useEffect)(() => {
|
|
7373
7401
|
if (!data) return;
|
|
7374
7402
|
const constructAnswerBasedOnData2 = () => {
|
|
7375
7403
|
const newAnswer = { data: [] };
|
|
@@ -7408,7 +7436,7 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7408
7436
|
};
|
|
7409
7437
|
constructAnswerBasedOnData2();
|
|
7410
7438
|
}, [data, lockedType]);
|
|
7411
|
-
(0,
|
|
7439
|
+
(0, import_react26.useEffect)(() => {
|
|
7412
7440
|
if (!data || !answer.data.length) return;
|
|
7413
7441
|
let currentTypeOptionList = typeOptionList || answer.data.map((item) => ({
|
|
7414
7442
|
id: item.type,
|
|
@@ -7446,38 +7474,38 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7446
7474
|
};
|
|
7447
7475
|
switch (selectedType) {
|
|
7448
7476
|
case "ORDERING":
|
|
7449
|
-
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0,
|
|
7477
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OrderingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7450
7478
|
case "DROPDOWN":
|
|
7451
|
-
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0,
|
|
7479
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DropdownActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7452
7480
|
case "MCSA":
|
|
7453
|
-
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0,
|
|
7481
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MCSAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7454
7482
|
case "MCMA":
|
|
7455
|
-
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0,
|
|
7483
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MCMAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7456
7484
|
case "MATCHING":
|
|
7457
|
-
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0,
|
|
7485
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MatchingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7458
7486
|
case "GROUPING":
|
|
7459
|
-
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0,
|
|
7487
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(GroupingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7460
7488
|
case "FILL_IN_THE_BLANKS":
|
|
7461
|
-
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0,
|
|
7489
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7462
7490
|
case "OPEN_ENDED":
|
|
7463
|
-
return data.openEndedBodyMap ? /* @__PURE__ */ (0,
|
|
7491
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7464
7492
|
OpenEndedActivityContent_default,
|
|
7465
7493
|
__spreadProps(__spreadValues({}, commonProps), {
|
|
7466
7494
|
showMaterialContent: true
|
|
7467
7495
|
})
|
|
7468
7496
|
) : null;
|
|
7469
7497
|
case "TRUE_FALSE":
|
|
7470
|
-
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0,
|
|
7498
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TrueFalseActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7471
7499
|
default:
|
|
7472
7500
|
return null;
|
|
7473
7501
|
}
|
|
7474
7502
|
};
|
|
7475
7503
|
if (!data) return null;
|
|
7476
|
-
return /* @__PURE__ */ (0,
|
|
7477
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ (0,
|
|
7478
|
-
/* @__PURE__ */ (0,
|
|
7479
|
-
showDescription ? /* @__PURE__ */ (0,
|
|
7480
|
-
/* @__PURE__ */ (0,
|
|
7504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { children: [
|
|
7505
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
7506
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mb-4", children: [
|
|
7507
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7481
7509
|
SelectionBox_default,
|
|
7482
7510
|
{
|
|
7483
7511
|
optionList,
|
|
@@ -7488,20 +7516,20 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7488
7516
|
}
|
|
7489
7517
|
)
|
|
7490
7518
|
] }),
|
|
7491
|
-
/* @__PURE__ */ (0,
|
|
7519
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DividerLine_default, {})
|
|
7492
7520
|
] }) : null,
|
|
7493
|
-
/* @__PURE__ */ (0,
|
|
7494
|
-
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0,
|
|
7495
|
-
selectedType ? /* @__PURE__ */ (0,
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
7522
|
+
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ActivityEmptyContent_default, {}) : null,
|
|
7523
|
+
selectedType ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
|
7496
7524
|
] }),
|
|
7497
|
-
selectedType && showSolution ? /* @__PURE__ */ (0,
|
|
7525
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7498
7526
|
ActivitySolutionContent_default,
|
|
7499
7527
|
{
|
|
7500
7528
|
activityTemplateType: selectedType,
|
|
7501
7529
|
data
|
|
7502
7530
|
}
|
|
7503
7531
|
) }) : null,
|
|
7504
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0,
|
|
7532
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7505
7533
|
ActivityEvaluationRubricContent_default,
|
|
7506
7534
|
{
|
|
7507
7535
|
activityTemplateType: selectedType,
|
|
@@ -7513,17 +7541,17 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7513
7541
|
var ActivityPreviewByAnswerData_default = ActivityPreviewByAnswerData;
|
|
7514
7542
|
|
|
7515
7543
|
// src/components/errors/StatusError.tsx
|
|
7516
|
-
var
|
|
7544
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7517
7545
|
var StatusError = ({
|
|
7518
7546
|
statusCode,
|
|
7519
7547
|
statusText,
|
|
7520
7548
|
textSize
|
|
7521
7549
|
}) => {
|
|
7522
|
-
return /* @__PURE__ */ (0,
|
|
7523
|
-
/* @__PURE__ */ (0,
|
|
7524
|
-
/* @__PURE__ */ (0,
|
|
7525
|
-
/* @__PURE__ */ (0,
|
|
7526
|
-
/* @__PURE__ */ (0,
|
|
7550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col justify-center items-center", children: [
|
|
7551
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-6xl text-catchup-red my-5", children: i18n_default.t("ooops_text") }),
|
|
7552
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-center my-5", children: [
|
|
7553
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "italic", children: i18n_default.t("unexcepted_error_text") }),
|
|
7554
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { className: `${textSize ? textSize : "text-lg"}`, children: [
|
|
7527
7555
|
"(",
|
|
7528
7556
|
statusCode ? `${statusCode} - ` : null,
|
|
7529
7557
|
statusText,
|
|
@@ -7535,9 +7563,9 @@ var StatusError = ({
|
|
|
7535
7563
|
var StatusError_default = StatusError;
|
|
7536
7564
|
|
|
7537
7565
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
7538
|
-
var
|
|
7566
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7539
7567
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
7540
|
-
return /* @__PURE__ */ (0,
|
|
7568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7541
7569
|
"div",
|
|
7542
7570
|
{
|
|
7543
7571
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -7547,7 +7575,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
7547
7575
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
7548
7576
|
|
|
7549
7577
|
// src/components/groups/LeftTextRightInputGroup.tsx
|
|
7550
|
-
var
|
|
7578
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7551
7579
|
var LeftTextRightInputGroup = ({
|
|
7552
7580
|
type,
|
|
7553
7581
|
title,
|
|
@@ -7557,9 +7585,9 @@ var LeftTextRightInputGroup = ({
|
|
|
7557
7585
|
disabled,
|
|
7558
7586
|
errorText
|
|
7559
7587
|
}) => {
|
|
7560
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
-
/* @__PURE__ */ (0,
|
|
7562
|
-
/* @__PURE__ */ (0,
|
|
7588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "w-full flex flex-row mx-2", children: [
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: title }) }),
|
|
7590
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7563
7591
|
InputGroup_default,
|
|
7564
7592
|
{
|
|
7565
7593
|
type,
|
|
@@ -7575,8 +7603,8 @@ var LeftTextRightInputGroup = ({
|
|
|
7575
7603
|
var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
|
|
7576
7604
|
|
|
7577
7605
|
// src/components/groups/PageTravelGroup.tsx
|
|
7578
|
-
var
|
|
7579
|
-
var
|
|
7606
|
+
var import_react27 = require("react");
|
|
7607
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7580
7608
|
var PageTravelGroup = ({
|
|
7581
7609
|
isImageProcessing,
|
|
7582
7610
|
handleImageProcessing,
|
|
@@ -7585,17 +7613,17 @@ var PageTravelGroup = ({
|
|
|
7585
7613
|
setPageNumber,
|
|
7586
7614
|
setImageReady
|
|
7587
7615
|
}) => {
|
|
7588
|
-
const [totalPageNumber, setTotalPageNumber] = (0,
|
|
7589
|
-
const [newPageNumber, setNewPageNumber] = (0,
|
|
7590
|
-
(0,
|
|
7616
|
+
const [totalPageNumber, setTotalPageNumber] = (0, import_react27.useState)(0);
|
|
7617
|
+
const [newPageNumber, setNewPageNumber] = (0, import_react27.useState)(0);
|
|
7618
|
+
(0, import_react27.useEffect)(() => {
|
|
7591
7619
|
if (!initialTotalPageNumber) return;
|
|
7592
7620
|
setTotalPageNumber(initialTotalPageNumber);
|
|
7593
7621
|
}, [initialTotalPageNumber]);
|
|
7594
|
-
(0,
|
|
7622
|
+
(0, import_react27.useEffect)(() => {
|
|
7595
7623
|
setNewPageNumber(pageNumber + 1);
|
|
7596
7624
|
}, [pageNumber]);
|
|
7597
|
-
return /* @__PURE__ */ (0,
|
|
7598
|
-
pageNumber === 0 ? null : /* @__PURE__ */ (0,
|
|
7625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 flex flex-row justify-center items-center flex-wrap", children: [
|
|
7626
|
+
pageNumber === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7599
7627
|
BaseImage_default,
|
|
7600
7628
|
{
|
|
7601
7629
|
size: "small",
|
|
@@ -7613,7 +7641,7 @@ var PageTravelGroup = ({
|
|
|
7613
7641
|
}
|
|
7614
7642
|
}
|
|
7615
7643
|
) }),
|
|
7616
|
-
Array.from(Array(totalPageNumber).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ (0,
|
|
7644
|
+
Array.from(Array(totalPageNumber).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7617
7645
|
"p",
|
|
7618
7646
|
{
|
|
7619
7647
|
className: `${pageNumber === index ? "text-2xl" : "text-md"} cursor-pointer`,
|
|
@@ -7628,7 +7656,7 @@ var PageTravelGroup = ({
|
|
|
7628
7656
|
children: index + 1
|
|
7629
7657
|
}
|
|
7630
7658
|
) }, index)),
|
|
7631
|
-
totalPageNumber === 0 || pageNumber === totalPageNumber - 1 ? null : /* @__PURE__ */ (0,
|
|
7659
|
+
totalPageNumber === 0 || pageNumber === totalPageNumber - 1 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7632
7660
|
BaseImage_default,
|
|
7633
7661
|
{
|
|
7634
7662
|
size: "small",
|
|
@@ -7646,7 +7674,7 @@ var PageTravelGroup = ({
|
|
|
7646
7674
|
}
|
|
7647
7675
|
}
|
|
7648
7676
|
) }),
|
|
7649
|
-
/* @__PURE__ */ (0,
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7650
7678
|
"input",
|
|
7651
7679
|
{
|
|
7652
7680
|
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`,
|
|
@@ -7670,14 +7698,14 @@ var PageTravelGroup = ({
|
|
|
7670
7698
|
var PageTravelGroup_default = PageTravelGroup;
|
|
7671
7699
|
|
|
7672
7700
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
7673
|
-
var
|
|
7701
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7674
7702
|
var SelectionCheckbox = ({
|
|
7675
7703
|
optionList,
|
|
7676
7704
|
selectedIdList,
|
|
7677
7705
|
handleSelectOnClick,
|
|
7678
7706
|
handleRemoveOnClick
|
|
7679
7707
|
}) => {
|
|
7680
|
-
return /* @__PURE__ */ (0,
|
|
7708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7681
7709
|
"div",
|
|
7682
7710
|
{
|
|
7683
7711
|
className: `${selectedIdList.findIndex(
|
|
@@ -7692,14 +7720,14 @@ var SelectionCheckbox = ({
|
|
|
7692
7720
|
handleRemoveOnClick(option.id);
|
|
7693
7721
|
}
|
|
7694
7722
|
},
|
|
7695
|
-
children: /* @__PURE__ */ (0,
|
|
7723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7696
7724
|
"div",
|
|
7697
7725
|
{
|
|
7698
7726
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
7699
7727
|
(selectedId) => selectedId === option.id
|
|
7700
7728
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
7701
7729
|
children: [
|
|
7702
|
-
/* @__PURE__ */ (0,
|
|
7730
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7703
7731
|
BaseImage_default,
|
|
7704
7732
|
{
|
|
7705
7733
|
src: selectedIdList.findIndex(
|
|
@@ -7709,7 +7737,7 @@ var SelectionCheckbox = ({
|
|
|
7709
7737
|
size: "small"
|
|
7710
7738
|
}
|
|
7711
7739
|
),
|
|
7712
|
-
/* @__PURE__ */ (0,
|
|
7740
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: option.text }) })
|
|
7713
7741
|
]
|
|
7714
7742
|
}
|
|
7715
7743
|
)
|
|
@@ -7720,7 +7748,7 @@ var SelectionCheckbox = ({
|
|
|
7720
7748
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
7721
7749
|
|
|
7722
7750
|
// src/components/tabs/SelectionTab.tsx
|
|
7723
|
-
var
|
|
7751
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7724
7752
|
var SelectionTab = ({
|
|
7725
7753
|
optionList,
|
|
7726
7754
|
selectedId,
|
|
@@ -7730,7 +7758,7 @@ var SelectionTab = ({
|
|
|
7730
7758
|
textColor,
|
|
7731
7759
|
borderColor
|
|
7732
7760
|
}) => {
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
7761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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__ */ (0, import_jsx_runtime54.jsxs)(
|
|
7734
7762
|
"div",
|
|
7735
7763
|
{
|
|
7736
7764
|
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`,
|
|
@@ -7738,8 +7766,8 @@ var SelectionTab = ({
|
|
|
7738
7766
|
handleSelectOnClick(option.id);
|
|
7739
7767
|
},
|
|
7740
7768
|
children: [
|
|
7741
|
-
/* @__PURE__ */ (0,
|
|
7742
|
-
option.subTitle ? /* @__PURE__ */ (0,
|
|
7769
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-lg", children: option.title }),
|
|
7770
|
+
option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-md", children: option.subTitle }) : null
|
|
7743
7771
|
]
|
|
7744
7772
|
},
|
|
7745
7773
|
index
|
|
@@ -7748,20 +7776,20 @@ var SelectionTab = ({
|
|
|
7748
7776
|
var SelectionTab_default = SelectionTab;
|
|
7749
7777
|
|
|
7750
7778
|
// src/components/tabs/SelectionTabFill.tsx
|
|
7751
|
-
var
|
|
7779
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7752
7780
|
var SelectionTabFill = ({
|
|
7753
7781
|
optionList,
|
|
7754
7782
|
selectedId,
|
|
7755
7783
|
handleSelectOnClick
|
|
7756
7784
|
}) => {
|
|
7757
|
-
return /* @__PURE__ */ (0,
|
|
7785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("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__ */ (0, import_jsx_runtime55.jsx)(
|
|
7758
7786
|
"div",
|
|
7759
7787
|
{
|
|
7760
7788
|
className: "cursor-pointer",
|
|
7761
7789
|
onClick: () => {
|
|
7762
7790
|
handleSelectOnClick(option.id);
|
|
7763
7791
|
},
|
|
7764
|
-
children: /* @__PURE__ */ (0,
|
|
7792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7765
7793
|
"p",
|
|
7766
7794
|
{
|
|
7767
7795
|
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`,
|
|
@@ -7775,34 +7803,34 @@ var SelectionTabFill = ({
|
|
|
7775
7803
|
var SelectionTabFill_default = SelectionTabFill;
|
|
7776
7804
|
|
|
7777
7805
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
7778
|
-
var
|
|
7806
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7779
7807
|
var ActivityTemplateLabel = ({
|
|
7780
7808
|
title,
|
|
7781
7809
|
icon,
|
|
7782
7810
|
font
|
|
7783
7811
|
}) => {
|
|
7784
|
-
return /* @__PURE__ */ (0,
|
|
7785
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7786
|
-
/* @__PURE__ */ (0,
|
|
7812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("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__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7813
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
|
|
7814
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7787
7815
|
] }) });
|
|
7788
7816
|
};
|
|
7789
7817
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
7790
7818
|
|
|
7791
7819
|
// src/components/labels/BrandLabel.tsx
|
|
7792
|
-
var
|
|
7820
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7793
7821
|
var BrandLabel = ({ title, icon, font }) => {
|
|
7794
|
-
return /* @__PURE__ */ (0,
|
|
7795
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7796
|
-
/* @__PURE__ */ (0,
|
|
7822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7823
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
|
|
7824
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7797
7825
|
] }) });
|
|
7798
7826
|
};
|
|
7799
7827
|
var BrandLabel_default = BrandLabel;
|
|
7800
7828
|
|
|
7801
7829
|
// src/components/labels/CategoryLabel.tsx
|
|
7802
|
-
var
|
|
7830
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7803
7831
|
var CategoryLabel = ({ title, icon, font }) => {
|
|
7804
|
-
return /* @__PURE__ */ (0,
|
|
7805
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("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__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7833
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7806
7834
|
BaseImage_default,
|
|
7807
7835
|
{
|
|
7808
7836
|
src: "/icons/category-label.webp",
|
|
@@ -7810,40 +7838,40 @@ var CategoryLabel = ({ title, icon, font }) => {
|
|
|
7810
7838
|
size: "xsmall"
|
|
7811
7839
|
}
|
|
7812
7840
|
),
|
|
7813
|
-
/* @__PURE__ */ (0,
|
|
7841
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7814
7842
|
] }) });
|
|
7815
7843
|
};
|
|
7816
7844
|
var CategoryLabel_default = CategoryLabel;
|
|
7817
7845
|
|
|
7818
7846
|
// src/components/labels/CoterieLabel.tsx
|
|
7819
|
-
var
|
|
7847
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7820
7848
|
var CoterieLabel = ({ title, font }) => {
|
|
7821
|
-
return /* @__PURE__ */ (0,
|
|
7849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("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__ */ (0, import_jsx_runtime59.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7822
7850
|
};
|
|
7823
7851
|
var CoterieLabel_default = CoterieLabel;
|
|
7824
7852
|
|
|
7825
7853
|
// src/components/labels/GradeLabel.tsx
|
|
7826
|
-
var
|
|
7854
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7827
7855
|
var GradeLabel = ({ title, font }) => {
|
|
7828
|
-
return /* @__PURE__ */ (0,
|
|
7856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("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__ */ (0, import_jsx_runtime60.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7829
7857
|
};
|
|
7830
7858
|
var GradeLabel_default = GradeLabel;
|
|
7831
7859
|
|
|
7832
7860
|
// src/components/labels/OutcomeLabel.tsx
|
|
7833
|
-
var
|
|
7861
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7834
7862
|
var OutcomeLabel = ({ title, font }) => {
|
|
7835
|
-
return /* @__PURE__ */ (0,
|
|
7836
|
-
/* @__PURE__ */ (0,
|
|
7837
|
-
/* @__PURE__ */ (0,
|
|
7863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("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__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7864
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
|
|
7865
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7838
7866
|
] }) });
|
|
7839
7867
|
};
|
|
7840
7868
|
var OutcomeLabel_default = OutcomeLabel;
|
|
7841
7869
|
|
|
7842
7870
|
// src/components/labels/PersonalLabel.tsx
|
|
7843
|
-
var
|
|
7871
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7844
7872
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
7845
|
-
return /* @__PURE__ */ (0,
|
|
7846
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("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__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7874
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7847
7875
|
BaseImage_default,
|
|
7848
7876
|
{
|
|
7849
7877
|
src: "/icons/personal-label.webp",
|
|
@@ -7851,16 +7879,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
7851
7879
|
size: "xsmall"
|
|
7852
7880
|
}
|
|
7853
7881
|
),
|
|
7854
|
-
/* @__PURE__ */ (0,
|
|
7882
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7855
7883
|
] }) });
|
|
7856
7884
|
};
|
|
7857
7885
|
var PersonalLabel_default = PersonalLabel;
|
|
7858
7886
|
|
|
7859
7887
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
7860
|
-
var
|
|
7888
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7861
7889
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
7862
|
-
return /* @__PURE__ */ (0,
|
|
7863
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("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__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7891
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7864
7892
|
BaseImage_default,
|
|
7865
7893
|
{
|
|
7866
7894
|
src: "/icons/publishing-house-label.webp",
|
|
@@ -7868,55 +7896,55 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
7868
7896
|
size: "xsmall"
|
|
7869
7897
|
}
|
|
7870
7898
|
),
|
|
7871
|
-
/* @__PURE__ */ (0,
|
|
7899
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7872
7900
|
] }) });
|
|
7873
7901
|
};
|
|
7874
7902
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
7875
7903
|
|
|
7876
7904
|
// src/components/labels/ActivityLabel.tsx
|
|
7877
|
-
var
|
|
7905
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7878
7906
|
var ActivityLabel = ({ title, font }) => {
|
|
7879
|
-
return /* @__PURE__ */ (0,
|
|
7907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7880
7908
|
};
|
|
7881
7909
|
var ActivityLabel_default = ActivityLabel;
|
|
7882
7910
|
|
|
7883
7911
|
// src/components/infos/InfoWithText.tsx
|
|
7884
|
-
var
|
|
7912
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7885
7913
|
var InfoWithText = (props) => {
|
|
7886
7914
|
const { value } = props;
|
|
7887
|
-
return /* @__PURE__ */ (0,
|
|
7888
|
-
/* @__PURE__ */ (0,
|
|
7889
|
-
/* @__PURE__ */ (0,
|
|
7915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
|
|
7916
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
|
|
7917
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "", children: value }) })
|
|
7890
7918
|
] });
|
|
7891
7919
|
};
|
|
7892
7920
|
var InfoWithText_default = InfoWithText;
|
|
7893
7921
|
|
|
7894
7922
|
// src/components/titles/BaseTitle.tsx
|
|
7895
|
-
var
|
|
7923
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7896
7924
|
var BaseTitle = ({
|
|
7897
7925
|
title,
|
|
7898
7926
|
totalItemCount,
|
|
7899
7927
|
itemName,
|
|
7900
7928
|
description
|
|
7901
7929
|
}) => {
|
|
7902
|
-
return /* @__PURE__ */ (0,
|
|
7903
|
-
/* @__PURE__ */ (0,
|
|
7930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
|
|
7931
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("p", { className: "text-2xl font-medium", children: [
|
|
7904
7932
|
title,
|
|
7905
|
-
totalItemCount && itemName ? /* @__PURE__ */ (0,
|
|
7933
|
+
totalItemCount && itemName ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "p-2 text-base text-catchup-blue-600 border border-catchup-blue-300 rounded-catchup-3xlarge mx-2 bg-catchup-blue-100", children: [
|
|
7906
7934
|
totalItemCount,
|
|
7907
7935
|
" ",
|
|
7908
7936
|
itemName
|
|
7909
7937
|
] }) : null
|
|
7910
7938
|
] }),
|
|
7911
|
-
description ? /* @__PURE__ */ (0,
|
|
7939
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "", children: description }) : null
|
|
7912
7940
|
] });
|
|
7913
7941
|
};
|
|
7914
7942
|
var BaseTitle_default = BaseTitle;
|
|
7915
7943
|
|
|
7916
7944
|
// src/components/titles/SubTitle.tsx
|
|
7917
|
-
var
|
|
7945
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7918
7946
|
var SubTitle = ({ title }) => {
|
|
7919
|
-
return /* @__PURE__ */ (0,
|
|
7947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
|
|
7920
7948
|
};
|
|
7921
7949
|
var SubTitle_default = SubTitle;
|
|
7922
7950
|
|