catchup-library-web 1.14.3 → 1.14.5
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/catchup-library-web-1.14.4-1.tgz +0 -0
- package/catchup-library-web-1.14.4-2.tgz +0 -0
- package/catchup-library-web-1.14.4-3.tgz +0 -0
- package/catchup-library-web-1.14.4-4.tgz +0 -0
- package/catchup-library-web-1.14.4-5.tgz +0 -0
- package/catchup-library-web-1.14.4-6.tgz +0 -0
- package/dist/index.js +20 -29
- package/dist/index.mjs +39 -48
- package/package.json +1 -1
- package/src/components/activities/body-content/ShowBodyMediaByContentType.tsx +13 -24
- package/src/utilization/CatchtivityUtilization.ts +9 -11
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -2434,33 +2434,31 @@ var findBestFitActivity = (activity, individualModelList, outcomeModelList) => {
|
|
|
2434
2434
|
} = parsedData;
|
|
2435
2435
|
const difficultyMap = {};
|
|
2436
2436
|
if (orderingDifficulty) {
|
|
2437
|
-
difficultyMap["orderingDifficulty"] =
|
|
2437
|
+
difficultyMap["orderingDifficulty"] = orderingDifficulty;
|
|
2438
2438
|
}
|
|
2439
2439
|
if (dropdownDifficulty) {
|
|
2440
|
-
difficultyMap["dropdownDifficulty"] =
|
|
2440
|
+
difficultyMap["dropdownDifficulty"] = dropdownDifficulty;
|
|
2441
2441
|
}
|
|
2442
2442
|
if (MCSADifficulty) {
|
|
2443
|
-
difficultyMap["MCSADifficulty"] =
|
|
2443
|
+
difficultyMap["MCSADifficulty"] = MCSADifficulty;
|
|
2444
2444
|
}
|
|
2445
2445
|
if (MCMADifficulty) {
|
|
2446
|
-
difficultyMap["MCMADifficulty"] =
|
|
2446
|
+
difficultyMap["MCMADifficulty"] = MCMADifficulty;
|
|
2447
2447
|
}
|
|
2448
2448
|
if (matchingDifficulty) {
|
|
2449
|
-
difficultyMap["matchingDifficulty"] =
|
|
2449
|
+
difficultyMap["matchingDifficulty"] = matchingDifficulty;
|
|
2450
2450
|
}
|
|
2451
2451
|
if (groupingDifficulty) {
|
|
2452
|
-
difficultyMap["groupingDifficulty"] =
|
|
2452
|
+
difficultyMap["groupingDifficulty"] = groupingDifficulty;
|
|
2453
2453
|
}
|
|
2454
2454
|
if (fillInTheBlanksDifficulty) {
|
|
2455
|
-
difficultyMap["fillInTheBlanksDifficulty"] =
|
|
2456
|
-
fillInTheBlanksDifficulty
|
|
2457
|
-
);
|
|
2455
|
+
difficultyMap["fillInTheBlanksDifficulty"] = fillInTheBlanksDifficulty;
|
|
2458
2456
|
}
|
|
2459
2457
|
if (trueFalseDifficulty) {
|
|
2460
|
-
difficultyMap["trueFalseDifficulty"] =
|
|
2458
|
+
difficultyMap["trueFalseDifficulty"] = trueFalseDifficulty;
|
|
2461
2459
|
}
|
|
2462
2460
|
if (openEndedDifficulty) {
|
|
2463
|
-
difficultyMap["openEndedDifficulty"] =
|
|
2461
|
+
difficultyMap["openEndedDifficulty"] = openEndedDifficulty;
|
|
2464
2462
|
}
|
|
2465
2463
|
let coterieField = "VERBAL";
|
|
2466
2464
|
if (coterieType === "MATHEMATICS" || coterieType === "BIOLOGY" || coterieType === "PHYSICS" || coterieType === "CHEMISTRY" || coterieType === "SCIENCE") {
|
|
@@ -3272,15 +3270,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3272
3270
|
return "";
|
|
3273
3271
|
}
|
|
3274
3272
|
};
|
|
3275
|
-
const renderSpecialExpressions = (inputPart
|
|
3276
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3277
|
-
"span",
|
|
3278
|
-
{
|
|
3279
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3280
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3281
|
-
},
|
|
3282
|
-
`${parentKey}-expr-${partIndex}`
|
|
3283
|
-
);
|
|
3273
|
+
const renderSpecialExpressions = (inputPart) => {
|
|
3274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value });
|
|
3284
3275
|
};
|
|
3285
3276
|
const balanceSpecialChars = (text) => {
|
|
3286
3277
|
let result = text;
|
|
@@ -3297,8 +3288,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3297
3288
|
};
|
|
3298
3289
|
const renderTextContent = (text, itemKey) => {
|
|
3299
3290
|
const balancedText = balanceSpecialChars(text);
|
|
3300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl
|
|
3301
|
-
(inputPart
|
|
3291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3292
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3302
3293
|
) }, itemKey);
|
|
3303
3294
|
};
|
|
3304
3295
|
const handleOpenFullScreen = (imageSource) => {
|
|
@@ -3330,8 +3321,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3330
3321
|
currentIndex++;
|
|
3331
3322
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3332
3323
|
valuePartList.push(
|
|
3333
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold
|
|
3334
|
-
(inputPart
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3325
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3335
3326
|
) }, itemKey)
|
|
3336
3327
|
);
|
|
3337
3328
|
copyValue = copyValue.substring(
|
|
@@ -3510,7 +3501,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3510
3501
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3511
3502
|
children: [
|
|
3512
3503
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3513
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl
|
|
3504
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl", children: imageText })
|
|
3514
3505
|
]
|
|
3515
3506
|
},
|
|
3516
3507
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3582,9 +3573,9 @@ var ShowBodyMediaByContentType = ({
|
|
|
3582
3573
|
const RenderMainContent = () => {
|
|
3583
3574
|
switch (type) {
|
|
3584
3575
|
case "TEXT":
|
|
3585
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-
|
|
3576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-1 flex flex-row flex-wrap items-center mx-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "whitespace-pre-wrap", children: retrieveValueParts(value) }) });
|
|
3586
3577
|
case "IMAGE":
|
|
3587
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3588
3579
|
"div",
|
|
3589
3580
|
{
|
|
3590
3581
|
className: `${convertToPercentage(
|
|
@@ -3620,7 +3611,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3620
3611
|
}
|
|
3621
3612
|
) });
|
|
3622
3613
|
case "VIDEO":
|
|
3623
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-
|
|
3614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3624
3615
|
"video",
|
|
3625
3616
|
{
|
|
3626
3617
|
src: value,
|
|
@@ -3631,7 +3622,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3631
3622
|
}
|
|
3632
3623
|
) });
|
|
3633
3624
|
case "AUDIO":
|
|
3634
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-
|
|
3625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3635
3626
|
default:
|
|
3636
3627
|
return null;
|
|
3637
3628
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2225,33 +2225,31 @@ var findBestFitActivity = (activity, individualModelList, outcomeModelList) => {
|
|
|
2225
2225
|
} = parsedData;
|
|
2226
2226
|
const difficultyMap = {};
|
|
2227
2227
|
if (orderingDifficulty) {
|
|
2228
|
-
difficultyMap["orderingDifficulty"] =
|
|
2228
|
+
difficultyMap["orderingDifficulty"] = orderingDifficulty;
|
|
2229
2229
|
}
|
|
2230
2230
|
if (dropdownDifficulty) {
|
|
2231
|
-
difficultyMap["dropdownDifficulty"] =
|
|
2231
|
+
difficultyMap["dropdownDifficulty"] = dropdownDifficulty;
|
|
2232
2232
|
}
|
|
2233
2233
|
if (MCSADifficulty) {
|
|
2234
|
-
difficultyMap["MCSADifficulty"] =
|
|
2234
|
+
difficultyMap["MCSADifficulty"] = MCSADifficulty;
|
|
2235
2235
|
}
|
|
2236
2236
|
if (MCMADifficulty) {
|
|
2237
|
-
difficultyMap["MCMADifficulty"] =
|
|
2237
|
+
difficultyMap["MCMADifficulty"] = MCMADifficulty;
|
|
2238
2238
|
}
|
|
2239
2239
|
if (matchingDifficulty) {
|
|
2240
|
-
difficultyMap["matchingDifficulty"] =
|
|
2240
|
+
difficultyMap["matchingDifficulty"] = matchingDifficulty;
|
|
2241
2241
|
}
|
|
2242
2242
|
if (groupingDifficulty) {
|
|
2243
|
-
difficultyMap["groupingDifficulty"] =
|
|
2243
|
+
difficultyMap["groupingDifficulty"] = groupingDifficulty;
|
|
2244
2244
|
}
|
|
2245
2245
|
if (fillInTheBlanksDifficulty) {
|
|
2246
|
-
difficultyMap["fillInTheBlanksDifficulty"] =
|
|
2247
|
-
fillInTheBlanksDifficulty
|
|
2248
|
-
);
|
|
2246
|
+
difficultyMap["fillInTheBlanksDifficulty"] = fillInTheBlanksDifficulty;
|
|
2249
2247
|
}
|
|
2250
2248
|
if (trueFalseDifficulty) {
|
|
2251
|
-
difficultyMap["trueFalseDifficulty"] =
|
|
2249
|
+
difficultyMap["trueFalseDifficulty"] = trueFalseDifficulty;
|
|
2252
2250
|
}
|
|
2253
2251
|
if (openEndedDifficulty) {
|
|
2254
|
-
difficultyMap["openEndedDifficulty"] =
|
|
2252
|
+
difficultyMap["openEndedDifficulty"] = openEndedDifficulty;
|
|
2255
2253
|
}
|
|
2256
2254
|
let coterieField = "VERBAL";
|
|
2257
2255
|
if (coterieType === "MATHEMATICS" || coterieType === "BIOLOGY" || coterieType === "PHYSICS" || coterieType === "CHEMISTRY" || coterieType === "SCIENCE") {
|
|
@@ -3042,7 +3040,7 @@ var retrieveDifficultyByActivityTypeFromData = (type, data) => {
|
|
|
3042
3040
|
|
|
3043
3041
|
// src/components/activities/body-content/ShowBodyMediaByContentType.tsx
|
|
3044
3042
|
import { InlineMath } from "react-katex";
|
|
3045
|
-
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3043
|
+
import { Fragment, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3046
3044
|
var ShowBodyMediaByContentType = ({
|
|
3047
3045
|
index,
|
|
3048
3046
|
type,
|
|
@@ -3063,15 +3061,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3063
3061
|
return "";
|
|
3064
3062
|
}
|
|
3065
3063
|
};
|
|
3066
|
-
const renderSpecialExpressions = (inputPart
|
|
3067
|
-
return /* @__PURE__ */ jsx16(
|
|
3068
|
-
"span",
|
|
3069
|
-
{
|
|
3070
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3071
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3072
|
-
},
|
|
3073
|
-
`${parentKey}-expr-${partIndex}`
|
|
3074
|
-
);
|
|
3064
|
+
const renderSpecialExpressions = (inputPart) => {
|
|
3065
|
+
return /* @__PURE__ */ jsx16(Fragment, { children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value });
|
|
3075
3066
|
};
|
|
3076
3067
|
const balanceSpecialChars = (text) => {
|
|
3077
3068
|
let result = text;
|
|
@@ -3088,8 +3079,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3088
3079
|
};
|
|
3089
3080
|
const renderTextContent = (text, itemKey) => {
|
|
3090
3081
|
const balancedText = balanceSpecialChars(text);
|
|
3091
|
-
return /* @__PURE__ */ jsx16("span", { className: "text-xl
|
|
3092
|
-
(inputPart
|
|
3082
|
+
return /* @__PURE__ */ jsx16("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3083
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3093
3084
|
) }, itemKey);
|
|
3094
3085
|
};
|
|
3095
3086
|
const handleOpenFullScreen = (imageSource) => {
|
|
@@ -3121,8 +3112,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3121
3112
|
currentIndex++;
|
|
3122
3113
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3123
3114
|
valuePartList.push(
|
|
3124
|
-
/* @__PURE__ */ jsx16("span", { className: "text-xl font-bold
|
|
3125
|
-
(inputPart
|
|
3115
|
+
/* @__PURE__ */ jsx16("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3116
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3126
3117
|
) }, itemKey)
|
|
3127
3118
|
);
|
|
3128
3119
|
copyValue = copyValue.substring(
|
|
@@ -3301,7 +3292,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3301
3292
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3302
3293
|
children: [
|
|
3303
3294
|
/* @__PURE__ */ jsx16("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ jsx16("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3304
|
-
/* @__PURE__ */ jsx16("span", { className: "text-xl
|
|
3295
|
+
/* @__PURE__ */ jsx16("span", { className: "text-xl", children: imageText })
|
|
3305
3296
|
]
|
|
3306
3297
|
},
|
|
3307
3298
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3373,9 +3364,9 @@ var ShowBodyMediaByContentType = ({
|
|
|
3373
3364
|
const RenderMainContent = () => {
|
|
3374
3365
|
switch (type) {
|
|
3375
3366
|
case "TEXT":
|
|
3376
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3367
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-row flex-wrap items-center mx-auto w-full", children: /* @__PURE__ */ jsx16("p", { className: "whitespace-pre-wrap", children: retrieveValueParts(value) }) });
|
|
3377
3368
|
case "IMAGE":
|
|
3378
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3369
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ jsxs10(
|
|
3379
3370
|
"div",
|
|
3380
3371
|
{
|
|
3381
3372
|
className: `${convertToPercentage(
|
|
@@ -3411,7 +3402,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3411
3402
|
}
|
|
3412
3403
|
) });
|
|
3413
3404
|
case "VIDEO":
|
|
3414
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3405
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ jsx16(
|
|
3415
3406
|
"video",
|
|
3416
3407
|
{
|
|
3417
3408
|
src: value,
|
|
@@ -3422,7 +3413,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3422
3413
|
}
|
|
3423
3414
|
) });
|
|
3424
3415
|
case "AUDIO":
|
|
3425
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3416
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ jsx16("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3426
3417
|
default:
|
|
3427
3418
|
return null;
|
|
3428
3419
|
}
|
|
@@ -3549,7 +3540,7 @@ import { InlineMath as InlineMath2 } from "react-katex";
|
|
|
3549
3540
|
// src/components/groups/InputGroup.tsx
|
|
3550
3541
|
import Select from "react-select";
|
|
3551
3542
|
import { useEffect as useEffect3, useRef, useState as useState11, useCallback } from "react";
|
|
3552
|
-
import { Fragment, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3543
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3553
3544
|
var InputGroup = ({
|
|
3554
3545
|
type,
|
|
3555
3546
|
title,
|
|
@@ -3968,7 +3959,7 @@ var InputGroup = ({
|
|
|
3968
3959
|
return CheckboxInputGroup();
|
|
3969
3960
|
}
|
|
3970
3961
|
};
|
|
3971
|
-
return /* @__PURE__ */ jsxs11(
|
|
3962
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
3972
3963
|
RenderMainContent(),
|
|
3973
3964
|
/* @__PURE__ */ jsx20(MathConstructorModal, {})
|
|
3974
3965
|
] });
|
|
@@ -4929,7 +4920,7 @@ var useScreenSize = () => {
|
|
|
4929
4920
|
var useScreenSize_default = useScreenSize;
|
|
4930
4921
|
|
|
4931
4922
|
// src/components/activities/material-content/GroupingActivityMaterialContent.tsx
|
|
4932
|
-
import { Fragment as
|
|
4923
|
+
import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4933
4924
|
var GroupingActivityMaterialContent = ({
|
|
4934
4925
|
uniqueValue,
|
|
4935
4926
|
answer,
|
|
@@ -5028,7 +5019,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5028
5019
|
};
|
|
5029
5020
|
const answerMap = retrieveAnswerMap();
|
|
5030
5021
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5031
|
-
return /* @__PURE__ */ jsxs18(
|
|
5022
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
5032
5023
|
/* @__PURE__ */ jsx29(
|
|
5033
5024
|
"div",
|
|
5034
5025
|
{
|
|
@@ -5206,7 +5197,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5206
5197
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5207
5198
|
|
|
5208
5199
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5209
|
-
import { Fragment as
|
|
5200
|
+
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5210
5201
|
var GroupingActivityContent = ({
|
|
5211
5202
|
answer,
|
|
5212
5203
|
data,
|
|
@@ -5231,7 +5222,7 @@ var GroupingActivityContent = ({
|
|
|
5231
5222
|
}
|
|
5232
5223
|
changeAnswer(answer2);
|
|
5233
5224
|
};
|
|
5234
|
-
return /* @__PURE__ */ jsxs19(
|
|
5225
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
5235
5226
|
/* @__PURE__ */ jsx30(
|
|
5236
5227
|
ActivityBodyContent_default,
|
|
5237
5228
|
{
|
|
@@ -5261,7 +5252,7 @@ var GroupingActivityContent_default = GroupingActivityContent;
|
|
|
5261
5252
|
import { useEffect as useEffect11, useRef as useRef5, useState as useState20 } from "react";
|
|
5262
5253
|
import { useDrop as useDrop4 } from "react-dnd";
|
|
5263
5254
|
import { InlineMath as InlineMath5 } from "react-katex";
|
|
5264
|
-
import { Fragment as
|
|
5255
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5265
5256
|
var MatchingActivityMaterialContent = ({
|
|
5266
5257
|
uniqueValue,
|
|
5267
5258
|
answer,
|
|
@@ -5357,7 +5348,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5357
5348
|
};
|
|
5358
5349
|
const answerMap = retrieveAnswerMap();
|
|
5359
5350
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5360
|
-
return /* @__PURE__ */ jsxs20(
|
|
5351
|
+
return /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
5361
5352
|
/* @__PURE__ */ jsx31(
|
|
5362
5353
|
"div",
|
|
5363
5354
|
{
|
|
@@ -5513,7 +5504,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5513
5504
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
5514
5505
|
|
|
5515
5506
|
// src/components/activities/MatchingActivityContent.tsx
|
|
5516
|
-
import { Fragment as
|
|
5507
|
+
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5517
5508
|
var MatchingActivityContent = ({
|
|
5518
5509
|
answer,
|
|
5519
5510
|
data,
|
|
@@ -5534,7 +5525,7 @@ var MatchingActivityContent = ({
|
|
|
5534
5525
|
answerMap[key] = value;
|
|
5535
5526
|
changeAnswer(answer2);
|
|
5536
5527
|
};
|
|
5537
|
-
return /* @__PURE__ */ jsxs21(
|
|
5528
|
+
return /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
5538
5529
|
/* @__PURE__ */ jsx32(
|
|
5539
5530
|
ActivityBodyContent_default,
|
|
5540
5531
|
{
|
|
@@ -5861,7 +5852,7 @@ var MCSAActivityContent = ({
|
|
|
5861
5852
|
var MCSAActivityContent_default = MCSAActivityContent;
|
|
5862
5853
|
|
|
5863
5854
|
// src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
|
|
5864
|
-
import { Fragment as
|
|
5855
|
+
import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5865
5856
|
var OpenEndedActivityMaterialContent = ({
|
|
5866
5857
|
answer,
|
|
5867
5858
|
contentMap,
|
|
@@ -5897,7 +5888,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5897
5888
|
);
|
|
5898
5889
|
};
|
|
5899
5890
|
const answerMap = retrieveAnswerMap();
|
|
5900
|
-
return /* @__PURE__ */ jsx37(
|
|
5891
|
+
return /* @__PURE__ */ jsx37(Fragment7, { children: /* @__PURE__ */ jsxs26("div", { className: "", children: [
|
|
5901
5892
|
/* @__PURE__ */ jsx37("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx37("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
5902
5893
|
/* @__PURE__ */ jsx37("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
|
|
5903
5894
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : null
|
|
@@ -5906,7 +5897,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5906
5897
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
5907
5898
|
|
|
5908
5899
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
5909
|
-
import { Fragment as
|
|
5900
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5910
5901
|
var OpenEndedActivityContent = ({
|
|
5911
5902
|
answer,
|
|
5912
5903
|
data,
|
|
@@ -5938,7 +5929,7 @@ var OpenEndedActivityContent = ({
|
|
|
5938
5929
|
)
|
|
5939
5930
|
}
|
|
5940
5931
|
),
|
|
5941
|
-
showMaterialContent ? /* @__PURE__ */ jsxs27(
|
|
5932
|
+
showMaterialContent ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
5942
5933
|
/* @__PURE__ */ jsx38(
|
|
5943
5934
|
"div",
|
|
5944
5935
|
{
|
|
@@ -6178,7 +6169,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6178
6169
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6179
6170
|
|
|
6180
6171
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6181
|
-
import { Fragment as
|
|
6172
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6182
6173
|
var OrderingActivityContent = ({
|
|
6183
6174
|
answer,
|
|
6184
6175
|
data,
|
|
@@ -6201,7 +6192,7 @@ var OrderingActivityContent = ({
|
|
|
6201
6192
|
answerMap[secondaryKey] = prevValue;
|
|
6202
6193
|
changeAnswer(answer2);
|
|
6203
6194
|
};
|
|
6204
|
-
return /* @__PURE__ */ jsxs29(
|
|
6195
|
+
return /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
6205
6196
|
/* @__PURE__ */ jsx41(
|
|
6206
6197
|
ActivityBodyContent_default,
|
|
6207
6198
|
{
|
|
@@ -6230,7 +6221,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
|
|
|
6230
6221
|
// src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
|
|
6231
6222
|
import { useEffect as useEffect13, useState as useState22 } from "react";
|
|
6232
6223
|
import { InlineMath as InlineMath9 } from "react-katex";
|
|
6233
|
-
import { Fragment as
|
|
6224
|
+
import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6234
6225
|
var TrueFalseActivityMaterialContent = ({
|
|
6235
6226
|
uniqueValue,
|
|
6236
6227
|
answer,
|
|
@@ -6352,7 +6343,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6352
6343
|
},
|
|
6353
6344
|
index
|
|
6354
6345
|
);
|
|
6355
|
-
}) }) : /* @__PURE__ */ jsxs30(
|
|
6346
|
+
}) }) : /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
6356
6347
|
answerMap.trueList.map((item) => /* @__PURE__ */ jsxs30("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6357
6348
|
/* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: item }) }),
|
|
6358
6349
|
/* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "underline", children: i18n_default.t("true") }) })
|
package/package.json
CHANGED
|
@@ -33,18 +33,9 @@ const ShowBodyMediaByContentType = ({
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
// Helper function to render special expressions with proper keys
|
|
36
|
-
const renderSpecialExpressions = (
|
|
37
|
-
inputPart: IInputPart,
|
|
38
|
-
partIndex: number,
|
|
39
|
-
parentKey: string
|
|
40
|
-
) => {
|
|
36
|
+
const renderSpecialExpressions = (inputPart: IInputPart) => {
|
|
41
37
|
return (
|
|
42
|
-
|
|
43
|
-
key={`${parentKey}-expr-${partIndex}`}
|
|
44
|
-
className={`${inputPart.isBold ? "font-bold" : ""} ${
|
|
45
|
-
inputPart.isUnderline ? "underline" : ""
|
|
46
|
-
}`}
|
|
47
|
-
>
|
|
38
|
+
<>
|
|
48
39
|
{inputPart.isEquation ? (
|
|
49
40
|
<span className="text-2xl">
|
|
50
41
|
<InlineMath math={inputPart.value} />
|
|
@@ -52,7 +43,7 @@ const ShowBodyMediaByContentType = ({
|
|
|
52
43
|
) : (
|
|
53
44
|
inputPart.value
|
|
54
45
|
)}
|
|
55
|
-
|
|
46
|
+
</>
|
|
56
47
|
);
|
|
57
48
|
};
|
|
58
49
|
|
|
@@ -83,10 +74,9 @@ const ShowBodyMediaByContentType = ({
|
|
|
83
74
|
const balancedText = balanceSpecialChars(text);
|
|
84
75
|
|
|
85
76
|
return (
|
|
86
|
-
<span key={itemKey} className="text-xl
|
|
77
|
+
<span key={itemKey} className="text-xl">
|
|
87
78
|
{constructInputWithSpecialExpressionList(balancedText).map(
|
|
88
|
-
(inputPart: IInputPart
|
|
89
|
-
renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
79
|
+
(inputPart: IInputPart) => renderSpecialExpressions(inputPart)
|
|
90
80
|
)}
|
|
91
81
|
</span>
|
|
92
82
|
);
|
|
@@ -131,10 +121,9 @@ const ShowBodyMediaByContentType = ({
|
|
|
131
121
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
132
122
|
|
|
133
123
|
valuePartList.push(
|
|
134
|
-
<span key={itemKey} className="text-xl font-bold
|
|
124
|
+
<span key={itemKey} className="text-xl font-bold">
|
|
135
125
|
{constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
136
|
-
(inputPart: IInputPart
|
|
137
|
-
renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
126
|
+
(inputPart: IInputPart) => renderSpecialExpressions(inputPart)
|
|
138
127
|
)}
|
|
139
128
|
</span>
|
|
140
129
|
);
|
|
@@ -331,7 +320,7 @@ const ShowBodyMediaByContentType = ({
|
|
|
331
320
|
<div className="absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2">
|
|
332
321
|
<p className="font-bold">{i18n.t("image_description")}</p>
|
|
333
322
|
</div>
|
|
334
|
-
<span className="text-xl
|
|
323
|
+
<span className="text-xl">{imageText}</span>
|
|
335
324
|
</div>
|
|
336
325
|
);
|
|
337
326
|
} else {
|
|
@@ -403,13 +392,13 @@ const ShowBodyMediaByContentType = ({
|
|
|
403
392
|
switch (type) {
|
|
404
393
|
case "TEXT":
|
|
405
394
|
return (
|
|
406
|
-
<div className="mb-
|
|
407
|
-
{retrieveValueParts(value)}
|
|
395
|
+
<div className="mb-1 flex flex-row flex-wrap items-center mx-auto w-full">
|
|
396
|
+
<p className="whitespace-pre-wrap">{retrieveValueParts(value)}</p>
|
|
408
397
|
</div>
|
|
409
398
|
);
|
|
410
399
|
case "IMAGE":
|
|
411
400
|
return (
|
|
412
|
-
<div className="mb-
|
|
401
|
+
<div className="mb-1 flex flex-col items-center relative">
|
|
413
402
|
<div
|
|
414
403
|
className={`${convertToPercentage(
|
|
415
404
|
size || ""
|
|
@@ -437,7 +426,7 @@ const ShowBodyMediaByContentType = ({
|
|
|
437
426
|
);
|
|
438
427
|
case "VIDEO":
|
|
439
428
|
return (
|
|
440
|
-
<div className="mb-
|
|
429
|
+
<div className="mb-1 flex flex-col items-center">
|
|
441
430
|
<video
|
|
442
431
|
src={value}
|
|
443
432
|
className={`${convertToPercentage(
|
|
@@ -449,7 +438,7 @@ const ShowBodyMediaByContentType = ({
|
|
|
449
438
|
);
|
|
450
439
|
case "AUDIO":
|
|
451
440
|
return (
|
|
452
|
-
<div className="mb-
|
|
441
|
+
<div className="mb-1 flex flex-col items-center">
|
|
453
442
|
<audio src={value} controls className="rounded-catchup-xlarge" />
|
|
454
443
|
</div>
|
|
455
444
|
);
|
|
@@ -1419,33 +1419,31 @@ export const findBestFitActivity = (
|
|
|
1419
1419
|
} = parsedData;
|
|
1420
1420
|
const difficultyMap: any = {};
|
|
1421
1421
|
if (orderingDifficulty) {
|
|
1422
|
-
difficultyMap["orderingDifficulty"] =
|
|
1422
|
+
difficultyMap["orderingDifficulty"] = orderingDifficulty;
|
|
1423
1423
|
}
|
|
1424
1424
|
if (dropdownDifficulty) {
|
|
1425
|
-
difficultyMap["dropdownDifficulty"] =
|
|
1425
|
+
difficultyMap["dropdownDifficulty"] = dropdownDifficulty;
|
|
1426
1426
|
}
|
|
1427
1427
|
if (MCSADifficulty) {
|
|
1428
|
-
difficultyMap["MCSADifficulty"] =
|
|
1428
|
+
difficultyMap["MCSADifficulty"] = MCSADifficulty;
|
|
1429
1429
|
}
|
|
1430
1430
|
if (MCMADifficulty) {
|
|
1431
|
-
difficultyMap["MCMADifficulty"] =
|
|
1431
|
+
difficultyMap["MCMADifficulty"] = MCMADifficulty;
|
|
1432
1432
|
}
|
|
1433
1433
|
if (matchingDifficulty) {
|
|
1434
|
-
difficultyMap["matchingDifficulty"] =
|
|
1434
|
+
difficultyMap["matchingDifficulty"] = matchingDifficulty;
|
|
1435
1435
|
}
|
|
1436
1436
|
if (groupingDifficulty) {
|
|
1437
|
-
difficultyMap["groupingDifficulty"] =
|
|
1437
|
+
difficultyMap["groupingDifficulty"] = groupingDifficulty;
|
|
1438
1438
|
}
|
|
1439
1439
|
if (fillInTheBlanksDifficulty) {
|
|
1440
|
-
difficultyMap["fillInTheBlanksDifficulty"] =
|
|
1441
|
-
fillInTheBlanksDifficulty
|
|
1442
|
-
);
|
|
1440
|
+
difficultyMap["fillInTheBlanksDifficulty"] = fillInTheBlanksDifficulty;
|
|
1443
1441
|
}
|
|
1444
1442
|
if (trueFalseDifficulty) {
|
|
1445
|
-
difficultyMap["trueFalseDifficulty"] =
|
|
1443
|
+
difficultyMap["trueFalseDifficulty"] = trueFalseDifficulty;
|
|
1446
1444
|
}
|
|
1447
1445
|
if (openEndedDifficulty) {
|
|
1448
|
-
difficultyMap["openEndedDifficulty"] =
|
|
1446
|
+
difficultyMap["openEndedDifficulty"] = openEndedDifficulty;
|
|
1449
1447
|
}
|
|
1450
1448
|
let coterieField = "VERBAL";
|
|
1451
1449
|
if (
|