catchup-library-web 2.6.11 → 2.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +713 -659
- package/dist/index.mjs +577 -524
- package/package.json +1 -1
- package/src/components/buttons/StartButton.tsx +65 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -122,6 +122,7 @@ __export(index_exports, {
|
|
|
122
122
|
SelectionTab: () => SelectionTab_default,
|
|
123
123
|
SelectionTabFill: () => SelectionTabFill_default,
|
|
124
124
|
SelectionTabPill: () => SelectionTabPill_default,
|
|
125
|
+
StartButton: () => StartButton_default,
|
|
125
126
|
StatusError: () => StatusError_default,
|
|
126
127
|
SubTitle: () => SubTitle_default,
|
|
127
128
|
THREE_MONTHS: () => THREE_MONTHS,
|
|
@@ -1085,8 +1086,60 @@ var ApproveButton = ({
|
|
|
1085
1086
|
};
|
|
1086
1087
|
var ApproveButton_default = ApproveButton;
|
|
1087
1088
|
|
|
1088
|
-
// src/components/
|
|
1089
|
+
// src/components/buttons/StartButton.tsx
|
|
1090
|
+
var import_react9 = require("react");
|
|
1089
1091
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1092
|
+
var StartButton = ({
|
|
1093
|
+
title,
|
|
1094
|
+
size,
|
|
1095
|
+
onClick,
|
|
1096
|
+
disabled
|
|
1097
|
+
}) => {
|
|
1098
|
+
const [loading, setLoading] = (0, import_react9.useState)(false);
|
|
1099
|
+
const internalOnClick = (e) => __async(void 0, null, function* () {
|
|
1100
|
+
e.stopPropagation();
|
|
1101
|
+
if (loading) return;
|
|
1102
|
+
if (disabled) return;
|
|
1103
|
+
setLoading(true);
|
|
1104
|
+
yield onClick();
|
|
1105
|
+
setLoading(false);
|
|
1106
|
+
});
|
|
1107
|
+
let currentHeightClassName;
|
|
1108
|
+
let currentLoadingSize;
|
|
1109
|
+
if (size === "small") {
|
|
1110
|
+
currentHeightClassName = "h-8";
|
|
1111
|
+
currentLoadingSize = 14;
|
|
1112
|
+
} else if (size === "medium") {
|
|
1113
|
+
currentHeightClassName = "h-10";
|
|
1114
|
+
currentLoadingSize = 16;
|
|
1115
|
+
} else if (size === "large") {
|
|
1116
|
+
currentHeightClassName = "h-12";
|
|
1117
|
+
currentLoadingSize = 18;
|
|
1118
|
+
} else if (size === "unlimited") {
|
|
1119
|
+
currentLoadingSize = 14;
|
|
1120
|
+
currentHeightClassName = "h-8";
|
|
1121
|
+
}
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1123
|
+
"button",
|
|
1124
|
+
{
|
|
1125
|
+
className: `px-8 py-2.5 bg-gradient-to-r from-catchup-green to-catchup-hover-green text-catchup-white font-bold text-lg rounded-catchup-full shadow-card ${loading ? "" : disabled ? "opacity-50" : "hover:from-catchup-hover-green hover:to-catchup-green hover:shadow-full-card hover:scale-105"} transition-all duration-300 transform ${currentHeightClassName}`,
|
|
1126
|
+
onClick: internalOnClick,
|
|
1127
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1128
|
+
BaseLoading_default,
|
|
1129
|
+
{
|
|
1130
|
+
height: currentLoadingSize,
|
|
1131
|
+
width: currentLoadingSize,
|
|
1132
|
+
primaryColor: "#ffffff",
|
|
1133
|
+
secondaryColor: "#ffffff"
|
|
1134
|
+
}
|
|
1135
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-row justify-center items-center gap-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: title }) })
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
1138
|
+
};
|
|
1139
|
+
var StartButton_default = StartButton;
|
|
1140
|
+
|
|
1141
|
+
// src/components/cards/FullCard.tsx
|
|
1142
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1090
1143
|
var FullCard = ({
|
|
1091
1144
|
backgroundColor,
|
|
1092
1145
|
borderColor,
|
|
@@ -1094,7 +1147,7 @@ var FullCard = ({
|
|
|
1094
1147
|
usePadding,
|
|
1095
1148
|
children
|
|
1096
1149
|
}) => {
|
|
1097
|
-
return /* @__PURE__ */ (0,
|
|
1150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1098
1151
|
"div",
|
|
1099
1152
|
{
|
|
1100
1153
|
className: `min-h-full
|
|
@@ -1102,7 +1155,7 @@ var FullCard = ({
|
|
|
1102
1155
|
${borderColor ? borderColor : "border-catchup-gray-50"}
|
|
1103
1156
|
${opacity ? opacity : "opacity-100"}
|
|
1104
1157
|
rounded-catchup-xlarge w-full `,
|
|
1105
|
-
children: /* @__PURE__ */ (0,
|
|
1158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1106
1159
|
"div",
|
|
1107
1160
|
{
|
|
1108
1161
|
className: `flex flex-col mx-auto ${usePadding === false ? "p-0" : "p-6"} h-full`,
|
|
@@ -1115,14 +1168,14 @@ var FullCard = ({
|
|
|
1115
1168
|
var FullCard_default = FullCard;
|
|
1116
1169
|
|
|
1117
1170
|
// src/components/cards/BaseCard.tsx
|
|
1118
|
-
var
|
|
1171
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1119
1172
|
var BaseCard = ({ children }) => {
|
|
1120
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col justify-center items-center h-full", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "bg-catchup-white rounded-catchup-xlarge h-catchup-card w-catchup-card shadow-dropdown", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col mx-auto p-8 h-full", children }) }) });
|
|
1121
1174
|
};
|
|
1122
1175
|
var BaseCard_default = BaseCard;
|
|
1123
1176
|
|
|
1124
1177
|
// src/components/loading/BaseLoadingWithText.tsx
|
|
1125
|
-
var
|
|
1178
|
+
var import_react10 = require("react");
|
|
1126
1179
|
|
|
1127
1180
|
// src/language/i18n.ts
|
|
1128
1181
|
var import_i18next = __toESM(require("i18next"));
|
|
@@ -1131,19 +1184,19 @@ import_i18next.default.use(import_react_i18next.initReactI18next);
|
|
|
1131
1184
|
var i18n_default = import_i18next.default;
|
|
1132
1185
|
|
|
1133
1186
|
// src/components/loading/BaseLoadingWithText.tsx
|
|
1134
|
-
var
|
|
1187
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1135
1188
|
var BaseLoadingWithText = (props) => {
|
|
1136
1189
|
const { height, width, size, primaryColor, secondaryColor, hideText } = props;
|
|
1137
|
-
const [initialTimestamp, setInitialTimestamp] = (0,
|
|
1190
|
+
const [initialTimestamp, setInitialTimestamp] = (0, import_react10.useState)(
|
|
1138
1191
|
(/* @__PURE__ */ new Date()).getTime()
|
|
1139
1192
|
);
|
|
1140
|
-
const [currentTimestamp, setCurrentTimeStamp] = (0,
|
|
1193
|
+
const [currentTimestamp, setCurrentTimeStamp] = (0, import_react10.useState)(
|
|
1141
1194
|
(/* @__PURE__ */ new Date()).getTime()
|
|
1142
1195
|
);
|
|
1143
1196
|
let timerId;
|
|
1144
1197
|
let textClassName;
|
|
1145
1198
|
let textWidth;
|
|
1146
|
-
(0,
|
|
1199
|
+
(0, import_react10.useEffect)(() => {
|
|
1147
1200
|
timerId = setInterval(() => {
|
|
1148
1201
|
setCurrentTimeStamp((/* @__PURE__ */ new Date()).getTime());
|
|
1149
1202
|
}, 1e3);
|
|
@@ -1179,8 +1232,8 @@ var BaseLoadingWithText = (props) => {
|
|
|
1179
1232
|
textWidth = 250;
|
|
1180
1233
|
}
|
|
1181
1234
|
const loadingText = retrieveLoadingText();
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1183
|
-
/* @__PURE__ */ (0,
|
|
1235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col justify-center items-center", children: [
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1184
1237
|
BaseLoading_default,
|
|
1185
1238
|
{
|
|
1186
1239
|
height,
|
|
@@ -1190,12 +1243,12 @@ var BaseLoadingWithText = (props) => {
|
|
|
1190
1243
|
secondaryColor
|
|
1191
1244
|
}
|
|
1192
1245
|
),
|
|
1193
|
-
!hideText && size !== "small" ? /* @__PURE__ */ (0,
|
|
1246
|
+
!hideText && size !== "small" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1194
1247
|
"div",
|
|
1195
1248
|
{
|
|
1196
1249
|
className: `${textClassName} text-center`,
|
|
1197
1250
|
style: { width: textWidth },
|
|
1198
|
-
children: /* @__PURE__ */ (0,
|
|
1251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "font-bold", children: loadingText })
|
|
1199
1252
|
}
|
|
1200
1253
|
) : null
|
|
1201
1254
|
] });
|
|
@@ -1206,36 +1259,36 @@ var BaseLoadingWithText_default = BaseLoadingWithText;
|
|
|
1206
1259
|
var import_react_modal = __toESM(require("react-modal"));
|
|
1207
1260
|
|
|
1208
1261
|
// src/components/titles/BaseTitle.tsx
|
|
1209
|
-
var
|
|
1262
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1210
1263
|
var BaseTitle = ({
|
|
1211
1264
|
title,
|
|
1212
1265
|
totalItemCount,
|
|
1213
1266
|
itemName,
|
|
1214
1267
|
description
|
|
1215
1268
|
}) => {
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "text-2xl font-medium", children: [
|
|
1218
1271
|
title,
|
|
1219
|
-
totalItemCount && itemName ? /* @__PURE__ */ (0,
|
|
1272
|
+
totalItemCount && itemName ? /* @__PURE__ */ (0, import_jsx_runtime16.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: [
|
|
1220
1273
|
totalItemCount,
|
|
1221
1274
|
" ",
|
|
1222
1275
|
itemName
|
|
1223
1276
|
] }) : null
|
|
1224
1277
|
] }),
|
|
1225
|
-
description ? /* @__PURE__ */ (0,
|
|
1278
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "", children: description }) : null
|
|
1226
1279
|
] });
|
|
1227
1280
|
};
|
|
1228
1281
|
var BaseTitle_default = BaseTitle;
|
|
1229
1282
|
|
|
1230
1283
|
// src/components/dividers/DividerLine.tsx
|
|
1231
|
-
var
|
|
1284
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1232
1285
|
var DividerLine = () => {
|
|
1233
|
-
return /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "bg-catchup-gray-50 h-[1px] w-full my-3" });
|
|
1234
1287
|
};
|
|
1235
1288
|
var DividerLine_default = DividerLine;
|
|
1236
1289
|
|
|
1237
1290
|
// src/components/modals/BaseModal.tsx
|
|
1238
|
-
var
|
|
1291
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1239
1292
|
var BaseModal = ({
|
|
1240
1293
|
title,
|
|
1241
1294
|
isOpen,
|
|
@@ -1244,7 +1297,7 @@ var BaseModal = ({
|
|
|
1244
1297
|
onRequestClose,
|
|
1245
1298
|
children
|
|
1246
1299
|
}) => {
|
|
1247
|
-
return /* @__PURE__ */ (0,
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1248
1301
|
import_react_modal.default,
|
|
1249
1302
|
{
|
|
1250
1303
|
isOpen,
|
|
@@ -1272,14 +1325,14 @@ var BaseModal = ({
|
|
|
1272
1325
|
}
|
|
1273
1326
|
},
|
|
1274
1327
|
contentLabel: "",
|
|
1275
|
-
children: /* @__PURE__ */ (0,
|
|
1328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1276
1329
|
"div",
|
|
1277
1330
|
{
|
|
1278
1331
|
className: `font-quicksand ${size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"}`,
|
|
1279
|
-
children: /* @__PURE__ */ (0,
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FullCard_default, { children: [
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row justify-between", children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BaseTitle_default, { title }),
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1283
1336
|
BaseImage_default,
|
|
1284
1337
|
{
|
|
1285
1338
|
src: "/icons/cross-red.webp",
|
|
@@ -1289,8 +1342,8 @@ var BaseModal = ({
|
|
|
1289
1342
|
}
|
|
1290
1343
|
)
|
|
1291
1344
|
] }),
|
|
1292
|
-
/* @__PURE__ */ (0,
|
|
1293
|
-
/* @__PURE__ */ (0,
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DividerLine_default, {}),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "max-h-[calc(98vh-120px)] overflow-auto", children })
|
|
1294
1347
|
] })
|
|
1295
1348
|
}
|
|
1296
1349
|
)
|
|
@@ -1300,20 +1353,20 @@ var BaseModal = ({
|
|
|
1300
1353
|
var BaseModal_default = BaseModal;
|
|
1301
1354
|
|
|
1302
1355
|
// src/components/pdfs/BasePDF.tsx
|
|
1303
|
-
var
|
|
1356
|
+
var import_react11 = require("react");
|
|
1304
1357
|
var import_react_pdf = require("react-pdf");
|
|
1305
|
-
var
|
|
1358
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1306
1359
|
var BasePDF = ({ file }) => {
|
|
1307
|
-
const [pageNumber, setPageNumber] = (0,
|
|
1308
|
-
const [numberOfPages, setNumberOfPages] = (0,
|
|
1360
|
+
const [pageNumber, setPageNumber] = (0, import_react11.useState)(1);
|
|
1361
|
+
const [numberOfPages, setNumberOfPages] = (0, import_react11.useState)(0);
|
|
1309
1362
|
const handleOnDocumentLoadSuccess = ({ numPages }) => {
|
|
1310
1363
|
setPageNumber(1);
|
|
1311
1364
|
setNumberOfPages(numPages);
|
|
1312
1365
|
};
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
pageNumber === 1 ? null : /* @__PURE__ */ (0,
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_pdf.Document, { file, onLoadSuccess: handleOnDocumentLoadSuccess, children: [
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_pdf.Page, { pageNumber }),
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-row items-center justify-center", children: [
|
|
1369
|
+
pageNumber === 1 ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "px-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1317
1370
|
BaseImage_default,
|
|
1318
1371
|
{
|
|
1319
1372
|
alt: "arrow-left",
|
|
@@ -1324,7 +1377,7 @@ var BasePDF = ({ file }) => {
|
|
|
1324
1377
|
}
|
|
1325
1378
|
}
|
|
1326
1379
|
) }) }),
|
|
1327
|
-
Array.from(Array(numberOfPages).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ (0,
|
|
1380
|
+
Array.from(Array(numberOfPages).keys()).filter((index) => index < pageNumber + 5).filter((index) => index > pageNumber - 5).map((index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "px-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1328
1381
|
"p",
|
|
1329
1382
|
{
|
|
1330
1383
|
className: `${pageNumber === index + 1 ? "text-2xl" : "text-md"} cursor-pointer`,
|
|
@@ -1334,7 +1387,7 @@ var BasePDF = ({ file }) => {
|
|
|
1334
1387
|
children: index + 1
|
|
1335
1388
|
}
|
|
1336
1389
|
) }, index)),
|
|
1337
|
-
numberOfPages === 0 || pageNumber === numberOfPages ? null : /* @__PURE__ */ (0,
|
|
1390
|
+
numberOfPages === 0 || pageNumber === numberOfPages ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "px-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1338
1391
|
BaseImage_default,
|
|
1339
1392
|
{
|
|
1340
1393
|
src: "/icons/arrow-right.webp",
|
|
@@ -1351,14 +1404,14 @@ var BasePDF = ({ file }) => {
|
|
|
1351
1404
|
var BasePDF_default = BasePDF;
|
|
1352
1405
|
|
|
1353
1406
|
// src/components/activities/empty-contents/ActivityEmptyContent.tsx
|
|
1354
|
-
var
|
|
1407
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1355
1408
|
var ActivityEmptyContent = () => {
|
|
1356
|
-
return /* @__PURE__ */ (0,
|
|
1409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex flex-col items-center justify-center border-2 border-catchup-orange rounded-catchup-xlarge px-5 py-2 mb-2 bg-catchup-orange text-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-lg", children: i18n_default.t("you_have_set_this_activity_as_empty") }) });
|
|
1357
1410
|
};
|
|
1358
1411
|
var ActivityEmptyContent_default = ActivityEmptyContent;
|
|
1359
1412
|
|
|
1360
1413
|
// src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
|
|
1361
|
-
var
|
|
1414
|
+
var import_react12 = require("react");
|
|
1362
1415
|
var import_react_modal2 = __toESM(require("react-modal"));
|
|
1363
1416
|
|
|
1364
1417
|
// src/utilization/CatchtivityUtilization.ts
|
|
@@ -3377,15 +3430,15 @@ var retrieveActivityCountOptionList = () => {
|
|
|
3377
3430
|
|
|
3378
3431
|
// src/components/activities/body-contents/ShowBodyMediaByContentType.tsx
|
|
3379
3432
|
var import_react_katex = require("react-katex");
|
|
3380
|
-
var
|
|
3433
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3381
3434
|
var ShowBodyMediaByContentType = ({
|
|
3382
3435
|
index,
|
|
3383
3436
|
type,
|
|
3384
3437
|
value,
|
|
3385
3438
|
size
|
|
3386
3439
|
}) => {
|
|
3387
|
-
const [showFullScreen, setShowFullScreen] = (0,
|
|
3388
|
-
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0,
|
|
3440
|
+
const [showFullScreen, setShowFullScreen] = (0, import_react12.useState)(false);
|
|
3441
|
+
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react12.useState)("");
|
|
3389
3442
|
const convertToPercentage = (size2) => {
|
|
3390
3443
|
switch (size2) {
|
|
3391
3444
|
case "1/3":
|
|
@@ -3399,17 +3452,17 @@ var ShowBodyMediaByContentType = ({
|
|
|
3399
3452
|
}
|
|
3400
3453
|
};
|
|
3401
3454
|
const renderSpecialExpressions = (inputPart, inputPartIndex) => {
|
|
3402
|
-
return /* @__PURE__ */ (0,
|
|
3455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3403
3456
|
"span",
|
|
3404
3457
|
{
|
|
3405
3458
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3406
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
3459
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3407
3460
|
},
|
|
3408
3461
|
inputPartIndex
|
|
3409
3462
|
);
|
|
3410
3463
|
};
|
|
3411
3464
|
const renderTextContent = (text, itemKey) => {
|
|
3412
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl", children: constructInputWithSpecialExpressionList(text).map(
|
|
3413
3466
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3414
3467
|
) }, itemKey);
|
|
3415
3468
|
};
|
|
@@ -3441,7 +3494,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3441
3494
|
currentIndex++;
|
|
3442
3495
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3443
3496
|
valuePartList.push(
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3497
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl font-bold", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3445
3498
|
(inputPart, inputPartIndex) => renderSpecialExpressions(inputPart, inputPartIndex)
|
|
3446
3499
|
) }, itemKey)
|
|
3447
3500
|
);
|
|
@@ -3458,7 +3511,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3458
3511
|
if (textBeforeTag.trim() !== "") {
|
|
3459
3512
|
currentIndex++;
|
|
3460
3513
|
valuePartList.push(
|
|
3461
|
-
/* @__PURE__ */ (0,
|
|
3514
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3462
3515
|
"p",
|
|
3463
3516
|
{
|
|
3464
3517
|
className: "text-xl",
|
|
@@ -3477,12 +3530,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3477
3530
|
);
|
|
3478
3531
|
currentIndex++;
|
|
3479
3532
|
valuePartList.push(
|
|
3480
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3481
3534
|
"div",
|
|
3482
3535
|
{
|
|
3483
3536
|
className: "relative w-[200px]",
|
|
3484
3537
|
children: [
|
|
3485
|
-
/* @__PURE__ */ (0,
|
|
3538
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3486
3539
|
BaseImage_default,
|
|
3487
3540
|
{
|
|
3488
3541
|
src: imageSource,
|
|
@@ -3491,12 +3544,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3491
3544
|
className: "rounded-catchup-xlarge"
|
|
3492
3545
|
}
|
|
3493
3546
|
),
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3547
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3495
3548
|
"div",
|
|
3496
3549
|
{
|
|
3497
3550
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3498
3551
|
onClick: () => handleOpenFullScreen(imageSource),
|
|
3499
|
-
children: /* @__PURE__ */ (0,
|
|
3552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3500
3553
|
BaseImage_default,
|
|
3501
3554
|
{
|
|
3502
3555
|
src: "/icons/arrow-up.webp",
|
|
@@ -3525,7 +3578,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3525
3578
|
if (textBeforeTag.trim() !== "") {
|
|
3526
3579
|
currentIndex++;
|
|
3527
3580
|
valuePartList.push(
|
|
3528
|
-
/* @__PURE__ */ (0,
|
|
3581
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3529
3582
|
"p",
|
|
3530
3583
|
{
|
|
3531
3584
|
className: "text-xl",
|
|
@@ -3544,7 +3597,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3544
3597
|
);
|
|
3545
3598
|
currentIndex++;
|
|
3546
3599
|
valuePartList.push(
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3600
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3548
3601
|
"video",
|
|
3549
3602
|
{
|
|
3550
3603
|
src: videoSource,
|
|
@@ -3567,7 +3620,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3567
3620
|
if (textBeforeTag.trim() !== "") {
|
|
3568
3621
|
currentIndex++;
|
|
3569
3622
|
valuePartList.push(
|
|
3570
|
-
/* @__PURE__ */ (0,
|
|
3623
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3571
3624
|
"p",
|
|
3572
3625
|
{
|
|
3573
3626
|
className: "text-xl",
|
|
@@ -3586,7 +3639,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3586
3639
|
);
|
|
3587
3640
|
currentIndex++;
|
|
3588
3641
|
valuePartList.push(
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3642
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3590
3643
|
"audio",
|
|
3591
3644
|
{
|
|
3592
3645
|
src: audioSource,
|
|
@@ -3611,13 +3664,13 @@ var ShowBodyMediaByContentType = ({
|
|
|
3611
3664
|
if (regexMatchImageText) {
|
|
3612
3665
|
const imageText = regexMatchImageText[1];
|
|
3613
3666
|
valuePartList.push(
|
|
3614
|
-
/* @__PURE__ */ (0,
|
|
3667
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3615
3668
|
"div",
|
|
3616
3669
|
{
|
|
3617
3670
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3618
3671
|
children: [
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3673
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl", children: imageText })
|
|
3621
3674
|
]
|
|
3622
3675
|
},
|
|
3623
3676
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3631,7 +3684,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3631
3684
|
return valuePartList;
|
|
3632
3685
|
};
|
|
3633
3686
|
const RenderShowFullScreenItem = () => {
|
|
3634
|
-
return /* @__PURE__ */ (0,
|
|
3687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3635
3688
|
import_react_modal2.default,
|
|
3636
3689
|
{
|
|
3637
3690
|
isOpen: showFullScreen,
|
|
@@ -3660,8 +3713,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3660
3713
|
}
|
|
3661
3714
|
},
|
|
3662
3715
|
contentLabel: "Image Fullscreen View",
|
|
3663
|
-
children: /* @__PURE__ */ (0,
|
|
3664
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3665
3718
|
BaseImage_default,
|
|
3666
3719
|
{
|
|
3667
3720
|
src: "/icons/cross-red.webp",
|
|
@@ -3673,7 +3726,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3673
3726
|
}
|
|
3674
3727
|
}
|
|
3675
3728
|
) }),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-center h-[500]", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3677
3730
|
BaseImage_default,
|
|
3678
3731
|
{
|
|
3679
3732
|
src: selectedFullScreenItem,
|
|
@@ -3689,10 +3742,10 @@ var ShowBodyMediaByContentType = ({
|
|
|
3689
3742
|
const RenderMainContent = () => {
|
|
3690
3743
|
switch (type) {
|
|
3691
3744
|
case "TEXT":
|
|
3692
|
-
return /* @__PURE__ */ (0,
|
|
3745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-1 flex flex-row flex-wrap items-center mx-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "whitespace-pre-wrap", children: retrieveValueParts(value) }) });
|
|
3693
3746
|
case "IMAGE":
|
|
3694
|
-
return /* @__PURE__ */ (0,
|
|
3695
|
-
/* @__PURE__ */ (0,
|
|
3747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-1 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3696
3749
|
BaseImage_default,
|
|
3697
3750
|
{
|
|
3698
3751
|
src: value,
|
|
@@ -3702,12 +3755,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3702
3755
|
imageClassName: "max-h-[50vh] max-w-full object-contain rounded-catchup-xlarge"
|
|
3703
3756
|
}
|
|
3704
3757
|
),
|
|
3705
|
-
/* @__PURE__ */ (0,
|
|
3758
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3706
3759
|
"div",
|
|
3707
3760
|
{
|
|
3708
3761
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3709
3762
|
onClick: () => handleOpenFullScreen(value),
|
|
3710
|
-
children: /* @__PURE__ */ (0,
|
|
3763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3711
3764
|
BaseImage_default,
|
|
3712
3765
|
{
|
|
3713
3766
|
src: "/icons/arrow-up.webp",
|
|
@@ -3720,7 +3773,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3720
3773
|
)
|
|
3721
3774
|
] }) });
|
|
3722
3775
|
case "VIDEO":
|
|
3723
|
-
return /* @__PURE__ */ (0,
|
|
3776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3724
3777
|
"video",
|
|
3725
3778
|
{
|
|
3726
3779
|
src: value,
|
|
@@ -3729,12 +3782,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3729
3782
|
}
|
|
3730
3783
|
) });
|
|
3731
3784
|
case "AUDIO":
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-1 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3733
3786
|
default:
|
|
3734
3787
|
return null;
|
|
3735
3788
|
}
|
|
3736
3789
|
};
|
|
3737
|
-
return /* @__PURE__ */ (0,
|
|
3790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w-full", children: [
|
|
3738
3791
|
RenderShowFullScreenItem(),
|
|
3739
3792
|
RenderMainContent()
|
|
3740
3793
|
] }, `body-content-${index}`);
|
|
@@ -3742,7 +3795,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3742
3795
|
var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
|
|
3743
3796
|
|
|
3744
3797
|
// src/components/activities/body-contents/ActivityBodyContent.tsx
|
|
3745
|
-
var
|
|
3798
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3746
3799
|
var ActivityBodyContent = ({
|
|
3747
3800
|
templateType,
|
|
3748
3801
|
bodyMap,
|
|
@@ -3823,7 +3876,7 @@ var ActivityBodyContent = ({
|
|
|
3823
3876
|
key
|
|
3824
3877
|
});
|
|
3825
3878
|
}).filter(Boolean);
|
|
3826
|
-
return /* @__PURE__ */ (0,
|
|
3879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex flex-col", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3827
3880
|
ShowBodyMediaByContentType_default,
|
|
3828
3881
|
{
|
|
3829
3882
|
index,
|
|
@@ -3837,9 +3890,9 @@ var ActivityBodyContent = ({
|
|
|
3837
3890
|
var ActivityBodyContent_default = ActivityBodyContent;
|
|
3838
3891
|
|
|
3839
3892
|
// src/components/dividers/VerticalDividerLine.tsx
|
|
3840
|
-
var
|
|
3893
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3841
3894
|
var VerticalDividerLine = () => {
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "bg-catchup-gray-50 h-full w-[1px] mx-3" });
|
|
3843
3896
|
};
|
|
3844
3897
|
var VerticalDividerLine_default = VerticalDividerLine;
|
|
3845
3898
|
|
|
@@ -3849,8 +3902,8 @@ var import_react_katex2 = require("react-katex");
|
|
|
3849
3902
|
// src/components/groups/InputGroup.tsx
|
|
3850
3903
|
var import_react_select = __toESM(require("react-select"));
|
|
3851
3904
|
var import_react_switch = __toESM(require("react-switch"));
|
|
3852
|
-
var
|
|
3853
|
-
var
|
|
3905
|
+
var import_react13 = require("react");
|
|
3906
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3854
3907
|
var InputGroup = ({
|
|
3855
3908
|
type,
|
|
3856
3909
|
title,
|
|
@@ -3875,12 +3928,12 @@ var InputGroup = ({
|
|
|
3875
3928
|
checked,
|
|
3876
3929
|
description
|
|
3877
3930
|
}) => {
|
|
3878
|
-
const textAreaRef = (0,
|
|
3879
|
-
const latexTextAreaRef = (0,
|
|
3880
|
-
const [showMathConstructor, setShowMathConstructor] = (0,
|
|
3881
|
-
const [mathValue, setMathValue] = (0,
|
|
3882
|
-
const mathFieldRef = (0,
|
|
3883
|
-
(0,
|
|
3931
|
+
const textAreaRef = (0, import_react13.useRef)(null);
|
|
3932
|
+
const latexTextAreaRef = (0, import_react13.useRef)(null);
|
|
3933
|
+
const [showMathConstructor, setShowMathConstructor] = (0, import_react13.useState)(false);
|
|
3934
|
+
const [mathValue, setMathValue] = (0, import_react13.useState)("");
|
|
3935
|
+
const mathFieldRef = (0, import_react13.useRef)(null);
|
|
3936
|
+
(0, import_react13.useEffect)(() => {
|
|
3884
3937
|
if (!textAreaRef) return;
|
|
3885
3938
|
if (!textAreaRef.current) return;
|
|
3886
3939
|
if (value) {
|
|
@@ -3889,7 +3942,7 @@ var InputGroup = ({
|
|
|
3889
3942
|
textAreaRef.current.style.height = `44px`;
|
|
3890
3943
|
}
|
|
3891
3944
|
}, [textAreaRef, value]);
|
|
3892
|
-
(0,
|
|
3945
|
+
(0, import_react13.useEffect)(() => {
|
|
3893
3946
|
if (!latexTextAreaRef) return;
|
|
3894
3947
|
if (!latexTextAreaRef.current) return;
|
|
3895
3948
|
if (value) {
|
|
@@ -3898,7 +3951,7 @@ var InputGroup = ({
|
|
|
3898
3951
|
latexTextAreaRef.current.style.height = `44px`;
|
|
3899
3952
|
}
|
|
3900
3953
|
}, [latexTextAreaRef, value]);
|
|
3901
|
-
(0,
|
|
3954
|
+
(0, import_react13.useEffect)(() => {
|
|
3902
3955
|
if (!useMath) return;
|
|
3903
3956
|
import("mathlive").then(({ MathfieldElement }) => {
|
|
3904
3957
|
if (!customElements.get("math-field")) {
|
|
@@ -3942,7 +3995,7 @@ var InputGroup = ({
|
|
|
3942
3995
|
onChange && onChange(e);
|
|
3943
3996
|
}
|
|
3944
3997
|
};
|
|
3945
|
-
const handleMathFieldChange = (0,
|
|
3998
|
+
const handleMathFieldChange = (0, import_react13.useCallback)(() => {
|
|
3946
3999
|
if (!mathFieldRef.current) return;
|
|
3947
4000
|
const latexValue = mathFieldRef.current.value;
|
|
3948
4001
|
const wasFocused = mathFieldRef.current === document.activeElement;
|
|
@@ -3965,7 +4018,7 @@ var InputGroup = ({
|
|
|
3965
4018
|
setShowMathConstructor(true);
|
|
3966
4019
|
};
|
|
3967
4020
|
const MathConstructorModal = () => {
|
|
3968
|
-
return /* @__PURE__ */ (0,
|
|
4021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3969
4022
|
BaseModal_default,
|
|
3970
4023
|
{
|
|
3971
4024
|
title: i18n_default.t("math_editor"),
|
|
@@ -3976,8 +4029,8 @@ var InputGroup = ({
|
|
|
3976
4029
|
onRequestClose: () => {
|
|
3977
4030
|
setShowMathConstructor(false);
|
|
3978
4031
|
},
|
|
3979
|
-
children: /* @__PURE__ */ (0,
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
4032
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "bg-catchup-white rounded-lg overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-6 space-y-6", children: [
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "border border-catchup-gray-100 rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3981
4034
|
"math-field",
|
|
3982
4035
|
{
|
|
3983
4036
|
ref: mathFieldRef,
|
|
@@ -4003,10 +4056,10 @@ var InputGroup = ({
|
|
|
4003
4056
|
}
|
|
4004
4057
|
}
|
|
4005
4058
|
) }) }),
|
|
4006
|
-
/* @__PURE__ */ (0,
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4008
|
-
/* @__PURE__ */ (0,
|
|
4009
|
-
/* @__PURE__ */ (0,
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: i18n_default.t("latex_output") }),
|
|
4061
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
|
|
4062
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4010
4063
|
"textarea",
|
|
4011
4064
|
{
|
|
4012
4065
|
ref: latexTextAreaRef,
|
|
@@ -4016,7 +4069,7 @@ var InputGroup = ({
|
|
|
4016
4069
|
placeholder: i18n_default.t("latex_will_appear_here")
|
|
4017
4070
|
}
|
|
4018
4071
|
),
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4020
4073
|
"button",
|
|
4021
4074
|
{
|
|
4022
4075
|
onClick: handleCopyLatex,
|
|
@@ -4032,13 +4085,13 @@ var InputGroup = ({
|
|
|
4032
4085
|
);
|
|
4033
4086
|
};
|
|
4034
4087
|
const CheckboxInputGroup = () => {
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4036
4089
|
"div",
|
|
4037
4090
|
{
|
|
4038
4091
|
className: "flex flex-row items-center gap-x-1 cursor-pointer",
|
|
4039
4092
|
onClick,
|
|
4040
4093
|
children: [
|
|
4041
|
-
/* @__PURE__ */ (0,
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4042
4095
|
BaseImage_default,
|
|
4043
4096
|
{
|
|
4044
4097
|
src: value ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -4048,15 +4101,15 @@ var InputGroup = ({
|
|
|
4048
4101
|
}
|
|
4049
4102
|
}
|
|
4050
4103
|
),
|
|
4051
|
-
/* @__PURE__ */ (0,
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "", children: title })
|
|
4052
4105
|
]
|
|
4053
4106
|
}
|
|
4054
4107
|
);
|
|
4055
4108
|
};
|
|
4056
4109
|
const FileInputGroup = () => {
|
|
4057
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
-
title ? /* @__PURE__ */ (0,
|
|
4059
|
-
/* @__PURE__ */ (0,
|
|
4110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "my-1", children: [
|
|
4111
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4060
4113
|
"input",
|
|
4061
4114
|
{
|
|
4062
4115
|
className: "w-full py-2 px-4 border border-catchup-gray-100 placeholder-catchup-gray-200 rounded-catchup-large text-black focus:outline-none focus:border-catchup-blue-400 focus:shadow-input",
|
|
@@ -4073,9 +4126,9 @@ var InputGroup = ({
|
|
|
4073
4126
|
] });
|
|
4074
4127
|
};
|
|
4075
4128
|
const DateInputGroup = () => {
|
|
4076
|
-
return /* @__PURE__ */ (0,
|
|
4077
|
-
title ? /* @__PURE__ */ (0,
|
|
4078
|
-
/* @__PURE__ */ (0,
|
|
4129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "my-1", children: [
|
|
4130
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4079
4132
|
"input",
|
|
4080
4133
|
{
|
|
4081
4134
|
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error" : theme === "red" ? "border-catchup-red bg-catchup-red text-catchup-white focus:border-catchup-red" : "border-catchup-gray-100 placeholder-catchup-gray-200 focus:border-catchup-blue-400"} rounded-catchup-large text-black focus:outline-none focus:shadow-input`,
|
|
@@ -4092,9 +4145,9 @@ var InputGroup = ({
|
|
|
4092
4145
|
] });
|
|
4093
4146
|
};
|
|
4094
4147
|
const SearchableSelectInputGroup = () => {
|
|
4095
|
-
return /* @__PURE__ */ (0,
|
|
4096
|
-
title ? /* @__PURE__ */ (0,
|
|
4097
|
-
/* @__PURE__ */ (0,
|
|
4148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "my-1", children: [
|
|
4149
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400 ", children: title }) : null,
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4098
4151
|
import_react_select.default,
|
|
4099
4152
|
{
|
|
4100
4153
|
options: convertOptionListToSelectComponent(
|
|
@@ -4157,16 +4210,16 @@ var InputGroup = ({
|
|
|
4157
4210
|
] });
|
|
4158
4211
|
};
|
|
4159
4212
|
const TextAreaInputGroup = () => {
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4162
|
-
/* @__PURE__ */ (0,
|
|
4163
|
-
/* @__PURE__ */ (0,
|
|
4213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "my-1 flex-1 flex flex-col relative", children: [
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: value && limit ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
4164
4217
|
value.length,
|
|
4165
4218
|
" / ",
|
|
4166
4219
|
limit
|
|
4167
4220
|
] }) : null })
|
|
4168
4221
|
] }),
|
|
4169
|
-
/* @__PURE__ */ (0,
|
|
4222
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4170
4223
|
"textarea",
|
|
4171
4224
|
{
|
|
4172
4225
|
ref: textAreaRef,
|
|
@@ -4179,22 +4232,22 @@ var InputGroup = ({
|
|
|
4179
4232
|
onKeyDown
|
|
4180
4233
|
}
|
|
4181
4234
|
),
|
|
4182
|
-
useMath && /* @__PURE__ */ (0,
|
|
4235
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4183
4236
|
"button",
|
|
4184
4237
|
{
|
|
4185
4238
|
className: "absolute right-2 top-1/2 transform -translate-y-1/2 bg-catchup-blue-400 text-white rounded-md px-3 py-1 shadow-sm hover:bg-catchup-blue-500 transition-colors duration-200 z-10",
|
|
4186
4239
|
onClick: handleOpenMathConstructor,
|
|
4187
4240
|
type: "button",
|
|
4188
|
-
children: /* @__PURE__ */ (0,
|
|
4189
|
-
/* @__PURE__ */ (0,
|
|
4190
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4242
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4191
4244
|
"svg",
|
|
4192
4245
|
{
|
|
4193
4246
|
className: "w-3 h-3",
|
|
4194
4247
|
fill: "none",
|
|
4195
4248
|
stroke: "currentColor",
|
|
4196
4249
|
viewBox: "0 0 24 24",
|
|
4197
|
-
children: /* @__PURE__ */ (0,
|
|
4250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4198
4251
|
"path",
|
|
4199
4252
|
{
|
|
4200
4253
|
strokeLinecap: "round",
|
|
@@ -4211,20 +4264,20 @@ var InputGroup = ({
|
|
|
4211
4264
|
] });
|
|
4212
4265
|
};
|
|
4213
4266
|
const TextInputGroup = () => {
|
|
4214
|
-
return /* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "my-1 relative", children: [
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4269
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
4270
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: value && limit ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
4218
4271
|
value.length,
|
|
4219
4272
|
" / ",
|
|
4220
4273
|
limit
|
|
4221
4274
|
] }) : null })
|
|
4222
4275
|
] }),
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4224
4277
|
"div",
|
|
4225
4278
|
{
|
|
4226
4279
|
className: `w-full border ${errorText ? "border-catchup-red shadow-error" : "border-catchup-gray-100"} rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input ${disabled ? "bg-catchup-lighter-gray" : "bg-catchup-white"}`,
|
|
4227
|
-
children: /* @__PURE__ */ (0,
|
|
4280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4228
4281
|
"input",
|
|
4229
4282
|
{
|
|
4230
4283
|
disabled,
|
|
@@ -4242,22 +4295,22 @@ var InputGroup = ({
|
|
|
4242
4295
|
)
|
|
4243
4296
|
}
|
|
4244
4297
|
),
|
|
4245
|
-
useMath && /* @__PURE__ */ (0,
|
|
4298
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4246
4299
|
"button",
|
|
4247
4300
|
{
|
|
4248
4301
|
className: "absolute right-2 top-1/2 transform -translate-y-1/2 bg-catchup-blue-400 text-white rounded-md px-3 py-1 shadow-sm hover:bg-catchup-blue-500 transition-colors duration-200",
|
|
4249
4302
|
onClick: handleOpenMathConstructor,
|
|
4250
4303
|
type: "button",
|
|
4251
|
-
children: /* @__PURE__ */ (0,
|
|
4252
|
-
/* @__PURE__ */ (0,
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4254
4307
|
"svg",
|
|
4255
4308
|
{
|
|
4256
4309
|
className: "w-3 h-3",
|
|
4257
4310
|
fill: "none",
|
|
4258
4311
|
stroke: "currentColor",
|
|
4259
4312
|
viewBox: "0 0 24 24",
|
|
4260
|
-
children: /* @__PURE__ */ (0,
|
|
4313
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4261
4314
|
"path",
|
|
4262
4315
|
{
|
|
4263
4316
|
strokeLinecap: "round",
|
|
@@ -4274,9 +4327,9 @@ var InputGroup = ({
|
|
|
4274
4327
|
] });
|
|
4275
4328
|
};
|
|
4276
4329
|
const SwitchInputGroup = () => {
|
|
4277
|
-
return /* @__PURE__ */ (0,
|
|
4278
|
-
/* @__PURE__ */ (0,
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col my-1", children: [
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-row items-center", children: [
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4280
4333
|
import_react_switch.default,
|
|
4281
4334
|
{
|
|
4282
4335
|
onChange: () => {
|
|
@@ -4295,7 +4348,7 @@ var InputGroup = ({
|
|
|
4295
4348
|
disabled
|
|
4296
4349
|
}
|
|
4297
4350
|
),
|
|
4298
|
-
/* @__PURE__ */ (0,
|
|
4351
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4299
4352
|
"p",
|
|
4300
4353
|
{
|
|
4301
4354
|
className: `${checked ? "font-bold" : "text-catchup-gray"} px-2 transition-all duration-300`,
|
|
@@ -4303,7 +4356,7 @@ var InputGroup = ({
|
|
|
4303
4356
|
}
|
|
4304
4357
|
)
|
|
4305
4358
|
] }),
|
|
4306
|
-
description ? /* @__PURE__ */ (0,
|
|
4359
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md text-catchup-gray-300 mt-1 ml-12", children: description }) : null
|
|
4307
4360
|
] });
|
|
4308
4361
|
};
|
|
4309
4362
|
const RenderMainContent = () => {
|
|
@@ -4325,16 +4378,16 @@ var InputGroup = ({
|
|
|
4325
4378
|
return SwitchInputGroup();
|
|
4326
4379
|
}
|
|
4327
4380
|
};
|
|
4328
|
-
return /* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
4329
4382
|
RenderMainContent(),
|
|
4330
|
-
/* @__PURE__ */ (0,
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MathConstructorModal, {})
|
|
4331
4384
|
] });
|
|
4332
4385
|
};
|
|
4333
4386
|
var InputGroup_default = InputGroup;
|
|
4334
4387
|
|
|
4335
4388
|
// src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
|
|
4336
|
-
var import_react15 = require("react");
|
|
4337
4389
|
var import_react16 = require("react");
|
|
4390
|
+
var import_react17 = require("react");
|
|
4338
4391
|
|
|
4339
4392
|
// src/utilization/AppUtilization.ts
|
|
4340
4393
|
var colors = [
|
|
@@ -4458,12 +4511,12 @@ var getSystemLanguageFromCurriculumType = (curriculumType) => {
|
|
|
4458
4511
|
};
|
|
4459
4512
|
|
|
4460
4513
|
// src/components/dropdowns/MediaDropdown.tsx
|
|
4461
|
-
var
|
|
4462
|
-
var
|
|
4514
|
+
var import_react14 = require("react");
|
|
4515
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4463
4516
|
var MediaDropdown = ({ id, answer, optionList }) => {
|
|
4464
|
-
const [showDropdown, setShowDropdown] = (0,
|
|
4465
|
-
const dropdownRef = (0,
|
|
4466
|
-
(0,
|
|
4517
|
+
const [showDropdown, setShowDropdown] = (0, import_react14.useState)(false);
|
|
4518
|
+
const dropdownRef = (0, import_react14.useRef)(null);
|
|
4519
|
+
(0, import_react14.useEffect)(() => {
|
|
4467
4520
|
const handleClickOutside = (event) => {
|
|
4468
4521
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4469
4522
|
setShowDropdown(false);
|
|
@@ -4489,8 +4542,8 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4489
4542
|
}
|
|
4490
4543
|
setShowDropdown(false);
|
|
4491
4544
|
};
|
|
4492
|
-
return /* @__PURE__ */ (0,
|
|
4493
|
-
/* @__PURE__ */ (0,
|
|
4545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: dropdownRef, className: "w-full relative", children: [
|
|
4546
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4494
4547
|
"div",
|
|
4495
4548
|
{
|
|
4496
4549
|
className: "w-full flex flex-col items-center justify-center cursor-pointer",
|
|
@@ -4498,16 +4551,16 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4498
4551
|
children: answer
|
|
4499
4552
|
}
|
|
4500
4553
|
),
|
|
4501
|
-
/* @__PURE__ */ (0,
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4502
4555
|
"ul",
|
|
4503
4556
|
{
|
|
4504
4557
|
className: `absolute ${showDropdown ? "opacity-100 visible" : "opacity-0 invisible"} flex flex-col items-center w-[300px] rounded-catchup-xlarge border-3 transition-all duration-300 border-catchup-blue bg-catchup-white px-4 py-4 translate-x-1/2 right-1/2 mt-2 z-10`,
|
|
4505
|
-
children: optionList.map((option, index) => /* @__PURE__ */ (0,
|
|
4558
|
+
children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4506
4559
|
"li",
|
|
4507
4560
|
{
|
|
4508
4561
|
className: `${option.listItemClassNames ? option.listItemClassNames : ""}`,
|
|
4509
4562
|
children: [
|
|
4510
|
-
/* @__PURE__ */ (0,
|
|
4563
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4511
4564
|
"div",
|
|
4512
4565
|
{
|
|
4513
4566
|
className: `w-full flex flex-col my-2 cursor-pointer ${option.divClassNames ? option.divClassNames : ""}`,
|
|
@@ -4515,7 +4568,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4515
4568
|
children: option.media
|
|
4516
4569
|
}
|
|
4517
4570
|
),
|
|
4518
|
-
index !== optionList.length - 1 ? /* @__PURE__ */ (0,
|
|
4571
|
+
index !== optionList.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full border my-1 border-catchup-light-blue rounded-catchup-full" }) : null
|
|
4519
4572
|
]
|
|
4520
4573
|
},
|
|
4521
4574
|
option.id
|
|
@@ -4527,25 +4580,25 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4527
4580
|
var MediaDropdown_default = MediaDropdown;
|
|
4528
4581
|
|
|
4529
4582
|
// src/components/activities/material-contents/ShowMaterialMediaByContentType.tsx
|
|
4530
|
-
var
|
|
4583
|
+
var import_react15 = require("react");
|
|
4531
4584
|
var import_react_modal3 = __toESM(require("react-modal"));
|
|
4532
|
-
var
|
|
4585
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4533
4586
|
var ShowMaterialMediaByContentType = ({
|
|
4534
4587
|
key,
|
|
4535
4588
|
contentType,
|
|
4536
4589
|
src,
|
|
4537
4590
|
canFullScreen
|
|
4538
4591
|
}) => {
|
|
4539
|
-
const [showFullScreen, setShowFullScreen] = (0,
|
|
4540
|
-
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0,
|
|
4541
|
-
const [isLoaded, setIsLoaded] = (0,
|
|
4542
|
-
const imageRef = (0,
|
|
4543
|
-
const videoRef = (0,
|
|
4544
|
-
(0,
|
|
4592
|
+
const [showFullScreen, setShowFullScreen] = (0, import_react15.useState)(false);
|
|
4593
|
+
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react15.useState)(null);
|
|
4594
|
+
const [isLoaded, setIsLoaded] = (0, import_react15.useState)(false);
|
|
4595
|
+
const imageRef = (0, import_react15.useRef)(null);
|
|
4596
|
+
const videoRef = (0, import_react15.useRef)(null);
|
|
4597
|
+
(0, import_react15.useEffect)(() => {
|
|
4545
4598
|
setIsLoaded(false);
|
|
4546
4599
|
}, []);
|
|
4547
4600
|
const RenderShowFullScreenItem = () => {
|
|
4548
|
-
return /* @__PURE__ */ (0,
|
|
4601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4549
4602
|
import_react_modal3.default,
|
|
4550
4603
|
{
|
|
4551
4604
|
isOpen: showFullScreen,
|
|
@@ -4576,8 +4629,8 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4576
4629
|
}
|
|
4577
4630
|
},
|
|
4578
4631
|
contentLabel: "",
|
|
4579
|
-
children: /* @__PURE__ */ (0,
|
|
4580
|
-
/* @__PURE__ */ (0,
|
|
4632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
4633
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4581
4634
|
BaseImage_default,
|
|
4582
4635
|
{
|
|
4583
4636
|
src: "/icons/cross-red.webp",
|
|
@@ -4589,7 +4642,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4589
4642
|
}
|
|
4590
4643
|
}
|
|
4591
4644
|
) }),
|
|
4592
|
-
/* @__PURE__ */ (0,
|
|
4645
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4593
4646
|
BaseImage_default,
|
|
4594
4647
|
{
|
|
4595
4648
|
src: selectedFullScreenItem,
|
|
@@ -4602,10 +4655,10 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4602
4655
|
}
|
|
4603
4656
|
);
|
|
4604
4657
|
};
|
|
4605
|
-
return contentType === "IMAGE" ? /* @__PURE__ */ (0,
|
|
4658
|
+
return contentType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
4606
4659
|
RenderShowFullScreenItem(),
|
|
4607
|
-
/* @__PURE__ */ (0,
|
|
4608
|
-
/* @__PURE__ */ (0,
|
|
4660
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center relative", children: [
|
|
4661
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4609
4662
|
BaseImage_default,
|
|
4610
4663
|
{
|
|
4611
4664
|
src,
|
|
@@ -4620,7 +4673,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4620
4673
|
}
|
|
4621
4674
|
}
|
|
4622
4675
|
),
|
|
4623
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0,
|
|
4676
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4624
4677
|
"div",
|
|
4625
4678
|
{
|
|
4626
4679
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1 bg-catchup-white bg-opacity-80",
|
|
@@ -4632,7 +4685,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4632
4685
|
setShowFullScreen(true);
|
|
4633
4686
|
setSelectedFullScreenItem(src);
|
|
4634
4687
|
},
|
|
4635
|
-
children: /* @__PURE__ */ (0,
|
|
4688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4636
4689
|
BaseImage_default,
|
|
4637
4690
|
{
|
|
4638
4691
|
src: "/icons/arrow-up.webp",
|
|
@@ -4644,7 +4697,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4644
4697
|
}
|
|
4645
4698
|
) : null
|
|
4646
4699
|
] }) }) })
|
|
4647
|
-
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0,
|
|
4700
|
+
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4648
4701
|
"video",
|
|
4649
4702
|
{
|
|
4650
4703
|
ref: videoRef,
|
|
@@ -4654,7 +4707,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4654
4707
|
onClick: () => {
|
|
4655
4708
|
}
|
|
4656
4709
|
}
|
|
4657
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0,
|
|
4710
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4658
4711
|
"audio",
|
|
4659
4712
|
{
|
|
4660
4713
|
className: "w-full rounded-catchup-xlarge",
|
|
@@ -4668,7 +4721,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4668
4721
|
var ShowMaterialMediaByContentType_default = ShowMaterialMediaByContentType;
|
|
4669
4722
|
|
|
4670
4723
|
// src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
|
|
4671
|
-
var
|
|
4724
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4672
4725
|
var DropdownActivityMaterialContent = ({
|
|
4673
4726
|
uniqueValue,
|
|
4674
4727
|
answerMap,
|
|
@@ -4679,8 +4732,8 @@ var DropdownActivityMaterialContent = ({
|
|
|
4679
4732
|
isPreview,
|
|
4680
4733
|
showCorrectAnswer
|
|
4681
4734
|
}) => {
|
|
4682
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
4683
|
-
(0,
|
|
4735
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react17.useState)(answerMap);
|
|
4736
|
+
(0, import_react16.useEffect)(() => {
|
|
4684
4737
|
if (showCorrectAnswer) {
|
|
4685
4738
|
const correctAnswerMap = {};
|
|
4686
4739
|
Object.keys(materialMap).forEach((materialMapKey) => {
|
|
@@ -4700,23 +4753,23 @@ var DropdownActivityMaterialContent = ({
|
|
|
4700
4753
|
}
|
|
4701
4754
|
return "INCORRECT";
|
|
4702
4755
|
};
|
|
4703
|
-
return /* @__PURE__ */ (0,
|
|
4704
|
-
/* @__PURE__ */ (0,
|
|
4705
|
-
/* @__PURE__ */ (0,
|
|
4706
|
-
/* @__PURE__ */ (0,
|
|
4756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DividerLine_default, {}) }),
|
|
4759
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4707
4760
|
(materialKey, index) => {
|
|
4708
4761
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
4709
4762
|
const learnerAnswerState = checkAnswerState(
|
|
4710
4763
|
answerKey,
|
|
4711
4764
|
displayAnswerMap[materialKey]
|
|
4712
4765
|
);
|
|
4713
|
-
return /* @__PURE__ */ (0,
|
|
4714
|
-
/* @__PURE__ */ (0,
|
|
4766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4767
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "text-xl", children: [
|
|
4715
4768
|
parseFloat(materialKey) + 1,
|
|
4716
4769
|
"."
|
|
4717
4770
|
] }) }),
|
|
4718
|
-
/* @__PURE__ */ (0,
|
|
4719
|
-
/* @__PURE__ */ (0,
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full relative", children: [
|
|
4772
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4720
4773
|
InputGroup_default,
|
|
4721
4774
|
{
|
|
4722
4775
|
type: "select",
|
|
@@ -4724,13 +4777,13 @@ var DropdownActivityMaterialContent = ({
|
|
|
4724
4777
|
optionList: shuffleArray(
|
|
4725
4778
|
materialMap[materialKey][answerKey]
|
|
4726
4779
|
).map((materialOption) => ({
|
|
4727
|
-
text: /* @__PURE__ */ (0,
|
|
4780
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4728
4781
|
materialOption
|
|
4729
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4782
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4730
4783
|
"span",
|
|
4731
4784
|
{
|
|
4732
4785
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4733
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4786
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4734
4787
|
import_react_katex2.InlineMath,
|
|
4735
4788
|
{
|
|
4736
4789
|
math: inputPart.value
|
|
@@ -4749,11 +4802,11 @@ var DropdownActivityMaterialContent = ({
|
|
|
4749
4802
|
);
|
|
4750
4803
|
}
|
|
4751
4804
|
}
|
|
4752
|
-
) }) : /* @__PURE__ */ (0,
|
|
4805
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4753
4806
|
MediaDropdown_default,
|
|
4754
4807
|
{
|
|
4755
4808
|
id: materialKey,
|
|
4756
|
-
answer: displayAnswerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0,
|
|
4809
|
+
answer: displayAnswerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-catchup-activity-media-box-item h-catchup-activity-media-box-item border rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4757
4810
|
ShowMaterialMediaByContentType_default,
|
|
4758
4811
|
{
|
|
4759
4812
|
contentType: contentMap.type,
|
|
@@ -4764,7 +4817,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
4764
4817
|
),
|
|
4765
4818
|
optionList: materialMap[materialKey][answerKey].map((materialOption, index2) => ({
|
|
4766
4819
|
id: index2,
|
|
4767
|
-
media: /* @__PURE__ */ (0,
|
|
4820
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4768
4821
|
ShowMaterialMediaByContentType_default,
|
|
4769
4822
|
{
|
|
4770
4823
|
contentType: contentMap.type,
|
|
@@ -4782,24 +4835,24 @@ var DropdownActivityMaterialContent = ({
|
|
|
4782
4835
|
}
|
|
4783
4836
|
}))
|
|
4784
4837
|
}
|
|
4785
|
-
) : /* @__PURE__ */ (0,
|
|
4838
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4786
4839
|
displayAnswerMap[materialKey]
|
|
4787
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4840
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4788
4841
|
"span",
|
|
4789
4842
|
{
|
|
4790
4843
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4791
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4844
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
4792
4845
|
},
|
|
4793
4846
|
index2
|
|
4794
4847
|
)) }) }),
|
|
4795
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0,
|
|
4848
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4796
4849
|
BaseImage_default,
|
|
4797
4850
|
{
|
|
4798
4851
|
src: "/icons/checkbox.webp",
|
|
4799
4852
|
alt: "chekbbox",
|
|
4800
4853
|
size: "small"
|
|
4801
4854
|
}
|
|
4802
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0,
|
|
4855
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4803
4856
|
BaseImage_default,
|
|
4804
4857
|
{
|
|
4805
4858
|
src: "/icons/cross-red.webp",
|
|
@@ -4816,8 +4869,8 @@ var DropdownActivityMaterialContent = ({
|
|
|
4816
4869
|
var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
4817
4870
|
|
|
4818
4871
|
// src/components/activities/DropdownActivityContent.tsx
|
|
4819
|
-
var
|
|
4820
|
-
var
|
|
4872
|
+
var import_react18 = require("react");
|
|
4873
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4821
4874
|
var DropdownActivityContent = ({
|
|
4822
4875
|
answerMap,
|
|
4823
4876
|
data,
|
|
@@ -4830,8 +4883,8 @@ var DropdownActivityContent = ({
|
|
|
4830
4883
|
const contentMap = parseContentMapFromData(data);
|
|
4831
4884
|
const dropdownBodyMap = parseBodyMapFromData(data, "DROPDOWN");
|
|
4832
4885
|
const dropdownMaterialMap = parseMaterialMapFromData(data, "DROPDOWN");
|
|
4833
|
-
const [currentAnswerMap, setCurrentAnswerMap] = (0,
|
|
4834
|
-
(0,
|
|
4886
|
+
const [currentAnswerMap, setCurrentAnswerMap] = (0, import_react18.useState)(answerMap);
|
|
4887
|
+
(0, import_react18.useEffect)(() => {
|
|
4835
4888
|
setCurrentAnswerMap(answerMap);
|
|
4836
4889
|
}, [answerMap]);
|
|
4837
4890
|
const handleDropdownAnswerOnChange = (answerMap2, key, value) => {
|
|
@@ -4840,8 +4893,8 @@ var DropdownActivityContent = ({
|
|
|
4840
4893
|
setCurrentAnswerMap(answerMap2);
|
|
4841
4894
|
changeAnswer(answerMap2);
|
|
4842
4895
|
};
|
|
4843
|
-
return /* @__PURE__ */ (0,
|
|
4844
|
-
/* @__PURE__ */ (0,
|
|
4896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
4897
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4845
4898
|
ActivityBodyContent_default,
|
|
4846
4899
|
{
|
|
4847
4900
|
bodyMap: dropdownBodyMap,
|
|
@@ -4850,9 +4903,9 @@ var DropdownActivityContent = ({
|
|
|
4850
4903
|
templateType: "DROPDOWN"
|
|
4851
4904
|
}
|
|
4852
4905
|
) }),
|
|
4853
|
-
/* @__PURE__ */ (0,
|
|
4854
|
-
/* @__PURE__ */ (0,
|
|
4855
|
-
/* @__PURE__ */ (0,
|
|
4906
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DividerLine_default, {}) }),
|
|
4907
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VerticalDividerLine_default, {}) }),
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4856
4909
|
DropdownActivityMaterialContent_default,
|
|
4857
4910
|
{
|
|
4858
4911
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4871,34 +4924,34 @@ var DropdownActivityContent_default = DropdownActivityContent;
|
|
|
4871
4924
|
|
|
4872
4925
|
// src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
|
|
4873
4926
|
var import_react_katex4 = require("react-katex");
|
|
4874
|
-
var
|
|
4927
|
+
var import_react19 = require("react");
|
|
4875
4928
|
|
|
4876
4929
|
// src/components/texts/InputWithSpecialExpression.tsx
|
|
4877
4930
|
var import_react_katex3 = require("react-katex");
|
|
4878
|
-
var
|
|
4931
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4879
4932
|
var InputWithSpecialExpression = ({
|
|
4880
4933
|
value,
|
|
4881
4934
|
showSpecialOnly
|
|
4882
4935
|
}) => {
|
|
4883
4936
|
const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
|
|
4884
|
-
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0,
|
|
4937
|
+
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4885
4938
|
"span",
|
|
4886
4939
|
{
|
|
4887
4940
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4888
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4941
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
4889
4942
|
}
|
|
4890
|
-
)) }) }) : null : /* @__PURE__ */ (0,
|
|
4943
|
+
)) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4891
4944
|
"span",
|
|
4892
4945
|
{
|
|
4893
4946
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4894
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4947
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
4895
4948
|
}
|
|
4896
4949
|
)) }) });
|
|
4897
4950
|
};
|
|
4898
4951
|
var InputWithSpecialExpression_default = InputWithSpecialExpression;
|
|
4899
4952
|
|
|
4900
4953
|
// src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
|
|
4901
|
-
var
|
|
4954
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4902
4955
|
var FillInTheBlanksActivityMaterialContent = ({
|
|
4903
4956
|
uniqueValue,
|
|
4904
4957
|
answerMap,
|
|
@@ -4910,27 +4963,27 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4910
4963
|
isPreview,
|
|
4911
4964
|
showCorrectAnswer
|
|
4912
4965
|
}) => {
|
|
4913
|
-
const [shuffleOptionList, setShuffleOptionList] = (0,
|
|
4914
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
4915
|
-
const [draggedOption, setDraggedOption] = (0,
|
|
4916
|
-
const [dropTargetIndex, setDropTargetIndex] = (0,
|
|
4917
|
-
const [draggedElement, setDraggedElement] = (0,
|
|
4966
|
+
const [shuffleOptionList, setShuffleOptionList] = (0, import_react19.useState)([]);
|
|
4967
|
+
const [selectedOption, setSelectedOption] = (0, import_react19.useState)(null);
|
|
4968
|
+
const [draggedOption, setDraggedOption] = (0, import_react19.useState)(null);
|
|
4969
|
+
const [dropTargetIndex, setDropTargetIndex] = (0, import_react19.useState)(null);
|
|
4970
|
+
const [draggedElement, setDraggedElement] = (0, import_react19.useState)(
|
|
4918
4971
|
null
|
|
4919
4972
|
);
|
|
4920
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
4921
|
-
const dragElementRef = (0,
|
|
4922
|
-
const [mousePosition, setMousePosition] = (0,
|
|
4973
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react19.useState)(answerMap);
|
|
4974
|
+
const dragElementRef = (0, import_react19.useRef)(null);
|
|
4975
|
+
const [mousePosition, setMousePosition] = (0, import_react19.useState)({
|
|
4923
4976
|
x: 0,
|
|
4924
4977
|
y: 0
|
|
4925
4978
|
});
|
|
4926
|
-
const [touchPosition, setTouchPosition] = (0,
|
|
4979
|
+
const [touchPosition, setTouchPosition] = (0, import_react19.useState)({
|
|
4927
4980
|
x: 0,
|
|
4928
4981
|
y: 0
|
|
4929
4982
|
});
|
|
4930
|
-
(0,
|
|
4983
|
+
(0, import_react19.useEffect)(() => {
|
|
4931
4984
|
setShuffleOptionList(shuffleArray(optionList));
|
|
4932
4985
|
}, [optionList]);
|
|
4933
|
-
(0,
|
|
4986
|
+
(0, import_react19.useEffect)(() => {
|
|
4934
4987
|
if (showCorrectAnswer) {
|
|
4935
4988
|
const correctAnswerMap = {};
|
|
4936
4989
|
Object.keys(materialMap).forEach((materialMapKey) => {
|
|
@@ -5027,16 +5080,16 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5027
5080
|
setSelectedOption(null);
|
|
5028
5081
|
}
|
|
5029
5082
|
};
|
|
5030
|
-
return /* @__PURE__ */ (0,
|
|
5083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
5031
5084
|
"div",
|
|
5032
5085
|
{
|
|
5033
5086
|
className: "flex flex-col h-full",
|
|
5034
5087
|
onMouseMove: handleMouseMove,
|
|
5035
5088
|
onMouseUp: handleMouseUp,
|
|
5036
5089
|
children: [
|
|
5037
|
-
/* @__PURE__ */ (0,
|
|
5038
|
-
/* @__PURE__ */ (0,
|
|
5039
|
-
draggedOption && mousePosition.x > 0 && /* @__PURE__ */ (0,
|
|
5090
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
5091
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DividerLine_default, {}) }),
|
|
5092
|
+
draggedOption && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5040
5093
|
"div",
|
|
5041
5094
|
{
|
|
5042
5095
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -5045,13 +5098,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5045
5098
|
top: `${mousePosition.y}px`,
|
|
5046
5099
|
transform: "translate(-50%, -50%)"
|
|
5047
5100
|
},
|
|
5048
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5101
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5049
5102
|
InputWithSpecialExpression_default,
|
|
5050
5103
|
{
|
|
5051
5104
|
value: draggedOption,
|
|
5052
5105
|
showSpecialOnly: false
|
|
5053
5106
|
}
|
|
5054
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
5107
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5055
5108
|
ShowMaterialMediaByContentType_default,
|
|
5056
5109
|
{
|
|
5057
5110
|
contentType: contentMap.type,
|
|
@@ -5062,7 +5115,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5062
5115
|
) })
|
|
5063
5116
|
}
|
|
5064
5117
|
),
|
|
5065
|
-
draggedOption && touchPosition.x > 0 && /* @__PURE__ */ (0,
|
|
5118
|
+
draggedOption && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5066
5119
|
"div",
|
|
5067
5120
|
{
|
|
5068
5121
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -5071,13 +5124,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5071
5124
|
top: `${touchPosition.y}px`,
|
|
5072
5125
|
transform: "translate(-50%, -50%)"
|
|
5073
5126
|
},
|
|
5074
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5127
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5075
5128
|
InputWithSpecialExpression_default,
|
|
5076
5129
|
{
|
|
5077
5130
|
value: draggedOption,
|
|
5078
5131
|
showSpecialOnly: false
|
|
5079
5132
|
}
|
|
5080
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
5133
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5081
5134
|
ShowMaterialMediaByContentType_default,
|
|
5082
5135
|
{
|
|
5083
5136
|
contentType: contentMap.type,
|
|
@@ -5088,9 +5141,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5088
5141
|
) })
|
|
5089
5142
|
}
|
|
5090
5143
|
),
|
|
5091
|
-
/* @__PURE__ */ (0,
|
|
5092
|
-
/* @__PURE__ */ (0,
|
|
5093
|
-
(option, index) => checkAnswerProvided(displayAnswerMap, option) ? /* @__PURE__ */ (0,
|
|
5144
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: [
|
|
5145
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
5146
|
+
(option, index) => checkAnswerProvided(displayAnswerMap, option) ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5094
5147
|
ShowMaterialMediaByContentType_default,
|
|
5095
5148
|
{
|
|
5096
5149
|
contentType: contentMap.type,
|
|
@@ -5098,7 +5151,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5098
5151
|
canFullScreen: true
|
|
5099
5152
|
},
|
|
5100
5153
|
`${uniqueValue}-${index}`
|
|
5101
|
-
) : /* @__PURE__ */ (0,
|
|
5154
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5102
5155
|
"div",
|
|
5103
5156
|
{
|
|
5104
5157
|
ref: draggedOption === option ? dragElementRef : null,
|
|
@@ -5108,12 +5161,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5108
5161
|
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
5109
5162
|
onTouchMove: handleTouchMove,
|
|
5110
5163
|
onTouchEnd: handleTouchEnd,
|
|
5111
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5164
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5112
5165
|
"div",
|
|
5113
5166
|
{
|
|
5114
5167
|
className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5115
5168
|
onClick: () => handleSelectOption(option),
|
|
5116
|
-
children: /* @__PURE__ */ (0,
|
|
5169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5117
5170
|
InputWithSpecialExpression_default,
|
|
5118
5171
|
{
|
|
5119
5172
|
value: option,
|
|
@@ -5121,12 +5174,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5121
5174
|
}
|
|
5122
5175
|
) })
|
|
5123
5176
|
}
|
|
5124
|
-
) : /* @__PURE__ */ (0,
|
|
5177
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5125
5178
|
"div",
|
|
5126
5179
|
{
|
|
5127
5180
|
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
|
|
5128
5181
|
onClick: () => handleSelectOption(option),
|
|
5129
|
-
children: /* @__PURE__ */ (0,
|
|
5182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5130
5183
|
ShowMaterialMediaByContentType_default,
|
|
5131
5184
|
{
|
|
5132
5185
|
contentType: contentMap.type,
|
|
@@ -5141,12 +5194,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5141
5194
|
index
|
|
5142
5195
|
)
|
|
5143
5196
|
) }),
|
|
5144
|
-
/* @__PURE__ */ (0,
|
|
5197
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
5145
5198
|
const learnerAnswerState = checkAnswerState(
|
|
5146
5199
|
JSON.parse(materialMap[materialKey]),
|
|
5147
5200
|
displayAnswerMap[materialKey]
|
|
5148
5201
|
);
|
|
5149
|
-
return /* @__PURE__ */ (0,
|
|
5202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5150
5203
|
"div",
|
|
5151
5204
|
{
|
|
5152
5205
|
"data-drop-zone": materialKey,
|
|
@@ -5154,13 +5207,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5154
5207
|
onMouseLeave: () => setDropTargetIndex(null),
|
|
5155
5208
|
onClick: () => handleDropZoneClick(materialKey),
|
|
5156
5209
|
className: `${dropTargetIndex === materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200 rounded-lg`,
|
|
5157
|
-
children: /* @__PURE__ */ (0,
|
|
5158
|
-
/* @__PURE__ */ (0,
|
|
5210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { className: "text-xl", children: [
|
|
5159
5212
|
parseFloat(materialKey) + 1,
|
|
5160
5213
|
"."
|
|
5161
5214
|
] }) }),
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5163
|
-
/* @__PURE__ */ (0,
|
|
5215
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
5216
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5164
5217
|
"div",
|
|
5165
5218
|
{
|
|
5166
5219
|
className: `w-full min-h-[44px] border rounded-lg ${displayAnswerMap[materialKey] ? "border-catchup-blue-400 px-2 cursor-pointer" : "bg-catchup-gray-50 border-catchup-gray-200 border-dashed py-2 px-4"}`,
|
|
@@ -5170,7 +5223,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5170
5223
|
onChange(answerMap, materialKey, "");
|
|
5171
5224
|
}
|
|
5172
5225
|
},
|
|
5173
|
-
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ (0,
|
|
5226
|
+
children: displayAnswerMap[materialKey] ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5174
5227
|
InputWithSpecialExpression_default,
|
|
5175
5228
|
{
|
|
5176
5229
|
value: displayAnswerMap[materialKey],
|
|
@@ -5179,14 +5232,14 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5179
5232
|
) : null
|
|
5180
5233
|
}
|
|
5181
5234
|
) }),
|
|
5182
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0,
|
|
5235
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5183
5236
|
BaseImage_default,
|
|
5184
5237
|
{
|
|
5185
5238
|
src: "/icons/checkbox.webp",
|
|
5186
5239
|
alt: "checkbox",
|
|
5187
5240
|
size: "small"
|
|
5188
5241
|
}
|
|
5189
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0,
|
|
5242
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5190
5243
|
BaseImage_default,
|
|
5191
5244
|
{
|
|
5192
5245
|
src: "/icons/cross-red.webp",
|
|
@@ -5194,13 +5247,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5194
5247
|
size: "small"
|
|
5195
5248
|
}
|
|
5196
5249
|
) }) : null
|
|
5197
|
-
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ (0,
|
|
5250
|
+
] }) : displayAnswerMap[materialKey] === "" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5198
5251
|
"div",
|
|
5199
5252
|
{
|
|
5200
5253
|
className: `w-catchup-activity-media-box-item h-catchup-activity-media-box-item border rounded-catchup-xlarge border-dashed ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
5201
|
-
children: /* @__PURE__ */ (0,
|
|
5254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
|
|
5202
5255
|
}
|
|
5203
|
-
) : /* @__PURE__ */ (0,
|
|
5256
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5204
5257
|
"div",
|
|
5205
5258
|
{
|
|
5206
5259
|
className: "flex-1 cursor-pointer",
|
|
@@ -5208,7 +5261,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5208
5261
|
e.stopPropagation();
|
|
5209
5262
|
onChange(answerMap, materialKey, "");
|
|
5210
5263
|
},
|
|
5211
|
-
children: /* @__PURE__ */ (0,
|
|
5264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5212
5265
|
ShowMaterialMediaByContentType_default,
|
|
5213
5266
|
{
|
|
5214
5267
|
contentType: contentMap.type,
|
|
@@ -5218,13 +5271,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5218
5271
|
`${uniqueValue}-${index}`
|
|
5219
5272
|
)
|
|
5220
5273
|
}
|
|
5221
|
-
) : /* @__PURE__ */ (0,
|
|
5274
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
5222
5275
|
displayAnswerMap[materialKey]
|
|
5223
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5276
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5224
5277
|
"span",
|
|
5225
5278
|
{
|
|
5226
5279
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5227
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5280
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5228
5281
|
},
|
|
5229
5282
|
index2
|
|
5230
5283
|
)) }, materialKey) })
|
|
@@ -5240,8 +5293,8 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5240
5293
|
var FillInTheBlanksActivityMaterialContent_default = FillInTheBlanksActivityMaterialContent;
|
|
5241
5294
|
|
|
5242
5295
|
// src/components/activities/FillInTheBlanksActivityContent.tsx
|
|
5243
|
-
var
|
|
5244
|
-
var
|
|
5296
|
+
var import_react20 = require("react");
|
|
5297
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5245
5298
|
var FillInTheBlanksActivityContent = ({
|
|
5246
5299
|
answerMap,
|
|
5247
5300
|
data,
|
|
@@ -5261,8 +5314,8 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5261
5314
|
"FILL_IN_THE_BLANKS"
|
|
5262
5315
|
);
|
|
5263
5316
|
const fillInTheBlanksIncorrectList = data.fillInTheBlanksIncorrectList ? JSON.parse(data.fillInTheBlanksIncorrectList) : [];
|
|
5264
|
-
const [currentAnswerMap, setCurrentAnswerMap] = (0,
|
|
5265
|
-
(0,
|
|
5317
|
+
const [currentAnswerMap, setCurrentAnswerMap] = (0, import_react20.useState)(answerMap);
|
|
5318
|
+
(0, import_react20.useEffect)(() => {
|
|
5266
5319
|
setCurrentAnswerMap(answerMap);
|
|
5267
5320
|
}, [answerMap]);
|
|
5268
5321
|
const constructAnswerOptionList = () => {
|
|
@@ -5289,8 +5342,8 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5289
5342
|
setCurrentAnswerMap(answerMap2);
|
|
5290
5343
|
changeAnswer(answerMap2);
|
|
5291
5344
|
};
|
|
5292
|
-
return /* @__PURE__ */ (0,
|
|
5293
|
-
/* @__PURE__ */ (0,
|
|
5345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
5346
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5294
5347
|
ActivityBodyContent_default,
|
|
5295
5348
|
{
|
|
5296
5349
|
bodyMap: fillInTheBlanksBodyMap,
|
|
@@ -5299,9 +5352,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5299
5352
|
templateType: "FILL_IN_THE_BLANKS"
|
|
5300
5353
|
}
|
|
5301
5354
|
) }),
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5303
|
-
/* @__PURE__ */ (0,
|
|
5304
|
-
/* @__PURE__ */ (0,
|
|
5355
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {}) }),
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(VerticalDividerLine_default, {}) }),
|
|
5357
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5305
5358
|
FillInTheBlanksActivityMaterialContent_default,
|
|
5306
5359
|
{
|
|
5307
5360
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5320,9 +5373,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
5320
5373
|
var FillInTheBlanksActivityContent_default = FillInTheBlanksActivityContent;
|
|
5321
5374
|
|
|
5322
5375
|
// src/components/activities/material-contents/GroupingActivityMaterialContent.tsx
|
|
5323
|
-
var
|
|
5376
|
+
var import_react21 = require("react");
|
|
5324
5377
|
var import_react_katex5 = require("react-katex");
|
|
5325
|
-
var
|
|
5378
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5326
5379
|
var GroupingActivityMaterialContent = ({
|
|
5327
5380
|
uniqueValue,
|
|
5328
5381
|
answerMap,
|
|
@@ -5333,27 +5386,27 @@ var GroupingActivityMaterialContent = ({
|
|
|
5333
5386
|
isPreview,
|
|
5334
5387
|
showCorrectAnswer
|
|
5335
5388
|
}) => {
|
|
5336
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5337
|
-
const [draggedValue, setDraggedValue] = (0,
|
|
5338
|
-
const [dropTargetKey, setDropTargetKey] = (0,
|
|
5339
|
-
const [draggedElement, setDraggedElement] = (0,
|
|
5389
|
+
const [selectedValue, setSelectedValue] = (0, import_react21.useState)(null);
|
|
5390
|
+
const [draggedValue, setDraggedValue] = (0, import_react21.useState)(null);
|
|
5391
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react21.useState)(null);
|
|
5392
|
+
const [draggedElement, setDraggedElement] = (0, import_react21.useState)(
|
|
5340
5393
|
null
|
|
5341
5394
|
);
|
|
5342
|
-
const [shuffledMaterialList, setShuffledMaterialList] = (0,
|
|
5343
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
5344
|
-
const dragElementRef = (0,
|
|
5345
|
-
const [mousePosition, setMousePosition] = (0,
|
|
5395
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react21.useState)([]);
|
|
5396
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react21.useState)(answerMap);
|
|
5397
|
+
const dragElementRef = (0, import_react21.useRef)(null);
|
|
5398
|
+
const [mousePosition, setMousePosition] = (0, import_react21.useState)({
|
|
5346
5399
|
x: 0,
|
|
5347
5400
|
y: 0
|
|
5348
5401
|
});
|
|
5349
|
-
const [touchPosition, setTouchPosition] = (0,
|
|
5402
|
+
const [touchPosition, setTouchPosition] = (0, import_react21.useState)({
|
|
5350
5403
|
x: 0,
|
|
5351
5404
|
y: 0
|
|
5352
5405
|
});
|
|
5353
|
-
const ref = (0,
|
|
5354
|
-
const dropZoneRefs = (0,
|
|
5355
|
-
const hasShuffledRef = (0,
|
|
5356
|
-
(0,
|
|
5406
|
+
const ref = (0, import_react21.useRef)(null);
|
|
5407
|
+
const dropZoneRefs = (0, import_react21.useRef)({});
|
|
5408
|
+
const hasShuffledRef = (0, import_react21.useRef)(false);
|
|
5409
|
+
(0, import_react21.useEffect)(() => {
|
|
5357
5410
|
if (hasShuffledRef.current) return;
|
|
5358
5411
|
const shuffleArray2 = (array) => {
|
|
5359
5412
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5372,14 +5425,14 @@ var GroupingActivityMaterialContent = ({
|
|
|
5372
5425
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5373
5426
|
hasShuffledRef.current = true;
|
|
5374
5427
|
}, [materialMap]);
|
|
5375
|
-
(0,
|
|
5428
|
+
(0, import_react21.useEffect)(() => {
|
|
5376
5429
|
if (showCorrectAnswer) {
|
|
5377
5430
|
setDisplayAnswerMap(materialMap);
|
|
5378
5431
|
} else {
|
|
5379
5432
|
setDisplayAnswerMap(answerMap);
|
|
5380
5433
|
}
|
|
5381
5434
|
}, [showCorrectAnswer, answerMap, materialMap]);
|
|
5382
|
-
(0,
|
|
5435
|
+
(0, import_react21.useEffect)(() => {
|
|
5383
5436
|
if (!dropTargetKey || !dropZoneRefs.current[dropTargetKey]) return;
|
|
5384
5437
|
const dropZoneElement = dropZoneRefs.current[dropTargetKey];
|
|
5385
5438
|
if (!dropZoneElement) return;
|
|
@@ -5519,8 +5572,8 @@ var GroupingActivityMaterialContent = ({
|
|
|
5519
5572
|
}
|
|
5520
5573
|
};
|
|
5521
5574
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5522
|
-
return /* @__PURE__ */ (0,
|
|
5523
|
-
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0,
|
|
5575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
5576
|
+
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5524
5577
|
"div",
|
|
5525
5578
|
{
|
|
5526
5579
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -5529,16 +5582,16 @@ var GroupingActivityMaterialContent = ({
|
|
|
5529
5582
|
top: `${mousePosition.y}px`,
|
|
5530
5583
|
transform: "translate(-50%, -50%)"
|
|
5531
5584
|
},
|
|
5532
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5533
|
-
(inputPart, index) => /* @__PURE__ */ (0,
|
|
5585
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5586
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5534
5587
|
"span",
|
|
5535
5588
|
{
|
|
5536
5589
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5537
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5590
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5538
5591
|
},
|
|
5539
5592
|
index
|
|
5540
5593
|
)
|
|
5541
|
-
) }) }) }) : /* @__PURE__ */ (0,
|
|
5594
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5542
5595
|
ShowMaterialMediaByContentType_default,
|
|
5543
5596
|
{
|
|
5544
5597
|
contentType: contentMap.type,
|
|
@@ -5549,7 +5602,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5549
5602
|
) })
|
|
5550
5603
|
}
|
|
5551
5604
|
),
|
|
5552
|
-
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0,
|
|
5605
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5553
5606
|
"div",
|
|
5554
5607
|
{
|
|
5555
5608
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -5558,16 +5611,16 @@ var GroupingActivityMaterialContent = ({
|
|
|
5558
5611
|
top: `${touchPosition.y}px`,
|
|
5559
5612
|
transform: "translate(-50%, -50%)"
|
|
5560
5613
|
},
|
|
5561
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5562
|
-
(inputPart, index) => /* @__PURE__ */ (0,
|
|
5614
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
5615
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5563
5616
|
"span",
|
|
5564
5617
|
{
|
|
5565
5618
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5566
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5619
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5567
5620
|
},
|
|
5568
5621
|
index
|
|
5569
5622
|
)
|
|
5570
|
-
) }) }) }) : /* @__PURE__ */ (0,
|
|
5623
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5571
5624
|
ShowMaterialMediaByContentType_default,
|
|
5572
5625
|
{
|
|
5573
5626
|
contentType: contentMap.type,
|
|
@@ -5578,9 +5631,9 @@ var GroupingActivityMaterialContent = ({
|
|
|
5578
5631
|
) })
|
|
5579
5632
|
}
|
|
5580
5633
|
),
|
|
5581
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0,
|
|
5582
|
-
/* @__PURE__ */ (0,
|
|
5583
|
-
return /* @__PURE__ */ (0,
|
|
5634
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
5635
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0 flex flex-row gap-x-4 overflow-x-auto py-2", children: filteredMaterialList.map((materialValue, index) => {
|
|
5636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5584
5637
|
"div",
|
|
5585
5638
|
{
|
|
5586
5639
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
@@ -5590,21 +5643,21 @@ var GroupingActivityMaterialContent = ({
|
|
|
5590
5643
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5591
5644
|
onTouchMove: handleTouchMove,
|
|
5592
5645
|
onTouchEnd: handleTouchEnd,
|
|
5593
|
-
children: /* @__PURE__ */ (0,
|
|
5646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5594
5647
|
"div",
|
|
5595
5648
|
{
|
|
5596
5649
|
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`,
|
|
5597
5650
|
onClick: () => handleSelectItem(materialValue),
|
|
5598
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5651
|
+
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(
|
|
5599
5652
|
materialValue
|
|
5600
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5653
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5601
5654
|
"span",
|
|
5602
5655
|
{
|
|
5603
5656
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5604
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5657
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5605
5658
|
},
|
|
5606
5659
|
index2
|
|
5607
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
5660
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5608
5661
|
ShowMaterialMediaByContentType_default,
|
|
5609
5662
|
{
|
|
5610
5663
|
contentType: contentMap.type,
|
|
@@ -5619,27 +5672,27 @@ var GroupingActivityMaterialContent = ({
|
|
|
5619
5672
|
index
|
|
5620
5673
|
);
|
|
5621
5674
|
}) }),
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {}) })
|
|
5623
5676
|
] }) : null,
|
|
5624
|
-
/* @__PURE__ */ (0,
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5677
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5626
5679
|
"div",
|
|
5627
5680
|
{
|
|
5628
5681
|
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`,
|
|
5629
|
-
children: /* @__PURE__ */ (0,
|
|
5630
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
5682
|
+
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(answerMapKey).map(
|
|
5683
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5631
5684
|
"span",
|
|
5632
5685
|
{
|
|
5633
5686
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5634
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5687
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5635
5688
|
},
|
|
5636
5689
|
index2
|
|
5637
5690
|
)
|
|
5638
5691
|
) }) })
|
|
5639
5692
|
}
|
|
5640
5693
|
) }),
|
|
5641
|
-
/* @__PURE__ */ (0,
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
5694
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5695
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-1 min-w-0", ref, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-full py-3", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5643
5696
|
"div",
|
|
5644
5697
|
{
|
|
5645
5698
|
ref: (el) => dropZoneRefs.current[answerMapKey] = el,
|
|
@@ -5648,17 +5701,17 @@ var GroupingActivityMaterialContent = ({
|
|
|
5648
5701
|
onMouseLeave: () => setDropTargetKey(null),
|
|
5649
5702
|
onClick: () => handleDropZoneClick(answerMapKey),
|
|
5650
5703
|
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`,
|
|
5651
|
-
children: /* @__PURE__ */ (0,
|
|
5704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-full w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-row items-center gap-2 w-max h-full", children: displayAnswerMap[answerMapKey].map(
|
|
5652
5705
|
(answerMapValue, answerMapIndex) => {
|
|
5653
5706
|
const learnerAnswerState = checkAnswerState(
|
|
5654
5707
|
materialMap[answerMapKey],
|
|
5655
5708
|
answerMapValue
|
|
5656
5709
|
);
|
|
5657
|
-
return /* @__PURE__ */ (0,
|
|
5710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5658
5711
|
"div",
|
|
5659
5712
|
{
|
|
5660
5713
|
className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"}`,
|
|
5661
|
-
children: /* @__PURE__ */ (0,
|
|
5714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5662
5715
|
"div",
|
|
5663
5716
|
{
|
|
5664
5717
|
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`,
|
|
@@ -5674,13 +5727,13 @@ var GroupingActivityMaterialContent = ({
|
|
|
5674
5727
|
setSelectedValue(null);
|
|
5675
5728
|
}
|
|
5676
5729
|
},
|
|
5677
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5730
|
+
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(
|
|
5678
5731
|
answerMapValue
|
|
5679
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5732
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5680
5733
|
"span",
|
|
5681
5734
|
{
|
|
5682
5735
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5683
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5736
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5684
5737
|
import_react_katex5.InlineMath,
|
|
5685
5738
|
{
|
|
5686
5739
|
math: inputPart.value
|
|
@@ -5688,7 +5741,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5688
5741
|
) }) : inputPart.value
|
|
5689
5742
|
},
|
|
5690
5743
|
index2
|
|
5691
|
-
)) }) }) }) : /* @__PURE__ */ (0,
|
|
5744
|
+
)) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5692
5745
|
ShowMaterialMediaByContentType_default,
|
|
5693
5746
|
{
|
|
5694
5747
|
contentType: contentMap.type,
|
|
@@ -5711,7 +5764,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5711
5764
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5712
5765
|
|
|
5713
5766
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5714
|
-
var
|
|
5767
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5715
5768
|
var GroupingActivityContent = ({
|
|
5716
5769
|
answerMap,
|
|
5717
5770
|
data,
|
|
@@ -5733,12 +5786,12 @@ var GroupingActivityContent = ({
|
|
|
5733
5786
|
}
|
|
5734
5787
|
changeAnswer(answerMap2);
|
|
5735
5788
|
};
|
|
5736
|
-
return /* @__PURE__ */ (0,
|
|
5737
|
-
/* @__PURE__ */ (0,
|
|
5789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
5790
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5738
5791
|
"div",
|
|
5739
5792
|
{
|
|
5740
5793
|
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
5741
|
-
children: /* @__PURE__ */ (0,
|
|
5794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5742
5795
|
ActivityBodyContent_default,
|
|
5743
5796
|
{
|
|
5744
5797
|
bodyMap: groupingBodyMap,
|
|
@@ -5747,13 +5800,13 @@ var GroupingActivityContent = ({
|
|
|
5747
5800
|
)
|
|
5748
5801
|
}
|
|
5749
5802
|
),
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
5752
|
-
/* @__PURE__ */ (0,
|
|
5803
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}) }),
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(VerticalDividerLine_default, {}) }),
|
|
5805
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5753
5806
|
"div",
|
|
5754
5807
|
{
|
|
5755
5808
|
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
5756
|
-
children: /* @__PURE__ */ (0,
|
|
5809
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5757
5810
|
GroupingActivityMaterialContent_default,
|
|
5758
5811
|
{
|
|
5759
5812
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5773,9 +5826,9 @@ var GroupingActivityContent = ({
|
|
|
5773
5826
|
var GroupingActivityContent_default = GroupingActivityContent;
|
|
5774
5827
|
|
|
5775
5828
|
// src/components/activities/material-contents/MatchingActivityMaterialContent.tsx
|
|
5776
|
-
var
|
|
5829
|
+
var import_react22 = require("react");
|
|
5777
5830
|
var import_react_katex6 = require("react-katex");
|
|
5778
|
-
var
|
|
5831
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5779
5832
|
var MatchingActivityMaterialContent = ({
|
|
5780
5833
|
uniqueValue,
|
|
5781
5834
|
answerMap,
|
|
@@ -5786,27 +5839,27 @@ var MatchingActivityMaterialContent = ({
|
|
|
5786
5839
|
isPreview,
|
|
5787
5840
|
showCorrectAnswer
|
|
5788
5841
|
}) => {
|
|
5789
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5790
|
-
const [draggedValue, setDraggedValue] = (0,
|
|
5791
|
-
const [dropTargetKey, setDropTargetKey] = (0,
|
|
5792
|
-
const [draggedElement, setDraggedElement] = (0,
|
|
5842
|
+
const [selectedValue, setSelectedValue] = (0, import_react22.useState)(null);
|
|
5843
|
+
const [draggedValue, setDraggedValue] = (0, import_react22.useState)(null);
|
|
5844
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react22.useState)(null);
|
|
5845
|
+
const [draggedElement, setDraggedElement] = (0, import_react22.useState)(
|
|
5793
5846
|
null
|
|
5794
5847
|
);
|
|
5795
|
-
const [shuffledMaterialList, setShuffledMaterialList] = (0,
|
|
5796
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
5797
|
-
const dragElementRef = (0,
|
|
5798
|
-
const [mousePosition, setMousePosition] = (0,
|
|
5848
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react22.useState)([]);
|
|
5849
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react22.useState)(answerMap);
|
|
5850
|
+
const dragElementRef = (0, import_react22.useRef)(null);
|
|
5851
|
+
const [mousePosition, setMousePosition] = (0, import_react22.useState)({
|
|
5799
5852
|
x: 0,
|
|
5800
5853
|
y: 0
|
|
5801
5854
|
});
|
|
5802
|
-
const [touchPosition, setTouchPosition] = (0,
|
|
5855
|
+
const [touchPosition, setTouchPosition] = (0, import_react22.useState)({
|
|
5803
5856
|
x: 0,
|
|
5804
5857
|
y: 0
|
|
5805
5858
|
});
|
|
5806
|
-
const itemsRef = (0,
|
|
5807
|
-
const dropZoneRefs = (0,
|
|
5808
|
-
const hasShuffledRef = (0,
|
|
5809
|
-
(0,
|
|
5859
|
+
const itemsRef = (0, import_react22.useRef)(null);
|
|
5860
|
+
const dropZoneRefs = (0, import_react22.useRef)({});
|
|
5861
|
+
const hasShuffledRef = (0, import_react22.useRef)(false);
|
|
5862
|
+
(0, import_react22.useEffect)(() => {
|
|
5810
5863
|
if (hasShuffledRef.current) return;
|
|
5811
5864
|
const shuffleArray2 = (array) => {
|
|
5812
5865
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5823,14 +5876,14 @@ var MatchingActivityMaterialContent = ({
|
|
|
5823
5876
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5824
5877
|
hasShuffledRef.current = true;
|
|
5825
5878
|
}, [materialMap]);
|
|
5826
|
-
(0,
|
|
5879
|
+
(0, import_react22.useEffect)(() => {
|
|
5827
5880
|
if (showCorrectAnswer) {
|
|
5828
5881
|
setDisplayAnswerMap(materialMap);
|
|
5829
5882
|
} else {
|
|
5830
5883
|
setDisplayAnswerMap(answerMap);
|
|
5831
5884
|
}
|
|
5832
5885
|
}, [showCorrectAnswer, answerMap, materialMap]);
|
|
5833
|
-
(0,
|
|
5886
|
+
(0, import_react22.useEffect)(() => {
|
|
5834
5887
|
if (!dropTargetKey || !dropZoneRefs.current[dropTargetKey]) return;
|
|
5835
5888
|
const dropZoneElement = dropZoneRefs.current[dropTargetKey];
|
|
5836
5889
|
if (!dropZoneElement) return;
|
|
@@ -5964,8 +6017,8 @@ var MatchingActivityMaterialContent = ({
|
|
|
5964
6017
|
}
|
|
5965
6018
|
};
|
|
5966
6019
|
const filteredMaterialList = retrieveFilteredMaterialList(displayAnswerMap);
|
|
5967
|
-
return /* @__PURE__ */ (0,
|
|
5968
|
-
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0,
|
|
6020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col h-full", onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, children: [
|
|
6021
|
+
draggedValue && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5969
6022
|
"div",
|
|
5970
6023
|
{
|
|
5971
6024
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -5974,16 +6027,16 @@ var MatchingActivityMaterialContent = ({
|
|
|
5974
6027
|
top: `${mousePosition.y}px`,
|
|
5975
6028
|
transform: "translate(-50%, -50%)"
|
|
5976
6029
|
},
|
|
5977
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5978
|
-
(inputPart, index) => /* @__PURE__ */ (0,
|
|
6030
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
6031
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5979
6032
|
"span",
|
|
5980
6033
|
{
|
|
5981
6034
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5982
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6035
|
+
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
|
|
5983
6036
|
},
|
|
5984
6037
|
index
|
|
5985
6038
|
)
|
|
5986
|
-
) }) }) }) : /* @__PURE__ */ (0,
|
|
6039
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5987
6040
|
ShowMaterialMediaByContentType_default,
|
|
5988
6041
|
{
|
|
5989
6042
|
contentType: contentMap.type,
|
|
@@ -5994,7 +6047,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5994
6047
|
) })
|
|
5995
6048
|
}
|
|
5996
6049
|
),
|
|
5997
|
-
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0,
|
|
6050
|
+
draggedValue && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5998
6051
|
"div",
|
|
5999
6052
|
{
|
|
6000
6053
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -6003,16 +6056,16 @@ var MatchingActivityMaterialContent = ({
|
|
|
6003
6056
|
top: `${touchPosition.y}px`,
|
|
6004
6057
|
transform: "translate(-50%, -50%)"
|
|
6005
6058
|
},
|
|
6006
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6007
|
-
(inputPart, index) => /* @__PURE__ */ (0,
|
|
6059
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center m-2 min-w-[200px] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(draggedValue).map(
|
|
6060
|
+
(inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6008
6061
|
"span",
|
|
6009
6062
|
{
|
|
6010
6063
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6011
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6064
|
+
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
|
|
6012
6065
|
},
|
|
6013
6066
|
index
|
|
6014
6067
|
)
|
|
6015
|
-
) }) }) }) : /* @__PURE__ */ (0,
|
|
6068
|
+
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "border-catchup-blue border-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6016
6069
|
ShowMaterialMediaByContentType_default,
|
|
6017
6070
|
{
|
|
6018
6071
|
contentType: contentMap.type,
|
|
@@ -6023,13 +6076,13 @@ var MatchingActivityMaterialContent = ({
|
|
|
6023
6076
|
) })
|
|
6024
6077
|
}
|
|
6025
6078
|
),
|
|
6026
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0,
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
6079
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6028
6081
|
"div",
|
|
6029
6082
|
{
|
|
6030
6083
|
ref: itemsRef,
|
|
6031
6084
|
className: "flex-shrink-0 flex flex-row gap-x-4 gap-y-4 overflow-x-auto py-2",
|
|
6032
|
-
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0,
|
|
6085
|
+
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6033
6086
|
"div",
|
|
6034
6087
|
{
|
|
6035
6088
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
@@ -6039,21 +6092,21 @@ var MatchingActivityMaterialContent = ({
|
|
|
6039
6092
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
6040
6093
|
onTouchMove: handleTouchMove,
|
|
6041
6094
|
onTouchEnd: handleTouchEnd,
|
|
6042
|
-
children: /* @__PURE__ */ (0,
|
|
6095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6043
6096
|
"div",
|
|
6044
6097
|
{
|
|
6045
6098
|
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`,
|
|
6046
6099
|
onClick: () => handleSelectItem(materialValue),
|
|
6047
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6100
|
+
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-hidden px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6048
6101
|
materialValue
|
|
6049
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6102
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6050
6103
|
"span",
|
|
6051
6104
|
{
|
|
6052
6105
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6053
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6106
|
+
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
|
|
6054
6107
|
},
|
|
6055
6108
|
index2
|
|
6056
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
6109
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6057
6110
|
ShowMaterialMediaByContentType_default,
|
|
6058
6111
|
{
|
|
6059
6112
|
contentType: contentMap.type,
|
|
@@ -6069,32 +6122,32 @@ var MatchingActivityMaterialContent = ({
|
|
|
6069
6122
|
))
|
|
6070
6123
|
}
|
|
6071
6124
|
),
|
|
6072
|
-
/* @__PURE__ */ (0,
|
|
6125
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) })
|
|
6073
6126
|
] }) : null,
|
|
6074
|
-
/* @__PURE__ */ (0,
|
|
6127
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((answerMapKey, index) => {
|
|
6075
6128
|
const learnerAnswerState = checkAnswerState(
|
|
6076
6129
|
materialMap[answerMapKey],
|
|
6077
6130
|
displayAnswerMap[answerMapKey]
|
|
6078
6131
|
);
|
|
6079
|
-
return /* @__PURE__ */ (0,
|
|
6080
|
-
/* @__PURE__ */ (0,
|
|
6132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
6133
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6081
6134
|
"div",
|
|
6082
6135
|
{
|
|
6083
6136
|
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"}`,
|
|
6084
|
-
children: /* @__PURE__ */ (0,
|
|
6085
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
6137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
6138
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6086
6139
|
"span",
|
|
6087
6140
|
{
|
|
6088
6141
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6089
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6142
|
+
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
|
|
6090
6143
|
},
|
|
6091
6144
|
index2
|
|
6092
6145
|
)
|
|
6093
6146
|
) }) })
|
|
6094
6147
|
}
|
|
6095
6148
|
) }),
|
|
6096
|
-
/* @__PURE__ */ (0,
|
|
6097
|
-
/* @__PURE__ */ (0,
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
6150
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6098
6151
|
"div",
|
|
6099
6152
|
{
|
|
6100
6153
|
ref: (el) => dropZoneRefs.current[answerMapKey] = el,
|
|
@@ -6103,7 +6156,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
6103
6156
|
onMouseLeave: () => setDropTargetKey(null),
|
|
6104
6157
|
onClick: () => handleDropZoneClick(answerMapKey),
|
|
6105
6158
|
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"}`,
|
|
6106
|
-
children: /* @__PURE__ */ (0,
|
|
6159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6107
6160
|
"div",
|
|
6108
6161
|
{
|
|
6109
6162
|
className: "h-full flex-1 flex flex-row items-center justify-center px-4",
|
|
@@ -6114,16 +6167,16 @@ var MatchingActivityMaterialContent = ({
|
|
|
6114
6167
|
setSelectedValue(null);
|
|
6115
6168
|
}
|
|
6116
6169
|
},
|
|
6117
|
-
children: displayAnswerMap[answerMapKey] ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6170
|
+
children: displayAnswerMap[answerMapKey] ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6118
6171
|
displayAnswerMap[answerMapKey]
|
|
6119
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6172
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6120
6173
|
"span",
|
|
6121
6174
|
{
|
|
6122
6175
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6123
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6176
|
+
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
|
|
6124
6177
|
},
|
|
6125
6178
|
index2
|
|
6126
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6179
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6127
6180
|
ShowMaterialMediaByContentType_default,
|
|
6128
6181
|
{
|
|
6129
6182
|
contentType: contentMap.type,
|
|
@@ -6143,7 +6196,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
6143
6196
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
6144
6197
|
|
|
6145
6198
|
// src/components/activities/MatchingActivityContent.tsx
|
|
6146
|
-
var
|
|
6199
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6147
6200
|
var MatchingActivityContent = ({
|
|
6148
6201
|
answerMap,
|
|
6149
6202
|
data,
|
|
@@ -6161,12 +6214,12 @@ var MatchingActivityContent = ({
|
|
|
6161
6214
|
answerMap2[key] = value;
|
|
6162
6215
|
changeAnswer(answerMap2);
|
|
6163
6216
|
};
|
|
6164
|
-
return /* @__PURE__ */ (0,
|
|
6165
|
-
/* @__PURE__ */ (0,
|
|
6217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
6218
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6166
6219
|
"div",
|
|
6167
6220
|
{
|
|
6168
6221
|
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
6169
|
-
children: /* @__PURE__ */ (0,
|
|
6222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6170
6223
|
ActivityBodyContent_default,
|
|
6171
6224
|
{
|
|
6172
6225
|
bodyMap: matchingBodyMap,
|
|
@@ -6175,13 +6228,13 @@ var MatchingActivityContent = ({
|
|
|
6175
6228
|
)
|
|
6176
6229
|
}
|
|
6177
6230
|
),
|
|
6178
|
-
/* @__PURE__ */ (0,
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DividerLine_default, {}) }),
|
|
6232
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VerticalDividerLine_default, {}) }),
|
|
6233
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6181
6234
|
"div",
|
|
6182
6235
|
{
|
|
6183
6236
|
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
6184
|
-
children: /* @__PURE__ */ (0,
|
|
6237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
6185
6238
|
MatchingActivityMaterialContent_default,
|
|
6186
6239
|
{
|
|
6187
6240
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6201,9 +6254,9 @@ var MatchingActivityContent = ({
|
|
|
6201
6254
|
var MatchingActivityContent_default = MatchingActivityContent;
|
|
6202
6255
|
|
|
6203
6256
|
// src/components/activities/material-contents/MCMAActivityMaterialContent.tsx
|
|
6204
|
-
var
|
|
6257
|
+
var import_react23 = require("react");
|
|
6205
6258
|
var import_react_katex7 = require("react-katex");
|
|
6206
|
-
var
|
|
6259
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6207
6260
|
var MCMAActivityMaterialContent = ({
|
|
6208
6261
|
uniqueValue,
|
|
6209
6262
|
answerMap,
|
|
@@ -6214,8 +6267,8 @@ var MCMAActivityMaterialContent = ({
|
|
|
6214
6267
|
isPreview,
|
|
6215
6268
|
showCorrectAnswer
|
|
6216
6269
|
}) => {
|
|
6217
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
6218
|
-
(0,
|
|
6270
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react23.useState)(answerMap);
|
|
6271
|
+
(0, import_react23.useEffect)(() => {
|
|
6219
6272
|
if (showCorrectAnswer) {
|
|
6220
6273
|
const correctAnswerMap = {};
|
|
6221
6274
|
Object.keys(materialMap).forEach((materialKey) => {
|
|
@@ -6241,11 +6294,11 @@ var MCMAActivityMaterialContent = ({
|
|
|
6241
6294
|
return "INCORRECT";
|
|
6242
6295
|
};
|
|
6243
6296
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
6244
|
-
return /* @__PURE__ */ (0,
|
|
6245
|
-
return /* @__PURE__ */ (0,
|
|
6246
|
-
/* @__PURE__ */ (0,
|
|
6247
|
-
/* @__PURE__ */ (0,
|
|
6248
|
-
/* @__PURE__ */ (0,
|
|
6297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
6298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
6300
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DividerLine_default, {}) }),
|
|
6301
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
6249
6302
|
(materialSubKey, index2) => {
|
|
6250
6303
|
const foundAnswer = displayAnswerMap[materialKey].find(
|
|
6251
6304
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -6258,7 +6311,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
6258
6311
|
const foundIndex = correctAnswerList.findIndex(
|
|
6259
6312
|
(correctAnswer) => correctAnswer === materialSubKey
|
|
6260
6313
|
);
|
|
6261
|
-
return /* @__PURE__ */ (0,
|
|
6314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
6262
6315
|
"div",
|
|
6263
6316
|
{
|
|
6264
6317
|
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" : ""}`,
|
|
@@ -6266,7 +6319,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
6266
6319
|
onChange(answerMap, materialKey, materialSubKey);
|
|
6267
6320
|
},
|
|
6268
6321
|
children: [
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6322
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6270
6323
|
BaseImage_default,
|
|
6271
6324
|
{
|
|
6272
6325
|
src: displayAnswerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6276,16 +6329,16 @@ var MCMAActivityMaterialContent = ({
|
|
|
6276
6329
|
}
|
|
6277
6330
|
}
|
|
6278
6331
|
),
|
|
6279
|
-
/* @__PURE__ */ (0,
|
|
6332
|
+
/* @__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(
|
|
6280
6333
|
materialSubKey
|
|
6281
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
6334
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6282
6335
|
"span",
|
|
6283
6336
|
{
|
|
6284
6337
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6285
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6338
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6286
6339
|
},
|
|
6287
6340
|
index3
|
|
6288
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6341
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6289
6342
|
ShowMaterialMediaByContentType_default,
|
|
6290
6343
|
{
|
|
6291
6344
|
contentType: contentMap.type,
|
|
@@ -6299,13 +6352,13 @@ var MCMAActivityMaterialContent = ({
|
|
|
6299
6352
|
index2
|
|
6300
6353
|
);
|
|
6301
6354
|
}
|
|
6302
|
-
) }) : /* @__PURE__ */ (0,
|
|
6355
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
6303
6356
|
displayAnswerMap[materialKey]
|
|
6304
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6357
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6305
6358
|
"span",
|
|
6306
6359
|
{
|
|
6307
6360
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6308
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6361
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6309
6362
|
},
|
|
6310
6363
|
index2
|
|
6311
6364
|
)) }, materialKey) })
|
|
@@ -6315,7 +6368,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
6315
6368
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
6316
6369
|
|
|
6317
6370
|
// src/components/activities/MCMAActivityContent.tsx
|
|
6318
|
-
var
|
|
6371
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6319
6372
|
var MCMAActivityContent = ({
|
|
6320
6373
|
answerMap,
|
|
6321
6374
|
data,
|
|
@@ -6340,11 +6393,11 @@ var MCMAActivityContent = ({
|
|
|
6340
6393
|
}
|
|
6341
6394
|
changeAnswer(answerMap2);
|
|
6342
6395
|
};
|
|
6343
|
-
return /* @__PURE__ */ (0,
|
|
6344
|
-
/* @__PURE__ */ (0,
|
|
6345
|
-
/* @__PURE__ */ (0,
|
|
6346
|
-
/* @__PURE__ */ (0,
|
|
6347
|
-
/* @__PURE__ */ (0,
|
|
6396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
6397
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ActivityBodyContent_default, { bodyMap: MCMABodyMap, templateType: "MCMA" }) }),
|
|
6398
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DividerLine_default, {}) }),
|
|
6399
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VerticalDividerLine_default, {}) }),
|
|
6400
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6348
6401
|
MCMAActivityMaterialContent_default,
|
|
6349
6402
|
{
|
|
6350
6403
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6362,9 +6415,9 @@ var MCMAActivityContent = ({
|
|
|
6362
6415
|
var MCMAActivityContent_default = MCMAActivityContent;
|
|
6363
6416
|
|
|
6364
6417
|
// src/components/activities/material-contents/MCSAActivityMaterialContent.tsx
|
|
6365
|
-
var
|
|
6418
|
+
var import_react24 = require("react");
|
|
6366
6419
|
var import_react_katex8 = require("react-katex");
|
|
6367
|
-
var
|
|
6420
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6368
6421
|
var MCSAActivityMaterialContent = ({
|
|
6369
6422
|
uniqueValue,
|
|
6370
6423
|
answerMap,
|
|
@@ -6375,8 +6428,8 @@ var MCSAActivityMaterialContent = ({
|
|
|
6375
6428
|
isPreview,
|
|
6376
6429
|
showCorrectAnswer
|
|
6377
6430
|
}) => {
|
|
6378
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
6379
|
-
(0,
|
|
6431
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react24.useState)(answerMap);
|
|
6432
|
+
(0, import_react24.useEffect)(() => {
|
|
6380
6433
|
if (showCorrectAnswer) {
|
|
6381
6434
|
const correctAnswer2 = retrieveCorrectAnswer();
|
|
6382
6435
|
setDisplayAnswerMap({ correctAnswer: correctAnswer2 });
|
|
@@ -6396,11 +6449,11 @@ var MCSAActivityMaterialContent = ({
|
|
|
6396
6449
|
return "INCORRECT";
|
|
6397
6450
|
};
|
|
6398
6451
|
const correctAnswer = retrieveCorrectAnswer();
|
|
6399
|
-
return /* @__PURE__ */ (0,
|
|
6400
|
-
return /* @__PURE__ */ (0,
|
|
6401
|
-
/* @__PURE__ */ (0,
|
|
6402
|
-
/* @__PURE__ */ (0,
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col h-full", children: Object.keys(materialMap).map((materialKey, index) => {
|
|
6453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-1 flex flex-col border-catchup-lighter-gray rounded-catchup-xlarge px-5 md:px-0 min-h-0", children: [
|
|
6454
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
6455
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DividerLine_default, {}) }),
|
|
6456
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6404
6457
|
"div",
|
|
6405
6458
|
{
|
|
6406
6459
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -6411,7 +6464,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6411
6464
|
materialSubKey,
|
|
6412
6465
|
displayAnswerMap[materialKey]
|
|
6413
6466
|
);
|
|
6414
|
-
return /* @__PURE__ */ (0,
|
|
6467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6415
6468
|
"div",
|
|
6416
6469
|
{
|
|
6417
6470
|
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" : ""}`,
|
|
@@ -6419,7 +6472,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6419
6472
|
onChange(answerMap, materialKey, materialSubKey);
|
|
6420
6473
|
},
|
|
6421
6474
|
children: [
|
|
6422
|
-
/* @__PURE__ */ (0,
|
|
6475
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6423
6476
|
BaseImage_default,
|
|
6424
6477
|
{
|
|
6425
6478
|
src: displayAnswerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -6429,16 +6482,16 @@ var MCSAActivityMaterialContent = ({
|
|
|
6429
6482
|
}
|
|
6430
6483
|
}
|
|
6431
6484
|
),
|
|
6432
|
-
/* @__PURE__ */ (0,
|
|
6485
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6433
6486
|
materialSubKey
|
|
6434
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
6487
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6435
6488
|
"span",
|
|
6436
6489
|
{
|
|
6437
6490
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6438
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6491
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6439
6492
|
},
|
|
6440
6493
|
index3
|
|
6441
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6494
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6442
6495
|
ShowMaterialMediaByContentType_default,
|
|
6443
6496
|
{
|
|
6444
6497
|
contentType: contentMap.type,
|
|
@@ -6454,13 +6507,13 @@ var MCSAActivityMaterialContent = ({
|
|
|
6454
6507
|
}
|
|
6455
6508
|
)
|
|
6456
6509
|
}
|
|
6457
|
-
) : /* @__PURE__ */ (0,
|
|
6510
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6458
6511
|
displayAnswerMap[materialKey]
|
|
6459
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6512
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6460
6513
|
"span",
|
|
6461
6514
|
{
|
|
6462
6515
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6463
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6516
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6464
6517
|
},
|
|
6465
6518
|
index2
|
|
6466
6519
|
)) }) })
|
|
@@ -6470,7 +6523,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
6470
6523
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
6471
6524
|
|
|
6472
6525
|
// src/components/activities/MCSAActivityContent.tsx
|
|
6473
|
-
var
|
|
6526
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6474
6527
|
var MCSAActivityContent = ({
|
|
6475
6528
|
answerMap,
|
|
6476
6529
|
data,
|
|
@@ -6488,11 +6541,11 @@ var MCSAActivityContent = ({
|
|
|
6488
6541
|
answerMap2[key] = value;
|
|
6489
6542
|
changeAnswer(answerMap2);
|
|
6490
6543
|
};
|
|
6491
|
-
return /* @__PURE__ */ (0,
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6493
|
-
/* @__PURE__ */ (0,
|
|
6494
|
-
/* @__PURE__ */ (0,
|
|
6495
|
-
/* @__PURE__ */ (0,
|
|
6544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
6545
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ActivityBodyContent_default, { bodyMap: MCSABodyMap, templateType: "MCSA" }) }),
|
|
6546
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DividerLine_default, {}) }),
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VerticalDividerLine_default, {}) }),
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6496
6549
|
MCSAActivityMaterialContent_default,
|
|
6497
6550
|
{
|
|
6498
6551
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6599,7 +6652,7 @@ var retrieveAcceptedFormats = (fileType) => {
|
|
|
6599
6652
|
};
|
|
6600
6653
|
|
|
6601
6654
|
// src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx
|
|
6602
|
-
var
|
|
6655
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6603
6656
|
var OpenEndedActivityMaterialContent = ({
|
|
6604
6657
|
answerMap,
|
|
6605
6658
|
contentMap,
|
|
@@ -6614,7 +6667,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6614
6667
|
fileType = retrieveFileTypeFromExtension(extension);
|
|
6615
6668
|
}
|
|
6616
6669
|
if (fileType === "IMAGE") {
|
|
6617
|
-
return /* @__PURE__ */ (0,
|
|
6670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6618
6671
|
BaseImage_default,
|
|
6619
6672
|
{
|
|
6620
6673
|
src: answerMapAnswer,
|
|
@@ -6624,9 +6677,9 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6624
6677
|
}
|
|
6625
6678
|
) });
|
|
6626
6679
|
} else if (fileType === "PDF") {
|
|
6627
|
-
return /* @__PURE__ */ (0,
|
|
6680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BasePDF_default, { file: answerMapAnswer });
|
|
6628
6681
|
} else if (fileType === "AUDIO") {
|
|
6629
|
-
return /* @__PURE__ */ (0,
|
|
6682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-[56px]", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6630
6683
|
"audio",
|
|
6631
6684
|
{
|
|
6632
6685
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6637,7 +6690,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6637
6690
|
}
|
|
6638
6691
|
) });
|
|
6639
6692
|
} else if (fileType === "TEXT") {
|
|
6640
|
-
return /* @__PURE__ */ (0,
|
|
6693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6641
6694
|
InputGroup_default,
|
|
6642
6695
|
{
|
|
6643
6696
|
type: "textarea",
|
|
@@ -6656,7 +6709,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6656
6709
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6657
6710
|
const extension = answerMapAnswer.split(".").pop();
|
|
6658
6711
|
const fileType = retrieveFileTypeFromExtension(extension);
|
|
6659
|
-
return /* @__PURE__ */ (0,
|
|
6712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: fileType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6660
6713
|
BaseImage_default,
|
|
6661
6714
|
{
|
|
6662
6715
|
src: answerMapAnswer,
|
|
@@ -6664,11 +6717,11 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6664
6717
|
size: "custom",
|
|
6665
6718
|
className: "w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
6666
6719
|
}
|
|
6667
|
-
) }) : fileType === "PDF" ? /* @__PURE__ */ (0,
|
|
6720
|
+
) }) : fileType === "PDF" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(BasePDF_default, { file: answerMapAnswer }) }) : null });
|
|
6668
6721
|
};
|
|
6669
6722
|
const RenderAudioContent = (answerMap2) => {
|
|
6670
6723
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
6671
|
-
return /* @__PURE__ */ (0,
|
|
6724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-[56px]", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6672
6725
|
"audio",
|
|
6673
6726
|
{
|
|
6674
6727
|
className: "h-full w-full rounded-catchup-xlarge",
|
|
@@ -6679,16 +6732,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6679
6732
|
}
|
|
6680
6733
|
) });
|
|
6681
6734
|
};
|
|
6682
|
-
return /* @__PURE__ */ (0,
|
|
6683
|
-
/* @__PURE__ */ (0,
|
|
6684
|
-
/* @__PURE__ */ (0,
|
|
6685
|
-
/* @__PURE__ */ (0,
|
|
6735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
6736
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6737
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DividerLine_default, {}) }),
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: contentMap.type === "TEXT" ? RenderTextContent(answerMap) : contentMap.type === "IMAGE" ? RenderImageContent(answerMap) : contentMap.type === "AUDIO" ? RenderAudioContent(answerMap) : null })
|
|
6686
6739
|
] });
|
|
6687
6740
|
};
|
|
6688
6741
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
6689
6742
|
|
|
6690
6743
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
6691
|
-
var
|
|
6744
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6692
6745
|
var OpenEndedActivityContent = ({
|
|
6693
6746
|
answerMap,
|
|
6694
6747
|
data,
|
|
@@ -6705,12 +6758,12 @@ var OpenEndedActivityContent = ({
|
|
|
6705
6758
|
answerMap2["ANSWER"] = value;
|
|
6706
6759
|
changeAnswer(answerMap2);
|
|
6707
6760
|
};
|
|
6708
|
-
return /* @__PURE__ */ (0,
|
|
6709
|
-
/* @__PURE__ */ (0,
|
|
6761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
6762
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6710
6763
|
"div",
|
|
6711
6764
|
{
|
|
6712
6765
|
className: `${showMaterialContent ? isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto" : "w-full"}`,
|
|
6713
|
-
children: /* @__PURE__ */ (0,
|
|
6766
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6714
6767
|
ActivityBodyContent_default,
|
|
6715
6768
|
{
|
|
6716
6769
|
bodyMap: openEndedBodyMap,
|
|
@@ -6719,16 +6772,16 @@ var OpenEndedActivityContent = ({
|
|
|
6719
6772
|
)
|
|
6720
6773
|
}
|
|
6721
6774
|
),
|
|
6722
|
-
showMaterialContent ? /* @__PURE__ */ (0,
|
|
6723
|
-
/* @__PURE__ */ (0,
|
|
6775
|
+
showMaterialContent ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
6776
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6724
6777
|
"div",
|
|
6725
6778
|
{
|
|
6726
6779
|
className: `${isFullScreen ? "contents" : "contents md:hidden"}`,
|
|
6727
|
-
children: /* @__PURE__ */ (0,
|
|
6780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {})
|
|
6728
6781
|
}
|
|
6729
6782
|
),
|
|
6730
|
-
/* @__PURE__ */ (0,
|
|
6731
|
-
/* @__PURE__ */ (0,
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(VerticalDividerLine_default, {}) }),
|
|
6784
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6732
6785
|
OpenEndedActivityMaterialContent_default,
|
|
6733
6786
|
{
|
|
6734
6787
|
answerMap,
|
|
@@ -6743,9 +6796,9 @@ var OpenEndedActivityContent = ({
|
|
|
6743
6796
|
var OpenEndedActivityContent_default = OpenEndedActivityContent;
|
|
6744
6797
|
|
|
6745
6798
|
// src/components/activities/material-contents/OrderingActivityMaterialContent.tsx
|
|
6746
|
-
var
|
|
6799
|
+
var import_react25 = require("react");
|
|
6747
6800
|
var import_react_katex9 = require("react-katex");
|
|
6748
|
-
var
|
|
6801
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6749
6802
|
var OrderingActivityMaterialContent = ({
|
|
6750
6803
|
uniqueValue,
|
|
6751
6804
|
answerMap,
|
|
@@ -6756,23 +6809,23 @@ var OrderingActivityMaterialContent = ({
|
|
|
6756
6809
|
isPreview,
|
|
6757
6810
|
showCorrectAnswer
|
|
6758
6811
|
}) => {
|
|
6759
|
-
const [selectedKey, setSelectedKey] = (0,
|
|
6760
|
-
const [draggedKey, setDraggedKey] = (0,
|
|
6761
|
-
const [dropTargetKey, setDropTargetKey] = (0,
|
|
6762
|
-
const [draggedElement, setDraggedElement] = (0,
|
|
6812
|
+
const [selectedKey, setSelectedKey] = (0, import_react25.useState)(null);
|
|
6813
|
+
const [draggedKey, setDraggedKey] = (0, import_react25.useState)(null);
|
|
6814
|
+
const [dropTargetKey, setDropTargetKey] = (0, import_react25.useState)(null);
|
|
6815
|
+
const [draggedElement, setDraggedElement] = (0, import_react25.useState)(
|
|
6763
6816
|
null
|
|
6764
6817
|
);
|
|
6765
|
-
const dragElementRef = (0,
|
|
6766
|
-
const [mousePosition, setMousePosition] = (0,
|
|
6818
|
+
const dragElementRef = (0, import_react25.useRef)(null);
|
|
6819
|
+
const [mousePosition, setMousePosition] = (0, import_react25.useState)({
|
|
6767
6820
|
x: 0,
|
|
6768
6821
|
y: 0
|
|
6769
6822
|
});
|
|
6770
|
-
const [touchPosition, setTouchPosition] = (0,
|
|
6823
|
+
const [touchPosition, setTouchPosition] = (0, import_react25.useState)({
|
|
6771
6824
|
x: 0,
|
|
6772
6825
|
y: 0
|
|
6773
6826
|
});
|
|
6774
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
6775
|
-
(0,
|
|
6827
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react25.useState)(answerMap);
|
|
6828
|
+
(0, import_react25.useEffect)(() => {
|
|
6776
6829
|
if (showCorrectAnswer) {
|
|
6777
6830
|
const correctAnswerMap = {};
|
|
6778
6831
|
Object.keys(answerMap).forEach((answerKey, index) => {
|
|
@@ -6863,14 +6916,14 @@ var OrderingActivityMaterialContent = ({
|
|
|
6863
6916
|
}
|
|
6864
6917
|
setDraggedKey(null);
|
|
6865
6918
|
};
|
|
6866
|
-
return /* @__PURE__ */ (0,
|
|
6919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6867
6920
|
"div",
|
|
6868
6921
|
{
|
|
6869
6922
|
className: "flex flex-col h-full",
|
|
6870
6923
|
onMouseMove: handleMouseMove,
|
|
6871
6924
|
onMouseUp: handleMouseUp,
|
|
6872
6925
|
children: [
|
|
6873
|
-
draggedKey && mousePosition.x > 0 && /* @__PURE__ */ (0,
|
|
6926
|
+
draggedKey && mousePosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6874
6927
|
"div",
|
|
6875
6928
|
{
|
|
6876
6929
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -6879,16 +6932,16 @@ var OrderingActivityMaterialContent = ({
|
|
|
6879
6932
|
top: `${mousePosition.y}px`,
|
|
6880
6933
|
transform: "translate(-50%, -50%)"
|
|
6881
6934
|
},
|
|
6882
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6935
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6883
6936
|
materialMap[displayAnswerMap[draggedKey]]
|
|
6884
|
-
).map((inputPart, index) => /* @__PURE__ */ (0,
|
|
6937
|
+
).map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6885
6938
|
"span",
|
|
6886
6939
|
{
|
|
6887
6940
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6888
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6941
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6889
6942
|
},
|
|
6890
6943
|
index
|
|
6891
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
6944
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6892
6945
|
ShowMaterialMediaByContentType_default,
|
|
6893
6946
|
{
|
|
6894
6947
|
contentType: contentMap.type,
|
|
@@ -6899,7 +6952,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6899
6952
|
) })
|
|
6900
6953
|
}
|
|
6901
6954
|
),
|
|
6902
|
-
draggedKey && touchPosition.x > 0 && /* @__PURE__ */ (0,
|
|
6955
|
+
draggedKey && touchPosition.x > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6903
6956
|
"div",
|
|
6904
6957
|
{
|
|
6905
6958
|
className: "fixed pointer-events-none z-50 opacity-80",
|
|
@@ -6908,16 +6961,16 @@ var OrderingActivityMaterialContent = ({
|
|
|
6908
6961
|
top: `${touchPosition.y}px`,
|
|
6909
6962
|
transform: "translate(-50%, -50%)"
|
|
6910
6963
|
},
|
|
6911
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6964
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "border-catchup-blue border-2 px-3 py-2 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6912
6965
|
materialMap[displayAnswerMap[draggedKey]]
|
|
6913
|
-
).map((inputPart, index) => /* @__PURE__ */ (0,
|
|
6966
|
+
).map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6914
6967
|
"span",
|
|
6915
6968
|
{
|
|
6916
6969
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6917
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6970
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6918
6971
|
},
|
|
6919
6972
|
index
|
|
6920
|
-
)) }) }) : /* @__PURE__ */ (0,
|
|
6973
|
+
)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge bg-catchup-white shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6921
6974
|
ShowMaterialMediaByContentType_default,
|
|
6922
6975
|
{
|
|
6923
6976
|
contentType: contentMap.type,
|
|
@@ -6928,24 +6981,24 @@ var OrderingActivityMaterialContent = ({
|
|
|
6928
6981
|
) })
|
|
6929
6982
|
}
|
|
6930
6983
|
),
|
|
6931
|
-
/* @__PURE__ */ (0,
|
|
6984
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: Object.keys(displayAnswerMap).map((materialKey, index) => {
|
|
6932
6985
|
const learnerAnswerState = checkAnswerState(
|
|
6933
6986
|
displayAnswerMap[materialKey] + "",
|
|
6934
6987
|
index + ""
|
|
6935
6988
|
);
|
|
6936
|
-
return /* @__PURE__ */ (0,
|
|
6989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6937
6990
|
"div",
|
|
6938
6991
|
{
|
|
6939
6992
|
className: `flex flex-row items-center my-4 mx-2`,
|
|
6940
6993
|
children: [
|
|
6941
|
-
/* @__PURE__ */ (0,
|
|
6994
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.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_runtime42.jsx)(
|
|
6942
6995
|
"div",
|
|
6943
6996
|
{
|
|
6944
6997
|
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]`,
|
|
6945
|
-
children: /* @__PURE__ */ (0,
|
|
6998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "", children: parseFloat(materialKey) + 1 })
|
|
6946
6999
|
}
|
|
6947
7000
|
) }) }),
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
7001
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6949
7002
|
"div",
|
|
6950
7003
|
{
|
|
6951
7004
|
ref: draggedKey === materialKey ? dragElementRef : null,
|
|
@@ -6958,21 +7011,21 @@ var OrderingActivityMaterialContent = ({
|
|
|
6958
7011
|
onTouchStart: (e) => handleTouchStart(e, materialKey, e.currentTarget),
|
|
6959
7012
|
onTouchMove: handleTouchMove,
|
|
6960
7013
|
onTouchEnd: handleTouchEnd,
|
|
6961
|
-
children: /* @__PURE__ */ (0,
|
|
7014
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6962
7015
|
"div",
|
|
6963
7016
|
{
|
|
6964
7017
|
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"}`,
|
|
6965
7018
|
onClick: () => handleSelectItem(materialKey),
|
|
6966
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
7019
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6967
7020
|
materialMap[displayAnswerMap[materialKey]]
|
|
6968
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
7021
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6969
7022
|
"span",
|
|
6970
7023
|
{
|
|
6971
7024
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6972
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7025
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6973
7026
|
},
|
|
6974
7027
|
index2
|
|
6975
|
-
)) }) : /* @__PURE__ */ (0,
|
|
7028
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6976
7029
|
ShowMaterialMediaByContentType_default,
|
|
6977
7030
|
{
|
|
6978
7031
|
contentType: contentMap.type,
|
|
@@ -6996,7 +7049,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6996
7049
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6997
7050
|
|
|
6998
7051
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6999
|
-
var
|
|
7052
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7000
7053
|
var OrderingActivityContent = ({
|
|
7001
7054
|
answerMap,
|
|
7002
7055
|
data,
|
|
@@ -7016,12 +7069,12 @@ var OrderingActivityContent = ({
|
|
|
7016
7069
|
answerMap2[secondaryKey] = prevValue;
|
|
7017
7070
|
changeAnswer(answerMap2);
|
|
7018
7071
|
};
|
|
7019
|
-
return /* @__PURE__ */ (0,
|
|
7020
|
-
/* @__PURE__ */ (0,
|
|
7072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
7073
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7021
7074
|
"div",
|
|
7022
7075
|
{
|
|
7023
7076
|
className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`,
|
|
7024
|
-
children: /* @__PURE__ */ (0,
|
|
7077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7025
7078
|
ActivityBodyContent_default,
|
|
7026
7079
|
{
|
|
7027
7080
|
bodyMap: orderingBodyMap,
|
|
@@ -7030,13 +7083,13 @@ var OrderingActivityContent = ({
|
|
|
7030
7083
|
)
|
|
7031
7084
|
}
|
|
7032
7085
|
),
|
|
7033
|
-
/* @__PURE__ */ (0,
|
|
7034
|
-
/* @__PURE__ */ (0,
|
|
7035
|
-
/* @__PURE__ */ (0,
|
|
7086
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DividerLine_default, {}) }),
|
|
7087
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VerticalDividerLine_default, {}) }),
|
|
7088
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7036
7089
|
"div",
|
|
7037
7090
|
{
|
|
7038
7091
|
className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`,
|
|
7039
|
-
children: /* @__PURE__ */ (0,
|
|
7092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7040
7093
|
OrderingActivityMaterialContent_default,
|
|
7041
7094
|
{
|
|
7042
7095
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -7056,9 +7109,9 @@ var OrderingActivityContent = ({
|
|
|
7056
7109
|
var OrderingActivityContent_default = OrderingActivityContent;
|
|
7057
7110
|
|
|
7058
7111
|
// src/components/activities/material-contents/TrueFalseActivityMaterialContent.tsx
|
|
7059
|
-
var
|
|
7112
|
+
var import_react26 = require("react");
|
|
7060
7113
|
var import_react_katex10 = require("react-katex");
|
|
7061
|
-
var
|
|
7114
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7062
7115
|
var TrueFalseActivityMaterialContent = ({
|
|
7063
7116
|
uniqueValue,
|
|
7064
7117
|
answerMap,
|
|
@@ -7069,9 +7122,9 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7069
7122
|
isPreview,
|
|
7070
7123
|
showCorrectAnswer
|
|
7071
7124
|
}) => {
|
|
7072
|
-
const [shuffleOptionList, setShuffleOptionList] = (0,
|
|
7073
|
-
const [displayAnswerMap, setDisplayAnswerMap] = (0,
|
|
7074
|
-
(0,
|
|
7125
|
+
const [shuffleOptionList, setShuffleOptionList] = (0, import_react26.useState)([]);
|
|
7126
|
+
const [displayAnswerMap, setDisplayAnswerMap] = (0, import_react26.useState)(answerMap);
|
|
7127
|
+
(0, import_react26.useEffect)(() => {
|
|
7075
7128
|
const optionList = [];
|
|
7076
7129
|
optionList.push(...materialMap.trueList);
|
|
7077
7130
|
optionList.push(...materialMap.falseList);
|
|
@@ -7081,7 +7134,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7081
7134
|
setShuffleOptionList(shuffleArray(optionList));
|
|
7082
7135
|
}
|
|
7083
7136
|
}, []);
|
|
7084
|
-
(0,
|
|
7137
|
+
(0, import_react26.useEffect)(() => {
|
|
7085
7138
|
if (showCorrectAnswer) {
|
|
7086
7139
|
setDisplayAnswerMap(materialMap);
|
|
7087
7140
|
} else {
|
|
@@ -7095,14 +7148,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7095
7148
|
}
|
|
7096
7149
|
return "INCORRECT";
|
|
7097
7150
|
};
|
|
7098
|
-
return /* @__PURE__ */ (0,
|
|
7099
|
-
/* @__PURE__ */ (0,
|
|
7100
|
-
/* @__PURE__ */ (0,
|
|
7101
|
-
/* @__PURE__ */ (0,
|
|
7102
|
-
/* @__PURE__ */ (0,
|
|
7103
|
-
/* @__PURE__ */ (0,
|
|
7151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
7152
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
7153
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DividerLine_default, {}) }),
|
|
7154
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-row justify-end items-center gap-x-2 flex-shrink-0", children: [
|
|
7155
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
7156
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
7104
7157
|
] }),
|
|
7105
|
-
/* @__PURE__ */ (0,
|
|
7158
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
7106
7159
|
const correctAnswer = materialMap.trueList.find(
|
|
7107
7160
|
(trueItem) => trueItem === shuffleOption
|
|
7108
7161
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -7113,21 +7166,21 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7113
7166
|
correctAnswer,
|
|
7114
7167
|
learnerAnswer
|
|
7115
7168
|
);
|
|
7116
|
-
return /* @__PURE__ */ (0,
|
|
7169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7117
7170
|
"div",
|
|
7118
7171
|
{
|
|
7119
7172
|
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" : ""}`,
|
|
7120
7173
|
children: [
|
|
7121
|
-
/* @__PURE__ */ (0,
|
|
7174
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xl p-2 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
7122
7175
|
shuffleOption
|
|
7123
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
7176
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7124
7177
|
"span",
|
|
7125
7178
|
{
|
|
7126
7179
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7127
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7180
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_katex10.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7128
7181
|
},
|
|
7129
7182
|
index2
|
|
7130
|
-
)) }) : /* @__PURE__ */ (0,
|
|
7183
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7131
7184
|
ShowMaterialMediaByContentType_default,
|
|
7132
7185
|
{
|
|
7133
7186
|
contentType: contentMap.type,
|
|
@@ -7136,8 +7189,8 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7136
7189
|
},
|
|
7137
7190
|
`${uniqueValue}-${index}`
|
|
7138
7191
|
) }),
|
|
7139
|
-
/* @__PURE__ */ (0,
|
|
7140
|
-
/* @__PURE__ */ (0,
|
|
7192
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7193
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7141
7194
|
BaseImage_default,
|
|
7142
7195
|
{
|
|
7143
7196
|
src: displayAnswerMap.trueList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -7148,7 +7201,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7148
7201
|
}
|
|
7149
7202
|
}
|
|
7150
7203
|
) }) }),
|
|
7151
|
-
/* @__PURE__ */ (0,
|
|
7204
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7152
7205
|
BaseImage_default,
|
|
7153
7206
|
{
|
|
7154
7207
|
src: displayAnswerMap.falseList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -7164,14 +7217,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7164
7217
|
},
|
|
7165
7218
|
index
|
|
7166
7219
|
);
|
|
7167
|
-
}) }) : /* @__PURE__ */ (0,
|
|
7168
|
-
displayAnswerMap.trueList.map((item) => /* @__PURE__ */ (0,
|
|
7169
|
-
/* @__PURE__ */ (0,
|
|
7170
|
-
/* @__PURE__ */ (0,
|
|
7220
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
7221
|
+
displayAnswerMap.trueList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7222
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { children: item }) }),
|
|
7223
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
7171
7224
|
] })),
|
|
7172
|
-
displayAnswerMap.falseList.map((item) => /* @__PURE__ */ (0,
|
|
7173
|
-
/* @__PURE__ */ (0,
|
|
7174
|
-
/* @__PURE__ */ (0,
|
|
7225
|
+
displayAnswerMap.falseList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7226
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { children: item }) }),
|
|
7227
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
7175
7228
|
] }))
|
|
7176
7229
|
] }) })
|
|
7177
7230
|
] });
|
|
@@ -7179,7 +7232,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
7179
7232
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
7180
7233
|
|
|
7181
7234
|
// src/components/activities/TrueFalseActivityContent.tsx
|
|
7182
|
-
var
|
|
7235
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7183
7236
|
var TrueFalseActivityContent = ({
|
|
7184
7237
|
answerMap,
|
|
7185
7238
|
data,
|
|
@@ -7223,17 +7276,17 @@ var TrueFalseActivityContent = ({
|
|
|
7223
7276
|
}
|
|
7224
7277
|
changeAnswer(answerMap2);
|
|
7225
7278
|
};
|
|
7226
|
-
return /* @__PURE__ */ (0,
|
|
7227
|
-
/* @__PURE__ */ (0,
|
|
7279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
7280
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7228
7281
|
ActivityBodyContent_default,
|
|
7229
7282
|
{
|
|
7230
7283
|
bodyMap: trueFalseBodyMap,
|
|
7231
7284
|
templateType: "GROUPING"
|
|
7232
7285
|
}
|
|
7233
7286
|
) }),
|
|
7234
|
-
/* @__PURE__ */ (0,
|
|
7235
|
-
/* @__PURE__ */ (0,
|
|
7236
|
-
/* @__PURE__ */ (0,
|
|
7287
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DividerLine_default, {}) }),
|
|
7288
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(VerticalDividerLine_default, {}) }),
|
|
7289
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7237
7290
|
TrueFalseActivityMaterialContent_default,
|
|
7238
7291
|
{
|
|
7239
7292
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -7252,7 +7305,7 @@ var TrueFalseActivityContent_default = TrueFalseActivityContent;
|
|
|
7252
7305
|
|
|
7253
7306
|
// src/components/activities/solution-contents/ActivitySolutionContent.tsx
|
|
7254
7307
|
var import_react_katex11 = require("react-katex");
|
|
7255
|
-
var
|
|
7308
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7256
7309
|
var ActivitySolutionContent = ({
|
|
7257
7310
|
activityTemplateType,
|
|
7258
7311
|
data
|
|
@@ -7284,8 +7337,8 @@ var ActivitySolutionContent = ({
|
|
|
7284
7337
|
return null;
|
|
7285
7338
|
}
|
|
7286
7339
|
if (!solutionMap || Object.keys(solutionMap).length === 0) return null;
|
|
7287
|
-
return /* @__PURE__ */ (0,
|
|
7288
|
-
/* @__PURE__ */ (0,
|
|
7340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "p-4 border-catchup-blue border-2 rounded-catchup-xlarge", children: [
|
|
7341
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("solution") }),
|
|
7289
7342
|
Object.keys(solutionMap).map((key) => {
|
|
7290
7343
|
let currentItem;
|
|
7291
7344
|
try {
|
|
@@ -7295,12 +7348,12 @@ var ActivitySolutionContent = ({
|
|
|
7295
7348
|
return null;
|
|
7296
7349
|
}
|
|
7297
7350
|
const { value } = currentItem;
|
|
7298
|
-
return /* @__PURE__ */ (0,
|
|
7299
|
-
(inputPart, partIndex) => /* @__PURE__ */ (0,
|
|
7351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
7352
|
+
(inputPart, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7300
7353
|
"span",
|
|
7301
7354
|
{
|
|
7302
7355
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7303
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7356
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_katex11.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7304
7357
|
},
|
|
7305
7358
|
`${key}_part_${partIndex}`
|
|
7306
7359
|
)
|
|
@@ -7312,7 +7365,7 @@ var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
|
7312
7365
|
|
|
7313
7366
|
// src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
|
|
7314
7367
|
var import_react_katex12 = require("react-katex");
|
|
7315
|
-
var
|
|
7368
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7316
7369
|
var ActivityEvaluationRubricContent = ({
|
|
7317
7370
|
activityTemplateType,
|
|
7318
7371
|
data
|
|
@@ -7342,8 +7395,8 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7342
7395
|
}
|
|
7343
7396
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
7344
7397
|
return null;
|
|
7345
|
-
return /* @__PURE__ */ (0,
|
|
7346
|
-
/* @__PURE__ */ (0,
|
|
7398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
7347
7400
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
7348
7401
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
7349
7402
|
const { value } = currentItem;
|
|
@@ -7354,18 +7407,18 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7354
7407
|
points = parseFloat(matchedRegex[1]);
|
|
7355
7408
|
evaluationRubric = matchedRegex[2];
|
|
7356
7409
|
}
|
|
7357
|
-
return /* @__PURE__ */ (0,
|
|
7358
|
-
/* @__PURE__ */ (0,
|
|
7410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "my-2 flex flex-row gap-x-3", children: [
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "font-bold text-xl whitespace-nowrap", children: [
|
|
7359
7412
|
points,
|
|
7360
7413
|
" ",
|
|
7361
7414
|
i18n_default.t("points")
|
|
7362
7415
|
] }),
|
|
7363
|
-
/* @__PURE__ */ (0,
|
|
7364
|
-
(inputPart, inputIndex) => /* @__PURE__ */ (0,
|
|
7416
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "flex-1 text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
7417
|
+
(inputPart, inputIndex) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7365
7418
|
"span",
|
|
7366
7419
|
{
|
|
7367
7420
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7368
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7421
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7369
7422
|
},
|
|
7370
7423
|
inputIndex
|
|
7371
7424
|
)
|
|
@@ -7377,31 +7430,31 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7377
7430
|
var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
7378
7431
|
|
|
7379
7432
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
7380
|
-
var
|
|
7433
|
+
var import_react27 = require("react");
|
|
7381
7434
|
|
|
7382
7435
|
// src/components/boxes/SelectionBox.tsx
|
|
7383
|
-
var
|
|
7436
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7384
7437
|
var SelectionBox = ({
|
|
7385
7438
|
optionList,
|
|
7386
7439
|
selectedId,
|
|
7387
7440
|
handleSelectOnClick
|
|
7388
7441
|
}) => {
|
|
7389
|
-
return /* @__PURE__ */ (0,
|
|
7442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsx)(
|
|
7390
7443
|
"div",
|
|
7391
7444
|
{
|
|
7392
7445
|
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`,
|
|
7393
7446
|
onClick: () => {
|
|
7394
7447
|
handleSelectOnClick(option.id);
|
|
7395
7448
|
},
|
|
7396
|
-
children: /* @__PURE__ */ (0,
|
|
7449
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
7397
7450
|
"div",
|
|
7398
7451
|
{
|
|
7399
7452
|
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
7400
7453
|
children: [
|
|
7401
7454
|
option.icon,
|
|
7402
|
-
/* @__PURE__ */ (0,
|
|
7403
|
-
/* @__PURE__ */ (0,
|
|
7404
|
-
option.subText ? /* @__PURE__ */ (0,
|
|
7455
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
7456
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { children: option.text }),
|
|
7457
|
+
option.subText ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "text-md", children: [
|
|
7405
7458
|
"(",
|
|
7406
7459
|
option.subText,
|
|
7407
7460
|
")"
|
|
@@ -7417,7 +7470,7 @@ var SelectionBox = ({
|
|
|
7417
7470
|
var SelectionBox_default = SelectionBox;
|
|
7418
7471
|
|
|
7419
7472
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
7420
|
-
var
|
|
7473
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7421
7474
|
var ACTIVITY_TEMPLATE_LIST = [
|
|
7422
7475
|
{ type: "ORDERING", materialMap: "orderingMaterialMap" },
|
|
7423
7476
|
{ type: "DROPDOWN", materialMap: "dropdownMaterialMap" },
|
|
@@ -7448,11 +7501,11 @@ var ActivityPreviewByData = ({
|
|
|
7448
7501
|
showMaterialContent = true,
|
|
7449
7502
|
isPreview = true
|
|
7450
7503
|
}) => {
|
|
7451
|
-
const [selectedType, setSelectedType] = (0,
|
|
7452
|
-
const [optionList, setOptionList] = (0,
|
|
7453
|
-
const [answerMapMap, setAnswerMapMap] = (0,
|
|
7454
|
-
const [activityTemplateTypeList, setActivityTemplateTypeList] = (0,
|
|
7455
|
-
(0,
|
|
7504
|
+
const [selectedType, setSelectedType] = (0, import_react27.useState)(null);
|
|
7505
|
+
const [optionList, setOptionList] = (0, import_react27.useState)([]);
|
|
7506
|
+
const [answerMapMap, setAnswerMapMap] = (0, import_react27.useState)({});
|
|
7507
|
+
const [activityTemplateTypeList, setActivityTemplateTypeList] = (0, import_react27.useState)([]);
|
|
7508
|
+
(0, import_react27.useEffect)(() => {
|
|
7456
7509
|
if (!data) return;
|
|
7457
7510
|
let currentActivityTemplateMapList = JSON.parse(
|
|
7458
7511
|
JSON.stringify(ACTIVITY_TEMPLATE_LIST)
|
|
@@ -7470,7 +7523,7 @@ var ActivityPreviewByData = ({
|
|
|
7470
7523
|
}
|
|
7471
7524
|
setActivityTemplateTypeList(currentActivityTemplateMapList);
|
|
7472
7525
|
}, [data, answerType, typeList]);
|
|
7473
|
-
(0,
|
|
7526
|
+
(0, import_react27.useEffect)(() => {
|
|
7474
7527
|
if (activityTemplateTypeList.length === 0) return;
|
|
7475
7528
|
const currentOptionList = [];
|
|
7476
7529
|
for (const activityTemplateType of activityTemplateTypeList) {
|
|
@@ -7490,11 +7543,11 @@ var ActivityPreviewByData = ({
|
|
|
7490
7543
|
}
|
|
7491
7544
|
setOptionList(currentOptionList);
|
|
7492
7545
|
}, [activityTemplateTypeList, showDifficulty]);
|
|
7493
|
-
(0,
|
|
7546
|
+
(0, import_react27.useEffect)(() => {
|
|
7494
7547
|
if (optionList.length === 0) return;
|
|
7495
7548
|
setSelectedType(optionList[0].id);
|
|
7496
7549
|
}, [optionList]);
|
|
7497
|
-
(0,
|
|
7550
|
+
(0, import_react27.useEffect)(() => {
|
|
7498
7551
|
if (activityTemplateTypeList.length === 0) return;
|
|
7499
7552
|
const currentAnswerMapMap = {};
|
|
7500
7553
|
for (const activityTemplateMap of activityTemplateTypeList) {
|
|
@@ -7526,44 +7579,44 @@ var ActivityPreviewByData = ({
|
|
|
7526
7579
|
}
|
|
7527
7580
|
switch (selectedType) {
|
|
7528
7581
|
case "ORDERING":
|
|
7529
|
-
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0,
|
|
7530
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7531
|
-
/* @__PURE__ */ (0,
|
|
7582
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7583
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7584
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(OrderingActivityContent_default, __spreadValues({}, commonProps))
|
|
7532
7585
|
] }) : null;
|
|
7533
7586
|
case "DROPDOWN":
|
|
7534
|
-
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0,
|
|
7535
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7536
|
-
/* @__PURE__ */ (0,
|
|
7587
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7588
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownActivityContent_default, __spreadValues({}, commonProps))
|
|
7537
7590
|
] }) : null;
|
|
7538
7591
|
case "MCSA":
|
|
7539
|
-
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0,
|
|
7540
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7541
|
-
/* @__PURE__ */ (0,
|
|
7592
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7593
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7594
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MCSAActivityContent_default, __spreadValues({}, commonProps))
|
|
7542
7595
|
] }) : null;
|
|
7543
7596
|
case "MCMA":
|
|
7544
|
-
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0,
|
|
7545
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7597
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7598
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7599
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MCMAActivityContent_default, __spreadValues({}, commonProps))
|
|
7547
7600
|
] }) : null;
|
|
7548
7601
|
case "MATCHING":
|
|
7549
|
-
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0,
|
|
7550
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7551
|
-
/* @__PURE__ */ (0,
|
|
7602
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7603
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7604
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MatchingActivityContent_default, __spreadValues({}, commonProps))
|
|
7552
7605
|
] }) : null;
|
|
7553
7606
|
case "GROUPING":
|
|
7554
|
-
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0,
|
|
7555
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7556
|
-
/* @__PURE__ */ (0,
|
|
7607
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7608
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7609
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(GroupingActivityContent_default, __spreadValues({}, commonProps))
|
|
7557
7610
|
] }) : null;
|
|
7558
7611
|
case "FILL_IN_THE_BLANKS":
|
|
7559
|
-
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0,
|
|
7560
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7561
|
-
/* @__PURE__ */ (0,
|
|
7612
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7613
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7614
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps))
|
|
7562
7615
|
] }) : null;
|
|
7563
7616
|
case "OPEN_ENDED":
|
|
7564
|
-
return data.openEndedBodyMap ? /* @__PURE__ */ (0,
|
|
7565
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7566
|
-
/* @__PURE__ */ (0,
|
|
7617
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7618
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7619
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7567
7620
|
OpenEndedActivityContent_default,
|
|
7568
7621
|
__spreadProps(__spreadValues({}, commonProps), {
|
|
7569
7622
|
showMaterialContent
|
|
@@ -7571,20 +7624,20 @@ var ActivityPreviewByData = ({
|
|
|
7571
7624
|
)
|
|
7572
7625
|
] }) : null;
|
|
7573
7626
|
case "TRUE_FALSE":
|
|
7574
|
-
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0,
|
|
7575
|
-
isEmpty && /* @__PURE__ */ (0,
|
|
7576
|
-
/* @__PURE__ */ (0,
|
|
7627
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7628
|
+
isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}),
|
|
7629
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TrueFalseActivityContent_default, __spreadValues({}, commonProps))
|
|
7577
7630
|
] }) : null;
|
|
7578
7631
|
default:
|
|
7579
7632
|
return null;
|
|
7580
7633
|
}
|
|
7581
7634
|
};
|
|
7582
7635
|
if (!data) return null;
|
|
7583
|
-
return /* @__PURE__ */ (0,
|
|
7584
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ (0,
|
|
7585
|
-
/* @__PURE__ */ (0,
|
|
7586
|
-
showDescription ? /* @__PURE__ */ (0,
|
|
7587
|
-
/* @__PURE__ */ (0,
|
|
7636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
|
|
7637
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7638
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-2", children: [
|
|
7639
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7640
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7588
7641
|
SelectionBox_default,
|
|
7589
7642
|
{
|
|
7590
7643
|
optionList,
|
|
@@ -7595,17 +7648,17 @@ var ActivityPreviewByData = ({
|
|
|
7595
7648
|
}
|
|
7596
7649
|
)
|
|
7597
7650
|
] }),
|
|
7598
|
-
/* @__PURE__ */ (0,
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DividerLine_default, {})
|
|
7599
7652
|
] }) : null,
|
|
7600
|
-
/* @__PURE__ */ (0,
|
|
7601
|
-
selectedType && showSolution ? /* @__PURE__ */ (0,
|
|
7653
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-col mb-2 w-full", children: RenderSelectedActivityContent() }),
|
|
7654
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7602
7655
|
ActivitySolutionContent_default,
|
|
7603
7656
|
{
|
|
7604
7657
|
activityTemplateType: selectedType,
|
|
7605
7658
|
data
|
|
7606
7659
|
}
|
|
7607
7660
|
) }) : null,
|
|
7608
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0,
|
|
7661
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7609
7662
|
ActivityEvaluationRubricContent_default,
|
|
7610
7663
|
{
|
|
7611
7664
|
activityTemplateType: selectedType,
|
|
@@ -7617,17 +7670,17 @@ var ActivityPreviewByData = ({
|
|
|
7617
7670
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
7618
7671
|
|
|
7619
7672
|
// src/components/errors/StatusError.tsx
|
|
7620
|
-
var
|
|
7673
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7621
7674
|
var StatusError = ({
|
|
7622
7675
|
statusCode,
|
|
7623
7676
|
statusText,
|
|
7624
7677
|
textSize
|
|
7625
7678
|
}) => {
|
|
7626
|
-
return /* @__PURE__ */ (0,
|
|
7627
|
-
/* @__PURE__ */ (0,
|
|
7628
|
-
/* @__PURE__ */ (0,
|
|
7629
|
-
/* @__PURE__ */ (0,
|
|
7630
|
-
/* @__PURE__ */ (0,
|
|
7679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col justify-center items-center", children: [
|
|
7680
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-6xl text-catchup-red my-5", children: i18n_default.t("ooops_text") }),
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "text-center my-5", children: [
|
|
7682
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "italic", children: i18n_default.t("unexcepted_error_text") }),
|
|
7683
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: `${textSize ? textSize : "text-lg"}`, children: [
|
|
7631
7684
|
"(",
|
|
7632
7685
|
statusCode ? `${statusCode} - ` : null,
|
|
7633
7686
|
statusText,
|
|
@@ -7639,9 +7692,9 @@ var StatusError = ({
|
|
|
7639
7692
|
var StatusError_default = StatusError;
|
|
7640
7693
|
|
|
7641
7694
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
7642
|
-
var
|
|
7695
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7643
7696
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
7644
|
-
return /* @__PURE__ */ (0,
|
|
7697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7645
7698
|
"div",
|
|
7646
7699
|
{
|
|
7647
7700
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -7651,7 +7704,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
7651
7704
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
7652
7705
|
|
|
7653
7706
|
// src/components/groups/LeftTextRightInputGroup.tsx
|
|
7654
|
-
var
|
|
7707
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7655
7708
|
var LeftTextRightInputGroup = ({
|
|
7656
7709
|
type,
|
|
7657
7710
|
title,
|
|
@@ -7661,9 +7714,9 @@ var LeftTextRightInputGroup = ({
|
|
|
7661
7714
|
disabled,
|
|
7662
7715
|
errorText
|
|
7663
7716
|
}) => {
|
|
7664
|
-
return /* @__PURE__ */ (0,
|
|
7665
|
-
/* @__PURE__ */ (0,
|
|
7666
|
-
/* @__PURE__ */ (0,
|
|
7717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "w-full flex flex-row mx-2", children: [
|
|
7718
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: title }) }),
|
|
7719
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7667
7720
|
InputGroup_default,
|
|
7668
7721
|
{
|
|
7669
7722
|
type,
|
|
@@ -7679,8 +7732,8 @@ var LeftTextRightInputGroup = ({
|
|
|
7679
7732
|
var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
|
|
7680
7733
|
|
|
7681
7734
|
// src/components/groups/PageTravelGroup.tsx
|
|
7682
|
-
var
|
|
7683
|
-
var
|
|
7735
|
+
var import_react28 = require("react");
|
|
7736
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7684
7737
|
var PageTravelGroup = ({
|
|
7685
7738
|
isImageProcessing,
|
|
7686
7739
|
handleImageProcessing,
|
|
@@ -7689,13 +7742,13 @@ var PageTravelGroup = ({
|
|
|
7689
7742
|
setPageNumber,
|
|
7690
7743
|
setImageReady
|
|
7691
7744
|
}) => {
|
|
7692
|
-
const [totalPageNumber, setTotalPageNumber] = (0,
|
|
7693
|
-
const [newPageNumber, setNewPageNumber] = (0,
|
|
7694
|
-
(0,
|
|
7745
|
+
const [totalPageNumber, setTotalPageNumber] = (0, import_react28.useState)(0);
|
|
7746
|
+
const [newPageNumber, setNewPageNumber] = (0, import_react28.useState)(0);
|
|
7747
|
+
(0, import_react28.useEffect)(() => {
|
|
7695
7748
|
if (!initialTotalPageNumber) return;
|
|
7696
7749
|
setTotalPageNumber(initialTotalPageNumber);
|
|
7697
7750
|
}, [initialTotalPageNumber]);
|
|
7698
|
-
(0,
|
|
7751
|
+
(0, import_react28.useEffect)(() => {
|
|
7699
7752
|
setNewPageNumber(pageNumber + 1);
|
|
7700
7753
|
}, [pageNumber]);
|
|
7701
7754
|
const handlePageChange = (newPage) => {
|
|
@@ -7706,8 +7759,8 @@ var PageTravelGroup = ({
|
|
|
7706
7759
|
setImageReady(false);
|
|
7707
7760
|
}
|
|
7708
7761
|
};
|
|
7709
|
-
return /* @__PURE__ */ (0,
|
|
7710
|
-
/* @__PURE__ */ (0,
|
|
7762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1 flex flex-row justify-center items-center flex-wrap gap-x-2", children: [
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7711
7764
|
"button",
|
|
7712
7765
|
{
|
|
7713
7766
|
className: "px-2 py-1 bg-catchup-blue-100 rounded-catchup-small",
|
|
@@ -7716,12 +7769,12 @@ var PageTravelGroup = ({
|
|
|
7716
7769
|
children: "\u2190"
|
|
7717
7770
|
}
|
|
7718
7771
|
),
|
|
7719
|
-
/* @__PURE__ */ (0,
|
|
7772
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("p", { className: "text-md", children: [
|
|
7720
7773
|
pageNumber + 1,
|
|
7721
7774
|
" / ",
|
|
7722
7775
|
totalPageNumber
|
|
7723
7776
|
] }),
|
|
7724
|
-
/* @__PURE__ */ (0,
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7725
7778
|
"button",
|
|
7726
7779
|
{
|
|
7727
7780
|
className: "px-2 py-1 bg-catchup-blue-100 rounded-catchup-small",
|
|
@@ -7730,7 +7783,7 @@ var PageTravelGroup = ({
|
|
|
7730
7783
|
children: "\u2192"
|
|
7731
7784
|
}
|
|
7732
7785
|
),
|
|
7733
|
-
/* @__PURE__ */ (0,
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7734
7787
|
"input",
|
|
7735
7788
|
{
|
|
7736
7789
|
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",
|
|
@@ -7753,17 +7806,17 @@ var PageTravelGroup = ({
|
|
|
7753
7806
|
var PageTravelGroup_default = PageTravelGroup;
|
|
7754
7807
|
|
|
7755
7808
|
// src/hooks/useScreenSize.ts
|
|
7756
|
-
var
|
|
7809
|
+
var import_react29 = require("react");
|
|
7757
7810
|
var useScreenSize = () => {
|
|
7758
|
-
const [containerSize, setContainerSize] = (0,
|
|
7811
|
+
const [containerSize, setContainerSize] = (0, import_react29.useState)({
|
|
7759
7812
|
width: 0,
|
|
7760
7813
|
height: 0
|
|
7761
7814
|
});
|
|
7762
|
-
const [screenSize, setScreenSize] = (0,
|
|
7815
|
+
const [screenSize, setScreenSize] = (0, import_react29.useState)({
|
|
7763
7816
|
width: window.innerWidth,
|
|
7764
7817
|
height: window.innerHeight
|
|
7765
7818
|
});
|
|
7766
|
-
(0,
|
|
7819
|
+
(0, import_react29.useEffect)(() => {
|
|
7767
7820
|
const handleResize = () => {
|
|
7768
7821
|
setScreenSize({
|
|
7769
7822
|
width: window.innerWidth,
|
|
@@ -7788,14 +7841,14 @@ var useScreenSize = () => {
|
|
|
7788
7841
|
var useScreenSize_default = useScreenSize;
|
|
7789
7842
|
|
|
7790
7843
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
7791
|
-
var
|
|
7844
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7792
7845
|
var SelectionCheckbox = ({
|
|
7793
7846
|
optionList,
|
|
7794
7847
|
selectedIdList,
|
|
7795
7848
|
handleSelectOnClick,
|
|
7796
7849
|
handleRemoveOnClick
|
|
7797
7850
|
}) => {
|
|
7798
|
-
return /* @__PURE__ */ (0,
|
|
7851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.jsx)(
|
|
7799
7852
|
"div",
|
|
7800
7853
|
{
|
|
7801
7854
|
className: `${selectedIdList.findIndex(
|
|
@@ -7810,14 +7863,14 @@ var SelectionCheckbox = ({
|
|
|
7810
7863
|
handleRemoveOnClick(option.id);
|
|
7811
7864
|
}
|
|
7812
7865
|
},
|
|
7813
|
-
children: /* @__PURE__ */ (0,
|
|
7866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
7814
7867
|
"div",
|
|
7815
7868
|
{
|
|
7816
7869
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
7817
7870
|
(selectedId) => selectedId === option.id
|
|
7818
7871
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
7819
7872
|
children: [
|
|
7820
|
-
/* @__PURE__ */ (0,
|
|
7873
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7821
7874
|
BaseImage_default,
|
|
7822
7875
|
{
|
|
7823
7876
|
src: selectedIdList.findIndex(
|
|
@@ -7827,7 +7880,7 @@ var SelectionCheckbox = ({
|
|
|
7827
7880
|
size: "small"
|
|
7828
7881
|
}
|
|
7829
7882
|
),
|
|
7830
|
-
/* @__PURE__ */ (0,
|
|
7883
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { children: option.text }) })
|
|
7831
7884
|
]
|
|
7832
7885
|
}
|
|
7833
7886
|
)
|
|
@@ -7838,7 +7891,7 @@ var SelectionCheckbox = ({
|
|
|
7838
7891
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
7839
7892
|
|
|
7840
7893
|
// src/components/tabs/SelectionTab.tsx
|
|
7841
|
-
var
|
|
7894
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7842
7895
|
var SelectionTab = ({
|
|
7843
7896
|
optionList,
|
|
7844
7897
|
selectedId,
|
|
@@ -7848,7 +7901,7 @@ var SelectionTab = ({
|
|
|
7848
7901
|
textColor,
|
|
7849
7902
|
borderColor
|
|
7850
7903
|
}) => {
|
|
7851
|
-
return /* @__PURE__ */ (0,
|
|
7904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsxs)(
|
|
7852
7905
|
"div",
|
|
7853
7906
|
{
|
|
7854
7907
|
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 px-4 py-2 cursor-pointer`,
|
|
@@ -7856,8 +7909,8 @@ var SelectionTab = ({
|
|
|
7856
7909
|
handleSelectOnClick(option.id);
|
|
7857
7910
|
},
|
|
7858
7911
|
children: [
|
|
7859
|
-
/* @__PURE__ */ (0,
|
|
7860
|
-
option.subTitle ? /* @__PURE__ */ (0,
|
|
7912
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-lg", children: option.title }),
|
|
7913
|
+
option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-md", children: option.subTitle }) : null
|
|
7861
7914
|
]
|
|
7862
7915
|
},
|
|
7863
7916
|
index
|
|
@@ -7866,20 +7919,20 @@ var SelectionTab = ({
|
|
|
7866
7919
|
var SelectionTab_default = SelectionTab;
|
|
7867
7920
|
|
|
7868
7921
|
// src/components/tabs/SelectionTabFill.tsx
|
|
7869
|
-
var
|
|
7922
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7870
7923
|
var SelectionTabFill = ({
|
|
7871
7924
|
optionList,
|
|
7872
7925
|
selectedId,
|
|
7873
7926
|
handleSelectOnClick
|
|
7874
7927
|
}) => {
|
|
7875
|
-
return /* @__PURE__ */ (0,
|
|
7928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.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_runtime56.jsx)(
|
|
7876
7929
|
"div",
|
|
7877
7930
|
{
|
|
7878
7931
|
className: "cursor-pointer",
|
|
7879
7932
|
onClick: () => {
|
|
7880
7933
|
handleSelectOnClick(option.id);
|
|
7881
7934
|
},
|
|
7882
|
-
children: /* @__PURE__ */ (0,
|
|
7935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7883
7936
|
"p",
|
|
7884
7937
|
{
|
|
7885
7938
|
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`,
|
|
@@ -7893,7 +7946,7 @@ var SelectionTabFill = ({
|
|
|
7893
7946
|
var SelectionTabFill_default = SelectionTabFill;
|
|
7894
7947
|
|
|
7895
7948
|
// src/components/tabs/SelectionTabPill.tsx
|
|
7896
|
-
var
|
|
7949
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7897
7950
|
var SelectionTabPill = ({
|
|
7898
7951
|
optionList,
|
|
7899
7952
|
selectedId,
|
|
@@ -7901,12 +7954,12 @@ var SelectionTabPill = ({
|
|
|
7901
7954
|
selectedClassName,
|
|
7902
7955
|
unselectedClassName
|
|
7903
7956
|
}) => {
|
|
7904
|
-
return /* @__PURE__ */ (0,
|
|
7957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-wrap items-center gap-3 my-2", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7905
7958
|
"button",
|
|
7906
7959
|
{
|
|
7907
7960
|
onClick: () => handleSelectOnClick(option.id),
|
|
7908
7961
|
className: `px-4 py-2 rounded-catchup-full transition-all duration-200 cursor-pointer ${selectedId === option.id ? selectedClassName || "bg-catchup-blue text-catchup-white shadow-card" : unselectedClassName || "bg-catchup-blue-100 text-catchup-blue-800 hover:bg-catchup-blue-200"}`,
|
|
7909
|
-
children: /* @__PURE__ */ (0,
|
|
7962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-base font-semibold", children: option.title })
|
|
7910
7963
|
},
|
|
7911
7964
|
index
|
|
7912
7965
|
)) });
|
|
@@ -7914,7 +7967,7 @@ var SelectionTabPill = ({
|
|
|
7914
7967
|
var SelectionTabPill_default = SelectionTabPill;
|
|
7915
7968
|
|
|
7916
7969
|
// src/components/labels/Label.tsx
|
|
7917
|
-
var
|
|
7970
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7918
7971
|
var Label = ({
|
|
7919
7972
|
title,
|
|
7920
7973
|
icon,
|
|
@@ -7924,7 +7977,7 @@ var Label = ({
|
|
|
7924
7977
|
backgroundColor,
|
|
7925
7978
|
textColor
|
|
7926
7979
|
}) => {
|
|
7927
|
-
return /* @__PURE__ */ (0,
|
|
7980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7928
7981
|
"div",
|
|
7929
7982
|
{
|
|
7930
7983
|
className: "px-3 py-1 gap-x-3 border rounded-catchup-2xlarge text-center",
|
|
@@ -7934,9 +7987,9 @@ var Label = ({
|
|
|
7934
7987
|
background: backgroundColor,
|
|
7935
7988
|
color: textColor
|
|
7936
7989
|
},
|
|
7937
|
-
children: /* @__PURE__ */ (0,
|
|
7990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7938
7991
|
icon,
|
|
7939
|
-
/* @__PURE__ */ (0,
|
|
7992
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: font, children: title })
|
|
7940
7993
|
] })
|
|
7941
7994
|
}
|
|
7942
7995
|
);
|
|
@@ -7944,9 +7997,9 @@ var Label = ({
|
|
|
7944
7997
|
var Label_default = Label;
|
|
7945
7998
|
|
|
7946
7999
|
// src/components/labels/AmberLabel.tsx
|
|
7947
|
-
var
|
|
8000
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7948
8001
|
var AmberLabel = ({ title, icon, font }) => {
|
|
7949
|
-
return /* @__PURE__ */ (0,
|
|
8002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7950
8003
|
Label_default,
|
|
7951
8004
|
{
|
|
7952
8005
|
title,
|
|
@@ -7961,9 +8014,9 @@ var AmberLabel = ({ title, icon, font }) => {
|
|
|
7961
8014
|
var AmberLabel_default = AmberLabel;
|
|
7962
8015
|
|
|
7963
8016
|
// src/components/labels/TealLabel.tsx
|
|
7964
|
-
var
|
|
8017
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7965
8018
|
var TealLabel = ({ title, icon, font }) => {
|
|
7966
|
-
return /* @__PURE__ */ (0,
|
|
8019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7967
8020
|
Label_default,
|
|
7968
8021
|
{
|
|
7969
8022
|
title,
|
|
@@ -7978,9 +8031,9 @@ var TealLabel = ({ title, icon, font }) => {
|
|
|
7978
8031
|
var TealLabel_default = TealLabel;
|
|
7979
8032
|
|
|
7980
8033
|
// src/components/labels/PurpleLabel.tsx
|
|
7981
|
-
var
|
|
8034
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7982
8035
|
var PurpleLabel = ({ title, icon, font }) => {
|
|
7983
|
-
return /* @__PURE__ */ (0,
|
|
8036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7984
8037
|
Label_default,
|
|
7985
8038
|
{
|
|
7986
8039
|
title,
|
|
@@ -7995,9 +8048,9 @@ var PurpleLabel = ({ title, icon, font }) => {
|
|
|
7995
8048
|
var PurpleLabel_default = PurpleLabel;
|
|
7996
8049
|
|
|
7997
8050
|
// src/components/labels/GreenLabel.tsx
|
|
7998
|
-
var
|
|
8051
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7999
8052
|
var GreenLabel = ({ title, icon, font }) => {
|
|
8000
|
-
return /* @__PURE__ */ (0,
|
|
8053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8001
8054
|
Label_default,
|
|
8002
8055
|
{
|
|
8003
8056
|
title,
|
|
@@ -8012,9 +8065,9 @@ var GreenLabel = ({ title, icon, font }) => {
|
|
|
8012
8065
|
var GreenLabel_default = GreenLabel;
|
|
8013
8066
|
|
|
8014
8067
|
// src/components/labels/BlueLabel.tsx
|
|
8015
|
-
var
|
|
8068
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8016
8069
|
var BlueLabel = ({ title, icon, font }) => {
|
|
8017
|
-
return /* @__PURE__ */ (0,
|
|
8070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8018
8071
|
Label_default,
|
|
8019
8072
|
{
|
|
8020
8073
|
title,
|
|
@@ -8029,9 +8082,9 @@ var BlueLabel = ({ title, icon, font }) => {
|
|
|
8029
8082
|
var BlueLabel_default = BlueLabel;
|
|
8030
8083
|
|
|
8031
8084
|
// src/components/labels/OrangeLabel.tsx
|
|
8032
|
-
var
|
|
8085
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8033
8086
|
var OrangeLabel = ({ title, icon, font }) => {
|
|
8034
|
-
return /* @__PURE__ */ (0,
|
|
8087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8035
8088
|
Label_default,
|
|
8036
8089
|
{
|
|
8037
8090
|
title,
|
|
@@ -8046,9 +8099,9 @@ var OrangeLabel = ({ title, icon, font }) => {
|
|
|
8046
8099
|
var OrangeLabel_default = OrangeLabel;
|
|
8047
8100
|
|
|
8048
8101
|
// src/components/labels/RedLabel.tsx
|
|
8049
|
-
var
|
|
8102
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8050
8103
|
var RedLabel = ({ title, icon, font }) => {
|
|
8051
|
-
return /* @__PURE__ */ (0,
|
|
8104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8052
8105
|
Label_default,
|
|
8053
8106
|
{
|
|
8054
8107
|
title,
|
|
@@ -8063,9 +8116,9 @@ var RedLabel = ({ title, icon, font }) => {
|
|
|
8063
8116
|
var RedLabel_default = RedLabel;
|
|
8064
8117
|
|
|
8065
8118
|
// src/components/labels/LimeLabel.tsx
|
|
8066
|
-
var
|
|
8119
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8067
8120
|
var LimeLabel = ({ title, icon, font }) => {
|
|
8068
|
-
return /* @__PURE__ */ (0,
|
|
8121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8069
8122
|
Label_default,
|
|
8070
8123
|
{
|
|
8071
8124
|
title,
|
|
@@ -8080,9 +8133,9 @@ var LimeLabel = ({ title, icon, font }) => {
|
|
|
8080
8133
|
var LimeLabel_default = LimeLabel;
|
|
8081
8134
|
|
|
8082
8135
|
// src/components/labels/CoralLabel.tsx
|
|
8083
|
-
var
|
|
8136
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
8084
8137
|
var CoralLabel = ({ title, icon, font }) => {
|
|
8085
|
-
return /* @__PURE__ */ (0,
|
|
8138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8086
8139
|
Label_default,
|
|
8087
8140
|
{
|
|
8088
8141
|
title,
|
|
@@ -8097,9 +8150,9 @@ var CoralLabel = ({ title, icon, font }) => {
|
|
|
8097
8150
|
var CoralLabel_default = CoralLabel;
|
|
8098
8151
|
|
|
8099
8152
|
// src/components/labels/CyanLabel.tsx
|
|
8100
|
-
var
|
|
8153
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8101
8154
|
var CyanLabel = ({ title, icon, font }) => {
|
|
8102
|
-
return /* @__PURE__ */ (0,
|
|
8155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8103
8156
|
Label_default,
|
|
8104
8157
|
{
|
|
8105
8158
|
title,
|
|
@@ -8114,9 +8167,9 @@ var CyanLabel = ({ title, icon, font }) => {
|
|
|
8114
8167
|
var CyanLabel_default = CyanLabel;
|
|
8115
8168
|
|
|
8116
8169
|
// src/components/labels/GrayLabel.tsx
|
|
8117
|
-
var
|
|
8170
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8118
8171
|
var GrayLabel = ({ title, icon, font }) => {
|
|
8119
|
-
return /* @__PURE__ */ (0,
|
|
8172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8120
8173
|
Label_default,
|
|
8121
8174
|
{
|
|
8122
8175
|
title,
|
|
@@ -8131,20 +8184,20 @@ var GrayLabel = ({ title, icon, font }) => {
|
|
|
8131
8184
|
var GrayLabel_default = GrayLabel;
|
|
8132
8185
|
|
|
8133
8186
|
// src/components/infos/InfoWithText.tsx
|
|
8134
|
-
var
|
|
8187
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8135
8188
|
var InfoWithText = (props) => {
|
|
8136
8189
|
const { value } = props;
|
|
8137
|
-
return /* @__PURE__ */ (0,
|
|
8138
|
-
/* @__PURE__ */ (0,
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
|
|
8192
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "", children: value }) })
|
|
8140
8193
|
] });
|
|
8141
8194
|
};
|
|
8142
8195
|
var InfoWithText_default = InfoWithText;
|
|
8143
8196
|
|
|
8144
8197
|
// src/components/titles/SubTitle.tsx
|
|
8145
|
-
var
|
|
8198
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8146
8199
|
var SubTitle = ({ title }) => {
|
|
8147
|
-
return /* @__PURE__ */ (0,
|
|
8200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
|
|
8148
8201
|
};
|
|
8149
8202
|
var SubTitle_default = SubTitle;
|
|
8150
8203
|
|
|
@@ -11028,6 +11081,7 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
11028
11081
|
SelectionTab,
|
|
11029
11082
|
SelectionTabFill,
|
|
11030
11083
|
SelectionTabPill,
|
|
11084
|
+
StartButton,
|
|
11031
11085
|
StatusError,
|
|
11032
11086
|
SubTitle,
|
|
11033
11087
|
THREE_MONTHS,
|