catchup-library-web 1.14.4 → 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 +11 -18
- package/dist/index.mjs +30 -37
- package/package.json +1 -1
- package/src/components/activities/body-content/ShowBodyMediaByContentType.tsx +13 -24
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -3270,15 +3270,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3270
3270
|
return "";
|
|
3271
3271
|
}
|
|
3272
3272
|
};
|
|
3273
|
-
const renderSpecialExpressions = (inputPart
|
|
3274
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3275
|
-
"span",
|
|
3276
|
-
{
|
|
3277
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3278
|
-
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
|
|
3279
|
-
},
|
|
3280
|
-
`${parentKey}-expr-${partIndex}`
|
|
3281
|
-
);
|
|
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 });
|
|
3282
3275
|
};
|
|
3283
3276
|
const balanceSpecialChars = (text) => {
|
|
3284
3277
|
let result = text;
|
|
@@ -3295,8 +3288,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3295
3288
|
};
|
|
3296
3289
|
const renderTextContent = (text, itemKey) => {
|
|
3297
3290
|
const balancedText = balanceSpecialChars(text);
|
|
3298
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl
|
|
3299
|
-
(inputPart
|
|
3291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3292
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3300
3293
|
) }, itemKey);
|
|
3301
3294
|
};
|
|
3302
3295
|
const handleOpenFullScreen = (imageSource) => {
|
|
@@ -3328,8 +3321,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3328
3321
|
currentIndex++;
|
|
3329
3322
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3330
3323
|
valuePartList.push(
|
|
3331
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold
|
|
3332
|
-
(inputPart
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3325
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3333
3326
|
) }, itemKey)
|
|
3334
3327
|
);
|
|
3335
3328
|
copyValue = copyValue.substring(
|
|
@@ -3508,7 +3501,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3508
3501
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3509
3502
|
children: [
|
|
3510
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") }) }),
|
|
3511
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl
|
|
3504
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl", children: imageText })
|
|
3512
3505
|
]
|
|
3513
3506
|
},
|
|
3514
3507
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3580,9 +3573,9 @@ var ShowBodyMediaByContentType = ({
|
|
|
3580
3573
|
const RenderMainContent = () => {
|
|
3581
3574
|
switch (type) {
|
|
3582
3575
|
case "TEXT":
|
|
3583
|
-
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) }) });
|
|
3584
3577
|
case "IMAGE":
|
|
3585
|
-
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)(
|
|
3586
3579
|
"div",
|
|
3587
3580
|
{
|
|
3588
3581
|
className: `${convertToPercentage(
|
|
@@ -3618,7 +3611,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3618
3611
|
}
|
|
3619
3612
|
) });
|
|
3620
3613
|
case "VIDEO":
|
|
3621
|
-
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)(
|
|
3622
3615
|
"video",
|
|
3623
3616
|
{
|
|
3624
3617
|
src: value,
|
|
@@ -3629,7 +3622,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3629
3622
|
}
|
|
3630
3623
|
) });
|
|
3631
3624
|
case "AUDIO":
|
|
3632
|
-
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" }) });
|
|
3633
3626
|
default:
|
|
3634
3627
|
return null;
|
|
3635
3628
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3040,7 +3040,7 @@ var retrieveDifficultyByActivityTypeFromData = (type, data) => {
|
|
|
3040
3040
|
|
|
3041
3041
|
// src/components/activities/body-content/ShowBodyMediaByContentType.tsx
|
|
3042
3042
|
import { InlineMath } from "react-katex";
|
|
3043
|
-
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3043
|
+
import { Fragment, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3044
3044
|
var ShowBodyMediaByContentType = ({
|
|
3045
3045
|
index,
|
|
3046
3046
|
type,
|
|
@@ -3061,15 +3061,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3061
3061
|
return "";
|
|
3062
3062
|
}
|
|
3063
3063
|
};
|
|
3064
|
-
const renderSpecialExpressions = (inputPart
|
|
3065
|
-
return /* @__PURE__ */ jsx16(
|
|
3066
|
-
"span",
|
|
3067
|
-
{
|
|
3068
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3069
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3070
|
-
},
|
|
3071
|
-
`${parentKey}-expr-${partIndex}`
|
|
3072
|
-
);
|
|
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 });
|
|
3073
3066
|
};
|
|
3074
3067
|
const balanceSpecialChars = (text) => {
|
|
3075
3068
|
let result = text;
|
|
@@ -3086,8 +3079,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3086
3079
|
};
|
|
3087
3080
|
const renderTextContent = (text, itemKey) => {
|
|
3088
3081
|
const balancedText = balanceSpecialChars(text);
|
|
3089
|
-
return /* @__PURE__ */ jsx16("span", { className: "text-xl
|
|
3090
|
-
(inputPart
|
|
3082
|
+
return /* @__PURE__ */ jsx16("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3083
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3091
3084
|
) }, itemKey);
|
|
3092
3085
|
};
|
|
3093
3086
|
const handleOpenFullScreen = (imageSource) => {
|
|
@@ -3119,8 +3112,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3119
3112
|
currentIndex++;
|
|
3120
3113
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3121
3114
|
valuePartList.push(
|
|
3122
|
-
/* @__PURE__ */ jsx16("span", { className: "text-xl font-bold
|
|
3123
|
-
(inputPart
|
|
3115
|
+
/* @__PURE__ */ jsx16("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3116
|
+
(inputPart) => renderSpecialExpressions(inputPart)
|
|
3124
3117
|
) }, itemKey)
|
|
3125
3118
|
);
|
|
3126
3119
|
copyValue = copyValue.substring(
|
|
@@ -3299,7 +3292,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3299
3292
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3300
3293
|
children: [
|
|
3301
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") }) }),
|
|
3302
|
-
/* @__PURE__ */ jsx16("span", { className: "text-xl
|
|
3295
|
+
/* @__PURE__ */ jsx16("span", { className: "text-xl", children: imageText })
|
|
3303
3296
|
]
|
|
3304
3297
|
},
|
|
3305
3298
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3371,9 +3364,9 @@ var ShowBodyMediaByContentType = ({
|
|
|
3371
3364
|
const RenderMainContent = () => {
|
|
3372
3365
|
switch (type) {
|
|
3373
3366
|
case "TEXT":
|
|
3374
|
-
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) }) });
|
|
3375
3368
|
case "IMAGE":
|
|
3376
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3369
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ jsxs10(
|
|
3377
3370
|
"div",
|
|
3378
3371
|
{
|
|
3379
3372
|
className: `${convertToPercentage(
|
|
@@ -3409,7 +3402,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3409
3402
|
}
|
|
3410
3403
|
) });
|
|
3411
3404
|
case "VIDEO":
|
|
3412
|
-
return /* @__PURE__ */ jsx16("div", { className: "mb-
|
|
3405
|
+
return /* @__PURE__ */ jsx16("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ jsx16(
|
|
3413
3406
|
"video",
|
|
3414
3407
|
{
|
|
3415
3408
|
src: value,
|
|
@@ -3420,7 +3413,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3420
3413
|
}
|
|
3421
3414
|
) });
|
|
3422
3415
|
case "AUDIO":
|
|
3423
|
-
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" }) });
|
|
3424
3417
|
default:
|
|
3425
3418
|
return null;
|
|
3426
3419
|
}
|
|
@@ -3547,7 +3540,7 @@ import { InlineMath as InlineMath2 } from "react-katex";
|
|
|
3547
3540
|
// src/components/groups/InputGroup.tsx
|
|
3548
3541
|
import Select from "react-select";
|
|
3549
3542
|
import { useEffect as useEffect3, useRef, useState as useState11, useCallback } from "react";
|
|
3550
|
-
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";
|
|
3551
3544
|
var InputGroup = ({
|
|
3552
3545
|
type,
|
|
3553
3546
|
title,
|
|
@@ -3966,7 +3959,7 @@ var InputGroup = ({
|
|
|
3966
3959
|
return CheckboxInputGroup();
|
|
3967
3960
|
}
|
|
3968
3961
|
};
|
|
3969
|
-
return /* @__PURE__ */ jsxs11(
|
|
3962
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
3970
3963
|
RenderMainContent(),
|
|
3971
3964
|
/* @__PURE__ */ jsx20(MathConstructorModal, {})
|
|
3972
3965
|
] });
|
|
@@ -4927,7 +4920,7 @@ var useScreenSize = () => {
|
|
|
4927
4920
|
var useScreenSize_default = useScreenSize;
|
|
4928
4921
|
|
|
4929
4922
|
// src/components/activities/material-content/GroupingActivityMaterialContent.tsx
|
|
4930
|
-
import { Fragment as
|
|
4923
|
+
import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4931
4924
|
var GroupingActivityMaterialContent = ({
|
|
4932
4925
|
uniqueValue,
|
|
4933
4926
|
answer,
|
|
@@ -5026,7 +5019,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5026
5019
|
};
|
|
5027
5020
|
const answerMap = retrieveAnswerMap();
|
|
5028
5021
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5029
|
-
return /* @__PURE__ */ jsxs18(
|
|
5022
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
5030
5023
|
/* @__PURE__ */ jsx29(
|
|
5031
5024
|
"div",
|
|
5032
5025
|
{
|
|
@@ -5204,7 +5197,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5204
5197
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5205
5198
|
|
|
5206
5199
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5207
|
-
import { Fragment as
|
|
5200
|
+
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5208
5201
|
var GroupingActivityContent = ({
|
|
5209
5202
|
answer,
|
|
5210
5203
|
data,
|
|
@@ -5229,7 +5222,7 @@ var GroupingActivityContent = ({
|
|
|
5229
5222
|
}
|
|
5230
5223
|
changeAnswer(answer2);
|
|
5231
5224
|
};
|
|
5232
|
-
return /* @__PURE__ */ jsxs19(
|
|
5225
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
5233
5226
|
/* @__PURE__ */ jsx30(
|
|
5234
5227
|
ActivityBodyContent_default,
|
|
5235
5228
|
{
|
|
@@ -5259,7 +5252,7 @@ var GroupingActivityContent_default = GroupingActivityContent;
|
|
|
5259
5252
|
import { useEffect as useEffect11, useRef as useRef5, useState as useState20 } from "react";
|
|
5260
5253
|
import { useDrop as useDrop4 } from "react-dnd";
|
|
5261
5254
|
import { InlineMath as InlineMath5 } from "react-katex";
|
|
5262
|
-
import { Fragment as
|
|
5255
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5263
5256
|
var MatchingActivityMaterialContent = ({
|
|
5264
5257
|
uniqueValue,
|
|
5265
5258
|
answer,
|
|
@@ -5355,7 +5348,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5355
5348
|
};
|
|
5356
5349
|
const answerMap = retrieveAnswerMap();
|
|
5357
5350
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5358
|
-
return /* @__PURE__ */ jsxs20(
|
|
5351
|
+
return /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
5359
5352
|
/* @__PURE__ */ jsx31(
|
|
5360
5353
|
"div",
|
|
5361
5354
|
{
|
|
@@ -5511,7 +5504,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5511
5504
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
5512
5505
|
|
|
5513
5506
|
// src/components/activities/MatchingActivityContent.tsx
|
|
5514
|
-
import { Fragment as
|
|
5507
|
+
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5515
5508
|
var MatchingActivityContent = ({
|
|
5516
5509
|
answer,
|
|
5517
5510
|
data,
|
|
@@ -5532,7 +5525,7 @@ var MatchingActivityContent = ({
|
|
|
5532
5525
|
answerMap[key] = value;
|
|
5533
5526
|
changeAnswer(answer2);
|
|
5534
5527
|
};
|
|
5535
|
-
return /* @__PURE__ */ jsxs21(
|
|
5528
|
+
return /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
5536
5529
|
/* @__PURE__ */ jsx32(
|
|
5537
5530
|
ActivityBodyContent_default,
|
|
5538
5531
|
{
|
|
@@ -5859,7 +5852,7 @@ var MCSAActivityContent = ({
|
|
|
5859
5852
|
var MCSAActivityContent_default = MCSAActivityContent;
|
|
5860
5853
|
|
|
5861
5854
|
// src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
|
|
5862
|
-
import { Fragment as
|
|
5855
|
+
import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5863
5856
|
var OpenEndedActivityMaterialContent = ({
|
|
5864
5857
|
answer,
|
|
5865
5858
|
contentMap,
|
|
@@ -5895,7 +5888,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5895
5888
|
);
|
|
5896
5889
|
};
|
|
5897
5890
|
const answerMap = retrieveAnswerMap();
|
|
5898
|
-
return /* @__PURE__ */ jsx37(
|
|
5891
|
+
return /* @__PURE__ */ jsx37(Fragment7, { children: /* @__PURE__ */ jsxs26("div", { className: "", children: [
|
|
5899
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") }) }),
|
|
5900
5893
|
/* @__PURE__ */ jsx37("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
|
|
5901
5894
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : null
|
|
@@ -5904,7 +5897,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5904
5897
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
5905
5898
|
|
|
5906
5899
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
5907
|
-
import { Fragment as
|
|
5900
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5908
5901
|
var OpenEndedActivityContent = ({
|
|
5909
5902
|
answer,
|
|
5910
5903
|
data,
|
|
@@ -5936,7 +5929,7 @@ var OpenEndedActivityContent = ({
|
|
|
5936
5929
|
)
|
|
5937
5930
|
}
|
|
5938
5931
|
),
|
|
5939
|
-
showMaterialContent ? /* @__PURE__ */ jsxs27(
|
|
5932
|
+
showMaterialContent ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
5940
5933
|
/* @__PURE__ */ jsx38(
|
|
5941
5934
|
"div",
|
|
5942
5935
|
{
|
|
@@ -6176,7 +6169,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6176
6169
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6177
6170
|
|
|
6178
6171
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6179
|
-
import { Fragment as
|
|
6172
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6180
6173
|
var OrderingActivityContent = ({
|
|
6181
6174
|
answer,
|
|
6182
6175
|
data,
|
|
@@ -6199,7 +6192,7 @@ var OrderingActivityContent = ({
|
|
|
6199
6192
|
answerMap[secondaryKey] = prevValue;
|
|
6200
6193
|
changeAnswer(answer2);
|
|
6201
6194
|
};
|
|
6202
|
-
return /* @__PURE__ */ jsxs29(
|
|
6195
|
+
return /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
6203
6196
|
/* @__PURE__ */ jsx41(
|
|
6204
6197
|
ActivityBodyContent_default,
|
|
6205
6198
|
{
|
|
@@ -6228,7 +6221,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
|
|
|
6228
6221
|
// src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
|
|
6229
6222
|
import { useEffect as useEffect13, useState as useState22 } from "react";
|
|
6230
6223
|
import { InlineMath as InlineMath9 } from "react-katex";
|
|
6231
|
-
import { Fragment as
|
|
6224
|
+
import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6232
6225
|
var TrueFalseActivityMaterialContent = ({
|
|
6233
6226
|
uniqueValue,
|
|
6234
6227
|
answer,
|
|
@@ -6350,7 +6343,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6350
6343
|
},
|
|
6351
6344
|
index
|
|
6352
6345
|
);
|
|
6353
|
-
}) }) : /* @__PURE__ */ jsxs30(
|
|
6346
|
+
}) }) : /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
6354
6347
|
answerMap.trueList.map((item) => /* @__PURE__ */ jsxs30("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6355
6348
|
/* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: item }) }),
|
|
6356
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
|
);
|