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