catchup-library-web 1.12.14 → 1.12.16
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 +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +818 -617
- package/dist/index.mjs +803 -606
- package/package.json +1 -1
- package/src/components/bars/ProgressBar.tsx +85 -0
- package/src/components/bars/ScoreBar.tsx +37 -0
- package/src/components/bars/TimedProgressBar.tsx +58 -0
- package/src/index.ts +4 -0
- package/src/properties/BarProperties.ts +23 -0
- package/src/utilization/DateUtilization.ts +45 -0
package/dist/index.js
CHANGED
|
@@ -109,7 +109,9 @@ __export(index_exports, {
|
|
|
109
109
|
OutcomeLabel: () => OutcomeLabel_default,
|
|
110
110
|
PersonalLabel: () => PersonalLabel_default,
|
|
111
111
|
PrimaryButton: () => PrimaryButton_default,
|
|
112
|
+
ProgressBar: () => ProgressBar_default,
|
|
112
113
|
PublishingHouseLabel: () => PublishingHouseLabel_default,
|
|
114
|
+
ScoreBar: () => ScoreBar_default,
|
|
113
115
|
SecondaryButton: () => SecondaryButton_default,
|
|
114
116
|
SelectionBox: () => SelectionBox_default,
|
|
115
117
|
SelectionCheckbox: () => SelectionCheckbox_default,
|
|
@@ -117,6 +119,7 @@ __export(index_exports, {
|
|
|
117
119
|
SelectionTabFill: () => SelectionTabFill_default,
|
|
118
120
|
SubTitle: () => SubTitle_default,
|
|
119
121
|
THREE_MONTHS: () => THREE_MONTHS,
|
|
122
|
+
TimedProgressBar: () => TimedProgressBar_default,
|
|
120
123
|
TrueFalseActivityContent: () => TrueFalseActivityContent_default,
|
|
121
124
|
VerticalDividerLine: () => VerticalDividerLine_default,
|
|
122
125
|
adjustForTimezone: () => adjustForTimezone,
|
|
@@ -229,6 +232,7 @@ __export(index_exports, {
|
|
|
229
232
|
retrieveTaxonomyName: () => retrieveTaxonomyName,
|
|
230
233
|
retrieveTaxonomyType: () => retrieveTaxonomyType,
|
|
231
234
|
retrieveTeachingMethodologyOptionList: () => retrieveTeachingMethodologyOptionList,
|
|
235
|
+
retrieveTimeFilterOptionList: () => retrieveTimeFilterOptionList,
|
|
232
236
|
retrieveTokenUsageSubTypeOptionList: () => retrieveTokenUsageSubTypeOptionList,
|
|
233
237
|
retrieveTokenUsageTypeOptionList: () => retrieveTokenUsageTypeOptionList,
|
|
234
238
|
retrieveTotalTimeSpentInMinutes: () => retrieveTotalTimeSpentInMinutes,
|
|
@@ -241,15 +245,164 @@ __export(index_exports, {
|
|
|
241
245
|
});
|
|
242
246
|
module.exports = __toCommonJS(index_exports);
|
|
243
247
|
|
|
248
|
+
// src/components/bars/ProgressBar.tsx
|
|
249
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
250
|
+
var ProgressBar = ({
|
|
251
|
+
title,
|
|
252
|
+
showRemainingTime,
|
|
253
|
+
totalTimeInSeconds,
|
|
254
|
+
remainingTimeInSeconds,
|
|
255
|
+
color,
|
|
256
|
+
borderColor,
|
|
257
|
+
height
|
|
258
|
+
}) => {
|
|
259
|
+
const retrieveMinutes = () => {
|
|
260
|
+
return Math.floor(remainingTimeInSeconds / 60);
|
|
261
|
+
};
|
|
262
|
+
const retrieveSeconds = (minutes) => {
|
|
263
|
+
const minuteInSeconds = minutes * 60;
|
|
264
|
+
return Math.floor(remainingTimeInSeconds - minuteInSeconds);
|
|
265
|
+
};
|
|
266
|
+
const calculatePercentage = () => {
|
|
267
|
+
if (remainingTimeInSeconds < 0) {
|
|
268
|
+
return totalTimeInSeconds / totalTimeInSeconds * 100;
|
|
269
|
+
} else {
|
|
270
|
+
return (totalTimeInSeconds - remainingTimeInSeconds) / totalTimeInSeconds * 100;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const currentMinutes = retrieveMinutes();
|
|
274
|
+
const currentSeconds = retrieveSeconds(currentMinutes);
|
|
275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full ", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "", children: [
|
|
276
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-2 left-6", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xl", children: title }) }) : null,
|
|
277
|
+
showRemainingTime ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-2 right-6", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex flex-row text-xl", children: [
|
|
278
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "mx-1", children: [
|
|
279
|
+
currentMinutes < 0 ? `00` : currentMinutes < 10 ? `0${currentMinutes}` : currentMinutes,
|
|
280
|
+
" "
|
|
281
|
+
] }),
|
|
282
|
+
":",
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "mx-1", children: [
|
|
284
|
+
currentSeconds < 0 ? `00` : currentSeconds < 10 ? `0${currentSeconds}` : currentSeconds,
|
|
285
|
+
" "
|
|
286
|
+
] })
|
|
287
|
+
] }) }) : null,
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
289
|
+
"div",
|
|
290
|
+
{
|
|
291
|
+
className: `${borderColor ? borderColor : "border-catchup-red"} border rounded-catchup-full`,
|
|
292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `w-full ${height ? height : ""} `, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: `rounded-catchup-full ${color ? color : "bg-catchup-red"} ${height ? height : "h-catchup-quicktivity"}`,
|
|
296
|
+
style: { width: `${calculatePercentage()}%` }
|
|
297
|
+
}
|
|
298
|
+
) })
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
] }) });
|
|
302
|
+
};
|
|
303
|
+
var ProgressBar_default = ProgressBar;
|
|
304
|
+
|
|
305
|
+
// src/components/bars/TimedProgressBar.tsx
|
|
306
|
+
var import_react = require("react");
|
|
307
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
308
|
+
var TimedProgressBar = ({
|
|
309
|
+
title,
|
|
310
|
+
startTimer,
|
|
311
|
+
showRemainingTime,
|
|
312
|
+
totalTimeInSeconds,
|
|
313
|
+
remainingTimeInSeconds,
|
|
314
|
+
handleOnTimerEnds
|
|
315
|
+
}) => {
|
|
316
|
+
const [timerRemainingTimeInSeconds, setTimerRemainingTimeInSeconds] = (0, import_react.useState)(remainingTimeInSeconds);
|
|
317
|
+
const [timerIntervalId, setTimerIntervalId] = (0, import_react.useState)(null);
|
|
318
|
+
let timerRemainingTimeInSecondsValue = 999999999999999;
|
|
319
|
+
(0, import_react.useEffect)(() => {
|
|
320
|
+
timerRemainingTimeInSecondsValue = remainingTimeInSeconds;
|
|
321
|
+
setTimerRemainingTimeInSeconds(timerRemainingTimeInSeconds);
|
|
322
|
+
if (timerIntervalId) {
|
|
323
|
+
clearInterval(timerIntervalId);
|
|
324
|
+
}
|
|
325
|
+
if (startTimer) {
|
|
326
|
+
const currentTimerIntervalId = setInterval(() => {
|
|
327
|
+
timerRemainingTimeInSecondsValue = timerRemainingTimeInSecondsValue - 0.05;
|
|
328
|
+
setTimerRemainingTimeInSeconds(timerRemainingTimeInSecondsValue);
|
|
329
|
+
}, 50);
|
|
330
|
+
setTimerIntervalId(currentTimerIntervalId);
|
|
331
|
+
} else {
|
|
332
|
+
if (timerIntervalId) {
|
|
333
|
+
clearInterval(timerIntervalId);
|
|
334
|
+
setTimerIntervalId(null);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}, [remainingTimeInSeconds, startTimer]);
|
|
338
|
+
(0, import_react.useEffect)(() => {
|
|
339
|
+
if (timerRemainingTimeInSeconds < 0) {
|
|
340
|
+
if (timerIntervalId) {
|
|
341
|
+
clearInterval(timerIntervalId);
|
|
342
|
+
}
|
|
343
|
+
handleOnTimerEnds(startTimer);
|
|
344
|
+
}
|
|
345
|
+
}, [timerRemainingTimeInSeconds]);
|
|
346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
347
|
+
ProgressBar_default,
|
|
348
|
+
{
|
|
349
|
+
title,
|
|
350
|
+
showRemainingTime,
|
|
351
|
+
remainingTimeInSeconds: timerRemainingTimeInSeconds,
|
|
352
|
+
totalTimeInSeconds
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
};
|
|
356
|
+
var TimedProgressBar_default = TimedProgressBar;
|
|
357
|
+
|
|
358
|
+
// src/components/bars/ScoreBar.tsx
|
|
359
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
360
|
+
var ScoreBar = ({ score, className }) => {
|
|
361
|
+
const getProgressBarColor = (score2) => {
|
|
362
|
+
if (score2 >= 70) return "bg-catchup-green";
|
|
363
|
+
if (score2 >= 30) return "bg-catchup-orange";
|
|
364
|
+
return "bg-catchup-red";
|
|
365
|
+
};
|
|
366
|
+
const getTextColor = (score2) => {
|
|
367
|
+
if (score2 >= 70) return "text-catchup-hover-green";
|
|
368
|
+
if (score2 >= 30) return "text-catchup-orange";
|
|
369
|
+
return "text-catchup-red";
|
|
370
|
+
};
|
|
371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `flex items-center gap-2 ${className}`, children: [
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex-1 h-5 bg-catchup-gray-100 rounded-catchup-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
373
|
+
"div",
|
|
374
|
+
{
|
|
375
|
+
className: `h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
|
|
376
|
+
score
|
|
377
|
+
)}`,
|
|
378
|
+
style: { width: `${score}%` }
|
|
379
|
+
}
|
|
380
|
+
) }),
|
|
381
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
382
|
+
"span",
|
|
383
|
+
{
|
|
384
|
+
className: `min-w-[35px] font-semibold text-right ${getTextColor(
|
|
385
|
+
score
|
|
386
|
+
)}`,
|
|
387
|
+
children: [
|
|
388
|
+
score,
|
|
389
|
+
"%"
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
] });
|
|
394
|
+
};
|
|
395
|
+
var ScoreBar_default = ScoreBar;
|
|
396
|
+
|
|
244
397
|
// src/components/buttons/PrimaryButton.tsx
|
|
245
|
-
var
|
|
398
|
+
var import_react3 = require("react");
|
|
246
399
|
|
|
247
400
|
// src/components/images/BaseImage.tsx
|
|
248
|
-
var
|
|
401
|
+
var import_react2 = require("react");
|
|
249
402
|
|
|
250
403
|
// src/components/loading/BaseLoading.tsx
|
|
251
404
|
var import_react_loader_spinner = require("react-loader-spinner");
|
|
252
|
-
var
|
|
405
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
253
406
|
var BaseLoading = ({
|
|
254
407
|
height,
|
|
255
408
|
width,
|
|
@@ -280,12 +433,12 @@ var BaseLoading = ({
|
|
|
280
433
|
currentHeight = height;
|
|
281
434
|
currentWidth = width;
|
|
282
435
|
}
|
|
283
|
-
return /* @__PURE__ */ (0,
|
|
436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
284
437
|
"div",
|
|
285
438
|
{
|
|
286
439
|
className: "flex justify-center items-center",
|
|
287
440
|
style: { marginTop: currentMargin, marginBottom: currentMargin },
|
|
288
|
-
children: /* @__PURE__ */ (0,
|
|
441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
289
442
|
import_react_loader_spinner.Oval,
|
|
290
443
|
{
|
|
291
444
|
height: currentHeight,
|
|
@@ -306,8 +459,8 @@ var BaseLoading = ({
|
|
|
306
459
|
var BaseLoading_default = BaseLoading;
|
|
307
460
|
|
|
308
461
|
// src/components/images/BaseImage.tsx
|
|
309
|
-
var
|
|
310
|
-
var BaseImage = (0,
|
|
462
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
463
|
+
var BaseImage = (0, import_react2.forwardRef)(
|
|
311
464
|
(props, ref) => {
|
|
312
465
|
const {
|
|
313
466
|
size,
|
|
@@ -327,8 +480,8 @@ var BaseImage = (0, import_react.forwardRef)(
|
|
|
327
480
|
dataToolTipHTML,
|
|
328
481
|
borderRadius
|
|
329
482
|
} = props;
|
|
330
|
-
const [key, setKey] = (0,
|
|
331
|
-
const [loading, setLoading] = (0,
|
|
483
|
+
const [key, setKey] = (0, import_react2.useState)((/* @__PURE__ */ new Date()).getTime());
|
|
484
|
+
const [loading, setLoading] = (0, import_react2.useState)(false);
|
|
332
485
|
const handleOnClick = (e) => {
|
|
333
486
|
e.preventDefault();
|
|
334
487
|
if (showLoading) {
|
|
@@ -378,19 +531,19 @@ var BaseImage = (0, import_react.forwardRef)(
|
|
|
378
531
|
currentWidthClassName = widthClassName;
|
|
379
532
|
currentHeightClassName = heightClassName;
|
|
380
533
|
}
|
|
381
|
-
return loading ? /* @__PURE__ */ (0,
|
|
534
|
+
return loading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
382
535
|
BaseLoading_default,
|
|
383
536
|
{
|
|
384
537
|
size: "small",
|
|
385
538
|
primaryColor: "#57C2D3",
|
|
386
539
|
secondaryColor: "#57C2D3"
|
|
387
540
|
}
|
|
388
|
-
) : /* @__PURE__ */ (0,
|
|
541
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
389
542
|
"span",
|
|
390
543
|
{
|
|
391
544
|
className: `${currentWidthClassName ? currentWidthClassName : ""} ${currentHeightClassName ? currentHeightClassName : ""} ${currentClassName ? currentClassName : ""} cursor-pointer inline-block ${hidden ? "hidden" : ""}`,
|
|
392
545
|
onClick: handleOnClick,
|
|
393
|
-
children: /* @__PURE__ */ (0,
|
|
546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
394
547
|
"img",
|
|
395
548
|
{
|
|
396
549
|
ref,
|
|
@@ -414,7 +567,7 @@ BaseImage.displayName = "BaseImage";
|
|
|
414
567
|
var BaseImage_default = BaseImage;
|
|
415
568
|
|
|
416
569
|
// src/components/buttons/PrimaryButton.tsx
|
|
417
|
-
var
|
|
570
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
418
571
|
var PrimaryButton = ({
|
|
419
572
|
title,
|
|
420
573
|
size,
|
|
@@ -424,7 +577,7 @@ var PrimaryButton = ({
|
|
|
424
577
|
textOnly,
|
|
425
578
|
iconOnly
|
|
426
579
|
}) => {
|
|
427
|
-
const [loading, setLoading] = (0,
|
|
580
|
+
const [loading, setLoading] = (0, import_react3.useState)(false);
|
|
428
581
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
429
582
|
if (loading) return;
|
|
430
583
|
if (disabled) return;
|
|
@@ -451,12 +604,12 @@ var PrimaryButton = ({
|
|
|
451
604
|
currentLoadingSize = 14;
|
|
452
605
|
currentHeightClassName = "h-8";
|
|
453
606
|
}
|
|
454
|
-
return /* @__PURE__ */ (0,
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
455
608
|
"button",
|
|
456
609
|
{
|
|
457
610
|
className: `border border-catchup-blue-500 bg-catchup-blue-500 text-catchup-white rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-blue-700 active:bg-catchup-blue-500"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
458
611
|
onClick: internalOnClick,
|
|
459
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
612
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
460
613
|
BaseLoading_default,
|
|
461
614
|
{
|
|
462
615
|
height: currentLoadingSize,
|
|
@@ -464,8 +617,8 @@ var PrimaryButton = ({
|
|
|
464
617
|
primaryColor: "#ffffff",
|
|
465
618
|
secondaryColor: "#ffffff"
|
|
466
619
|
}
|
|
467
|
-
) : /* @__PURE__ */ (0,
|
|
468
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
620
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
621
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
469
622
|
BaseImage_default,
|
|
470
623
|
{
|
|
471
624
|
src: "/icons/primary-button-arrow-left.webp",
|
|
@@ -473,8 +626,8 @@ var PrimaryButton = ({
|
|
|
473
626
|
size: "xsmall"
|
|
474
627
|
}
|
|
475
628
|
) : null,
|
|
476
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
477
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
629
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "", children: title }),
|
|
630
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
478
631
|
BaseImage_default,
|
|
479
632
|
{
|
|
480
633
|
src: "/icons/primary-button-arrow-right.webp",
|
|
@@ -489,8 +642,8 @@ var PrimaryButton = ({
|
|
|
489
642
|
var PrimaryButton_default = PrimaryButton;
|
|
490
643
|
|
|
491
644
|
// src/components/buttons/SecondaryButton.tsx
|
|
492
|
-
var
|
|
493
|
-
var
|
|
645
|
+
var import_react4 = require("react");
|
|
646
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
494
647
|
var SecondaryButton = ({
|
|
495
648
|
title,
|
|
496
649
|
size,
|
|
@@ -500,8 +653,8 @@ var SecondaryButton = ({
|
|
|
500
653
|
textOnly,
|
|
501
654
|
iconOnly
|
|
502
655
|
}) => {
|
|
503
|
-
const [loading, setLoading] = (0,
|
|
504
|
-
const [isHovered, setIsHovered] = (0,
|
|
656
|
+
const [loading, setLoading] = (0, import_react4.useState)(false);
|
|
657
|
+
const [isHovered, setIsHovered] = (0, import_react4.useState)(false);
|
|
505
658
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
506
659
|
if (loading) return;
|
|
507
660
|
if (disabled) return;
|
|
@@ -528,7 +681,7 @@ var SecondaryButton = ({
|
|
|
528
681
|
currentLoadingSize = 14;
|
|
529
682
|
currentHeightClassName = "h-8";
|
|
530
683
|
}
|
|
531
|
-
return /* @__PURE__ */ (0,
|
|
684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
532
685
|
"button",
|
|
533
686
|
{
|
|
534
687
|
className: `border border-catchup-gray-400 bg-catchup-white text-catchup-gray-600 rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-gray-400 hover:text-catchup-white hover:border-catchup-gray-400 active:bg-catchup-gray-500 active:border-catchup-gray-500 active:text-catchup-white"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
@@ -539,7 +692,7 @@ var SecondaryButton = ({
|
|
|
539
692
|
onMouseLeave: () => {
|
|
540
693
|
setIsHovered(false);
|
|
541
694
|
},
|
|
542
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
695
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
543
696
|
BaseLoading_default,
|
|
544
697
|
{
|
|
545
698
|
height: currentLoadingSize,
|
|
@@ -547,8 +700,8 @@ var SecondaryButton = ({
|
|
|
547
700
|
primaryColor: "#55777f",
|
|
548
701
|
secondaryColor: "#55777f"
|
|
549
702
|
}
|
|
550
|
-
) : /* @__PURE__ */ (0,
|
|
551
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
703
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
704
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
552
705
|
BaseImage_default,
|
|
553
706
|
{
|
|
554
707
|
src: "/icons/secondary-button-arrow-left.webp",
|
|
@@ -556,8 +709,8 @@ var SecondaryButton = ({
|
|
|
556
709
|
size: "xsmall"
|
|
557
710
|
}
|
|
558
711
|
) : null,
|
|
559
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
560
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
712
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "", children: title }),
|
|
713
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
561
714
|
BaseImage_default,
|
|
562
715
|
{
|
|
563
716
|
src: "/icons/secondary-button-arrow-right.webp",
|
|
@@ -572,8 +725,8 @@ var SecondaryButton = ({
|
|
|
572
725
|
var SecondaryButton_default = SecondaryButton;
|
|
573
726
|
|
|
574
727
|
// src/components/buttons/CreateButton.tsx
|
|
575
|
-
var
|
|
576
|
-
var
|
|
728
|
+
var import_react5 = require("react");
|
|
729
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
577
730
|
var CreateButton = ({
|
|
578
731
|
title,
|
|
579
732
|
size,
|
|
@@ -583,7 +736,7 @@ var CreateButton = ({
|
|
|
583
736
|
textOnly,
|
|
584
737
|
iconOnly
|
|
585
738
|
}) => {
|
|
586
|
-
const [loading, setLoading] = (0,
|
|
739
|
+
const [loading, setLoading] = (0, import_react5.useState)(false);
|
|
587
740
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
588
741
|
if (loading) return;
|
|
589
742
|
if (disabled) return;
|
|
@@ -610,12 +763,12 @@ var CreateButton = ({
|
|
|
610
763
|
currentLoadingSize = 14;
|
|
611
764
|
currentHeightClassName = "h-8";
|
|
612
765
|
}
|
|
613
|
-
return /* @__PURE__ */ (0,
|
|
766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
614
767
|
"button",
|
|
615
768
|
{
|
|
616
769
|
className: `border border-catchup-blue-500 bg-catchup-blue-500 text-catchup-white rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-blue-700 active:bg-catchup-blue-500"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
617
770
|
onClick: internalOnClick,
|
|
618
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
771
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
619
772
|
BaseLoading_default,
|
|
620
773
|
{
|
|
621
774
|
height: currentLoadingSize,
|
|
@@ -623,8 +776,8 @@ var CreateButton = ({
|
|
|
623
776
|
primaryColor: "#ffffff",
|
|
624
777
|
secondaryColor: "#ffffff"
|
|
625
778
|
}
|
|
626
|
-
) : /* @__PURE__ */ (0,
|
|
627
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
779
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
780
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
628
781
|
BaseImage_default,
|
|
629
782
|
{
|
|
630
783
|
src: "/icons/primary-button-create-white.webp",
|
|
@@ -632,8 +785,8 @@ var CreateButton = ({
|
|
|
632
785
|
size: "xsmall"
|
|
633
786
|
}
|
|
634
787
|
) : null,
|
|
635
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
636
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
788
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "", children: title }),
|
|
789
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
637
790
|
BaseImage_default,
|
|
638
791
|
{
|
|
639
792
|
src: "/icons/primary-button-create-white.webp",
|
|
@@ -648,8 +801,8 @@ var CreateButton = ({
|
|
|
648
801
|
var CreateButton_default = CreateButton;
|
|
649
802
|
|
|
650
803
|
// src/components/buttons/DeleteButton.tsx
|
|
651
|
-
var
|
|
652
|
-
var
|
|
804
|
+
var import_react6 = require("react");
|
|
805
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
653
806
|
var DeleteButton = ({
|
|
654
807
|
title,
|
|
655
808
|
size,
|
|
@@ -659,8 +812,8 @@ var DeleteButton = ({
|
|
|
659
812
|
textOnly,
|
|
660
813
|
iconOnly
|
|
661
814
|
}) => {
|
|
662
|
-
const [loading, setLoading] = (0,
|
|
663
|
-
const [isHovered, setIsHovered] = (0,
|
|
815
|
+
const [loading, setLoading] = (0, import_react6.useState)(false);
|
|
816
|
+
const [isHovered, setIsHovered] = (0, import_react6.useState)(false);
|
|
664
817
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
665
818
|
if (loading) return;
|
|
666
819
|
if (disabled) return;
|
|
@@ -684,7 +837,7 @@ var DeleteButton = ({
|
|
|
684
837
|
currentHeightClassName = "h-12";
|
|
685
838
|
currentLoadingSize = 18;
|
|
686
839
|
}
|
|
687
|
-
return /* @__PURE__ */ (0,
|
|
840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
688
841
|
"button",
|
|
689
842
|
{
|
|
690
843
|
className: `border border-catchup-red bg-catchup-white text-catchup-red rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-red hover:text-catchup-white hover:border-catchup-red active:bg-catchup-red active:hover:border-catchup-red active:text-catchup-white active:opacity-80"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
@@ -695,7 +848,7 @@ var DeleteButton = ({
|
|
|
695
848
|
onMouseLeave: () => {
|
|
696
849
|
setIsHovered(false);
|
|
697
850
|
},
|
|
698
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
851
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
699
852
|
BaseLoading_default,
|
|
700
853
|
{
|
|
701
854
|
height: currentLoadingSize,
|
|
@@ -703,8 +856,8 @@ var DeleteButton = ({
|
|
|
703
856
|
primaryColor: "#55777f",
|
|
704
857
|
secondaryColor: "#55777f"
|
|
705
858
|
}
|
|
706
|
-
) : /* @__PURE__ */ (0,
|
|
707
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
859
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2", children: [
|
|
860
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
708
861
|
BaseImage_default,
|
|
709
862
|
{
|
|
710
863
|
src: `${isHovered ? "/icons/remove-white.webp" : "/icons/remove-red.webp"}`,
|
|
@@ -712,8 +865,8 @@ var DeleteButton = ({
|
|
|
712
865
|
size: "xsmall"
|
|
713
866
|
}
|
|
714
867
|
) : null,
|
|
715
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
716
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
868
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "", children: title }),
|
|
869
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
717
870
|
BaseImage_default,
|
|
718
871
|
{
|
|
719
872
|
src: `${isHovered ? "/icons/remove-white.webp" : "/icons/remove-red.webp"}`,
|
|
@@ -728,8 +881,8 @@ var DeleteButton = ({
|
|
|
728
881
|
var DeleteButton_default = DeleteButton;
|
|
729
882
|
|
|
730
883
|
// src/components/buttons/CancelButton.tsx
|
|
731
|
-
var
|
|
732
|
-
var
|
|
884
|
+
var import_react7 = require("react");
|
|
885
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
733
886
|
var CancelButton = ({
|
|
734
887
|
title,
|
|
735
888
|
size,
|
|
@@ -739,8 +892,8 @@ var CancelButton = ({
|
|
|
739
892
|
textOnly,
|
|
740
893
|
iconOnly
|
|
741
894
|
}) => {
|
|
742
|
-
const [loading, setLoading] = (0,
|
|
743
|
-
const [isHovered, setIsHovered] = (0,
|
|
895
|
+
const [loading, setLoading] = (0, import_react7.useState)(false);
|
|
896
|
+
const [isHovered, setIsHovered] = (0, import_react7.useState)(false);
|
|
744
897
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
745
898
|
if (loading) return;
|
|
746
899
|
if (disabled) return;
|
|
@@ -767,7 +920,7 @@ var CancelButton = ({
|
|
|
767
920
|
currentLoadingSize = 14;
|
|
768
921
|
currentHeightClassName = "h-8";
|
|
769
922
|
}
|
|
770
|
-
return /* @__PURE__ */ (0,
|
|
923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
771
924
|
"button",
|
|
772
925
|
{
|
|
773
926
|
className: `border border-catchup-gray-400 bg-catchup-white text-catchup-gray-600 rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-gray-400 hover:text-catchup-white hover:border-catchup-gray-400 active:bg-catchup-gray-500 active:border-catchup-gray-500 active:text-catchup-white"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
@@ -778,7 +931,7 @@ var CancelButton = ({
|
|
|
778
931
|
onMouseLeave: () => {
|
|
779
932
|
setIsHovered(false);
|
|
780
933
|
},
|
|
781
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
934
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
782
935
|
BaseLoading_default,
|
|
783
936
|
{
|
|
784
937
|
height: currentLoadingSize,
|
|
@@ -786,8 +939,8 @@ var CancelButton = ({
|
|
|
786
939
|
primaryColor: "#55777f",
|
|
787
940
|
secondaryColor: "#55777f"
|
|
788
941
|
}
|
|
789
|
-
) : /* @__PURE__ */ (0,
|
|
790
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
942
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2", children: [
|
|
943
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
791
944
|
BaseImage_default,
|
|
792
945
|
{
|
|
793
946
|
src: `${isHovered ? "/icons/cancel-button-arrow-left-white.webp" : "/icons/cancel-button-arrow-left.webp"}`,
|
|
@@ -795,8 +948,8 @@ var CancelButton = ({
|
|
|
795
948
|
size: "xsmall"
|
|
796
949
|
}
|
|
797
950
|
) : null,
|
|
798
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
799
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
951
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "", children: title }),
|
|
952
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
800
953
|
BaseImage_default,
|
|
801
954
|
{
|
|
802
955
|
src: `${isHovered ? "/icons/cancel-button-arrow-left-white.webp" : "/icons/cancel-button-arrow-left.webp"}`,
|
|
@@ -811,8 +964,8 @@ var CancelButton = ({
|
|
|
811
964
|
var CancelButton_default = CancelButton;
|
|
812
965
|
|
|
813
966
|
// src/components/buttons/ApproveButton.tsx
|
|
814
|
-
var
|
|
815
|
-
var
|
|
967
|
+
var import_react8 = require("react");
|
|
968
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
816
969
|
var ApproveButton = ({
|
|
817
970
|
title,
|
|
818
971
|
size,
|
|
@@ -822,7 +975,7 @@ var ApproveButton = ({
|
|
|
822
975
|
textOnly,
|
|
823
976
|
iconOnly
|
|
824
977
|
}) => {
|
|
825
|
-
const [loading, setLoading] = (0,
|
|
978
|
+
const [loading, setLoading] = (0, import_react8.useState)(false);
|
|
826
979
|
const internalOnClick = () => __async(void 0, null, function* () {
|
|
827
980
|
if (loading) return;
|
|
828
981
|
if (disabled) return;
|
|
@@ -849,12 +1002,12 @@ var ApproveButton = ({
|
|
|
849
1002
|
currentLoadingSize = 14;
|
|
850
1003
|
currentHeightClassName = "h-8";
|
|
851
1004
|
}
|
|
852
|
-
return /* @__PURE__ */ (0,
|
|
1005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
853
1006
|
"button",
|
|
854
1007
|
{
|
|
855
1008
|
className: `border border-catchup-green bg-catchup-green text-catchup-white rounded-catchup-button ${loading ? "" : disabled ? "opacity-50" : "hover:bg-catchup-hover-green active:bg-catchup-green"} transition duration-300 ${currentWidthClassName} ${currentHeightClassName}`,
|
|
856
1009
|
onClick: internalOnClick,
|
|
857
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
1010
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
858
1011
|
BaseLoading_default,
|
|
859
1012
|
{
|
|
860
1013
|
height: currentLoadingSize,
|
|
@@ -862,8 +1015,8 @@ var ApproveButton = ({
|
|
|
862
1015
|
primaryColor: "#ffffff",
|
|
863
1016
|
secondaryColor: "#ffffff"
|
|
864
1017
|
}
|
|
865
|
-
) : /* @__PURE__ */ (0,
|
|
866
|
-
iconPosition === "left" ? /* @__PURE__ */ (0,
|
|
1018
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-row justify-center items-center gap-x-2 px-4", children: [
|
|
1019
|
+
iconPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
867
1020
|
BaseImage_default,
|
|
868
1021
|
{
|
|
869
1022
|
src: "/icons/primary-button-arrow-left.webp",
|
|
@@ -871,8 +1024,8 @@ var ApproveButton = ({
|
|
|
871
1024
|
size: "xsmall"
|
|
872
1025
|
}
|
|
873
1026
|
) : null,
|
|
874
|
-
iconOnly ? null : /* @__PURE__ */ (0,
|
|
875
|
-
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0,
|
|
1027
|
+
iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "", children: title }),
|
|
1028
|
+
textOnly || iconPosition === "left" ? null : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
876
1029
|
BaseImage_default,
|
|
877
1030
|
{
|
|
878
1031
|
src: "/icons/primary-button-arrow-right.webp",
|
|
@@ -887,7 +1040,7 @@ var ApproveButton = ({
|
|
|
887
1040
|
var ApproveButton_default = ApproveButton;
|
|
888
1041
|
|
|
889
1042
|
// src/components/cards/FullCard.tsx
|
|
890
|
-
var
|
|
1043
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
891
1044
|
var FullCard = ({
|
|
892
1045
|
bgColor,
|
|
893
1046
|
opacity,
|
|
@@ -895,11 +1048,11 @@ var FullCard = ({
|
|
|
895
1048
|
usePadding,
|
|
896
1049
|
children
|
|
897
1050
|
}) => {
|
|
898
|
-
return /* @__PURE__ */ (0,
|
|
1051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col justify-center items-center h-full", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
899
1052
|
"div",
|
|
900
1053
|
{
|
|
901
1054
|
className: `flex-1 ${bgColor ? bgColor : ""} ${opacity ? opacity : "opacity-100"} rounded-catchup-xlarge w-full border border-catchup-gray-50 bg-catchup-white`,
|
|
902
|
-
children: /* @__PURE__ */ (0,
|
|
1055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
903
1056
|
"div",
|
|
904
1057
|
{
|
|
905
1058
|
className: `flex flex-col mx-auto ${usePadding === false ? "p-0" : "p-6"} h-full`,
|
|
@@ -912,7 +1065,7 @@ var FullCard = ({
|
|
|
912
1065
|
var FullCard_default = FullCard;
|
|
913
1066
|
|
|
914
1067
|
// src/components/loading/BaseLoadingWithText.tsx
|
|
915
|
-
var
|
|
1068
|
+
var import_react9 = require("react");
|
|
916
1069
|
|
|
917
1070
|
// src/language/i18n.ts
|
|
918
1071
|
var import_i18next = __toESM(require("i18next"));
|
|
@@ -921,19 +1074,19 @@ import_i18next.default.use(import_react_i18next.initReactI18next);
|
|
|
921
1074
|
var i18n_default = import_i18next.default;
|
|
922
1075
|
|
|
923
1076
|
// src/components/loading/BaseLoadingWithText.tsx
|
|
924
|
-
var
|
|
1077
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
925
1078
|
var BaseLoadingWithText = (props) => {
|
|
926
1079
|
const { height, width, size, primaryColor, secondaryColor, hideText } = props;
|
|
927
|
-
const [initialTimestamp, setInitialTimestamp] = (0,
|
|
1080
|
+
const [initialTimestamp, setInitialTimestamp] = (0, import_react9.useState)(
|
|
928
1081
|
(/* @__PURE__ */ new Date()).getTime()
|
|
929
1082
|
);
|
|
930
|
-
const [currentTimestamp, setCurrentTimeStamp] = (0,
|
|
1083
|
+
const [currentTimestamp, setCurrentTimeStamp] = (0, import_react9.useState)(
|
|
931
1084
|
(/* @__PURE__ */ new Date()).getTime()
|
|
932
1085
|
);
|
|
933
1086
|
let timerId;
|
|
934
1087
|
let textClassName;
|
|
935
1088
|
let textWidth;
|
|
936
|
-
(0,
|
|
1089
|
+
(0, import_react9.useEffect)(() => {
|
|
937
1090
|
timerId = setInterval(() => {
|
|
938
1091
|
setCurrentTimeStamp((/* @__PURE__ */ new Date()).getTime());
|
|
939
1092
|
}, 1e3);
|
|
@@ -969,8 +1122,8 @@ var BaseLoadingWithText = (props) => {
|
|
|
969
1122
|
textWidth = 250;
|
|
970
1123
|
}
|
|
971
1124
|
const loadingText = retrieveLoadingText();
|
|
972
|
-
return /* @__PURE__ */ (0,
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
1125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col justify-center items-center", children: [
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
974
1127
|
BaseLoading_default,
|
|
975
1128
|
{
|
|
976
1129
|
height,
|
|
@@ -980,12 +1133,12 @@ var BaseLoadingWithText = (props) => {
|
|
|
980
1133
|
secondaryColor
|
|
981
1134
|
}
|
|
982
1135
|
),
|
|
983
|
-
!hideText && size !== "small" ? /* @__PURE__ */ (0,
|
|
1136
|
+
!hideText && size !== "small" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
984
1137
|
"div",
|
|
985
1138
|
{
|
|
986
1139
|
className: `${textClassName} text-center`,
|
|
987
1140
|
style: { width: textWidth },
|
|
988
|
-
children: /* @__PURE__ */ (0,
|
|
1141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "font-bold", children: loadingText })
|
|
989
1142
|
}
|
|
990
1143
|
) : null
|
|
991
1144
|
] });
|
|
@@ -994,7 +1147,7 @@ var BaseLoadingWithText_default = BaseLoadingWithText;
|
|
|
994
1147
|
|
|
995
1148
|
// src/components/modals/BaseModal.tsx
|
|
996
1149
|
var import_react_modal = __toESM(require("react-modal"));
|
|
997
|
-
var
|
|
1150
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
998
1151
|
var BaseModal = ({
|
|
999
1152
|
isOpen,
|
|
1000
1153
|
size,
|
|
@@ -1003,7 +1156,7 @@ var BaseModal = ({
|
|
|
1003
1156
|
customSize,
|
|
1004
1157
|
children
|
|
1005
1158
|
}) => {
|
|
1006
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1007
1160
|
import_react_modal.default,
|
|
1008
1161
|
{
|
|
1009
1162
|
isOpen,
|
|
@@ -1031,7 +1184,7 @@ var BaseModal = ({
|
|
|
1031
1184
|
}
|
|
1032
1185
|
},
|
|
1033
1186
|
contentLabel: "",
|
|
1034
|
-
children: customSize ? /* @__PURE__ */ (0,
|
|
1187
|
+
children: customSize ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: `${customSize} font-quicksand`, children }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1035
1188
|
"div",
|
|
1036
1189
|
{
|
|
1037
1190
|
className: `font-quicksand ${size === "small" ? "w-[600px]" : size === "medium" ? "w-[900px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"}`,
|
|
@@ -1044,14 +1197,14 @@ var BaseModal = ({
|
|
|
1044
1197
|
var BaseModal_default = BaseModal;
|
|
1045
1198
|
|
|
1046
1199
|
// src/components/activities/empty-content/ActivityEmptyContent.tsx
|
|
1047
|
-
var
|
|
1200
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1048
1201
|
var ActivityEmptyContent = () => {
|
|
1049
|
-
return /* @__PURE__ */ (0,
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col items-center justify-center border-2 border-catchup-orange rounded-catchup-xlarge px-5 py-2 my-5 bg-catchup-orange", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-catchup-white text-xl", children: i18n_default.t("you_have_set_this_activity_as_empty") }) }) });
|
|
1050
1203
|
};
|
|
1051
1204
|
var ActivityEmptyContent_default = ActivityEmptyContent;
|
|
1052
1205
|
|
|
1053
1206
|
// src/components/activities/body-content/ShowBodyMediaByContentType.tsx
|
|
1054
|
-
var
|
|
1207
|
+
var import_react10 = require("react");
|
|
1055
1208
|
var import_react_modal2 = __toESM(require("react-modal"));
|
|
1056
1209
|
|
|
1057
1210
|
// src/utilization/CatchtivityUtilization.ts
|
|
@@ -3120,15 +3273,15 @@ var constructActivityItemListSolutionOnly = (solutionMap) => {
|
|
|
3120
3273
|
|
|
3121
3274
|
// src/components/activities/body-content/ShowBodyMediaByContentType.tsx
|
|
3122
3275
|
var import_react_katex = require("react-katex");
|
|
3123
|
-
var
|
|
3276
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3124
3277
|
var ShowBodyMediaByContentType = ({
|
|
3125
3278
|
index,
|
|
3126
3279
|
type,
|
|
3127
3280
|
value,
|
|
3128
3281
|
size
|
|
3129
3282
|
}) => {
|
|
3130
|
-
const [showFullScreen, setShowFullScreen] = (0,
|
|
3131
|
-
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0,
|
|
3283
|
+
const [showFullScreen, setShowFullScreen] = (0, import_react10.useState)(false);
|
|
3284
|
+
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react10.useState)("");
|
|
3132
3285
|
const convertToPercentage = (size2) => {
|
|
3133
3286
|
switch (size2) {
|
|
3134
3287
|
case "1/3":
|
|
@@ -3142,11 +3295,11 @@ var ShowBodyMediaByContentType = ({
|
|
|
3142
3295
|
}
|
|
3143
3296
|
};
|
|
3144
3297
|
const renderSpecialExpressions = (inputPart, partIndex, parentKey) => {
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
3298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3146
3299
|
"span",
|
|
3147
3300
|
{
|
|
3148
3301
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3149
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
3302
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3150
3303
|
},
|
|
3151
3304
|
`${parentKey}-expr-${partIndex}`
|
|
3152
3305
|
);
|
|
@@ -3166,7 +3319,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3166
3319
|
};
|
|
3167
3320
|
const renderTextContent = (text, itemKey) => {
|
|
3168
3321
|
const balancedText = balanceSpecialChars(text);
|
|
3169
|
-
return /* @__PURE__ */ (0,
|
|
3322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3170
3323
|
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
3171
3324
|
) }, itemKey);
|
|
3172
3325
|
};
|
|
@@ -3199,7 +3352,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3199
3352
|
currentIndex++;
|
|
3200
3353
|
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3201
3354
|
valuePartList.push(
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3355
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl font-bold whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3203
3356
|
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
3204
3357
|
) }, itemKey)
|
|
3205
3358
|
);
|
|
@@ -3219,7 +3372,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3219
3372
|
if (textBeforeTag.trim() !== "") {
|
|
3220
3373
|
currentIndex++;
|
|
3221
3374
|
valuePartList.push(
|
|
3222
|
-
/* @__PURE__ */ (0,
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3223
3376
|
"p",
|
|
3224
3377
|
{
|
|
3225
3378
|
className: "text-xl",
|
|
@@ -3238,12 +3391,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3238
3391
|
);
|
|
3239
3392
|
currentIndex++;
|
|
3240
3393
|
valuePartList.push(
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3394
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3242
3395
|
"div",
|
|
3243
3396
|
{
|
|
3244
3397
|
className: "relative w-[200px]",
|
|
3245
3398
|
children: [
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3247
3400
|
BaseImage_default,
|
|
3248
3401
|
{
|
|
3249
3402
|
src: imageSource,
|
|
@@ -3252,12 +3405,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3252
3405
|
className: "rounded-catchup-xlarge"
|
|
3253
3406
|
}
|
|
3254
3407
|
),
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3408
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3256
3409
|
"div",
|
|
3257
3410
|
{
|
|
3258
3411
|
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",
|
|
3259
3412
|
onClick: () => handleOpenFullScreen(imageSource),
|
|
3260
|
-
children: /* @__PURE__ */ (0,
|
|
3413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3261
3414
|
BaseImage_default,
|
|
3262
3415
|
{
|
|
3263
3416
|
src: "/icons/arrow-up.webp",
|
|
@@ -3286,7 +3439,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3286
3439
|
if (textBeforeTag.trim() !== "") {
|
|
3287
3440
|
currentIndex++;
|
|
3288
3441
|
valuePartList.push(
|
|
3289
|
-
/* @__PURE__ */ (0,
|
|
3442
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3290
3443
|
"p",
|
|
3291
3444
|
{
|
|
3292
3445
|
className: "text-xl",
|
|
@@ -3305,7 +3458,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3305
3458
|
);
|
|
3306
3459
|
currentIndex++;
|
|
3307
3460
|
valuePartList.push(
|
|
3308
|
-
/* @__PURE__ */ (0,
|
|
3461
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3309
3462
|
"video",
|
|
3310
3463
|
{
|
|
3311
3464
|
src: videoSource,
|
|
@@ -3328,7 +3481,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3328
3481
|
if (textBeforeTag.trim() !== "") {
|
|
3329
3482
|
currentIndex++;
|
|
3330
3483
|
valuePartList.push(
|
|
3331
|
-
/* @__PURE__ */ (0,
|
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3332
3485
|
"p",
|
|
3333
3486
|
{
|
|
3334
3487
|
className: "text-xl",
|
|
@@ -3347,7 +3500,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3347
3500
|
);
|
|
3348
3501
|
currentIndex++;
|
|
3349
3502
|
valuePartList.push(
|
|
3350
|
-
/* @__PURE__ */ (0,
|
|
3503
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3351
3504
|
"audio",
|
|
3352
3505
|
{
|
|
3353
3506
|
src: audioSource,
|
|
@@ -3373,13 +3526,13 @@ var ShowBodyMediaByContentType = ({
|
|
|
3373
3526
|
if (regexMatchImageText) {
|
|
3374
3527
|
const imageText = regexMatchImageText[1];
|
|
3375
3528
|
valuePartList.push(
|
|
3376
|
-
/* @__PURE__ */ (0,
|
|
3529
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3377
3530
|
"div",
|
|
3378
3531
|
{
|
|
3379
3532
|
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3380
3533
|
children: [
|
|
3381
|
-
/* @__PURE__ */ (0,
|
|
3382
|
-
/* @__PURE__ */ (0,
|
|
3534
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3535
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: imageText })
|
|
3383
3536
|
]
|
|
3384
3537
|
},
|
|
3385
3538
|
`img-desc-${index}-${currentIndex}`
|
|
@@ -3393,7 +3546,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3393
3546
|
return valuePartList;
|
|
3394
3547
|
};
|
|
3395
3548
|
const RenderShowFullScreenItem = () => {
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3397
3550
|
import_react_modal2.default,
|
|
3398
3551
|
{
|
|
3399
3552
|
isOpen: showFullScreen,
|
|
@@ -3422,8 +3575,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
3422
3575
|
}
|
|
3423
3576
|
},
|
|
3424
3577
|
contentLabel: "Image Fullscreen View",
|
|
3425
|
-
children: /* @__PURE__ */ (0,
|
|
3426
|
-
/* @__PURE__ */ (0,
|
|
3578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
3579
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3427
3580
|
BaseImage_default,
|
|
3428
3581
|
{
|
|
3429
3582
|
src: "/icons/cross-red.webp",
|
|
@@ -3435,7 +3588,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3435
3588
|
}
|
|
3436
3589
|
}
|
|
3437
3590
|
) }),
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3591
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center h-[500]", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3439
3592
|
BaseImage_default,
|
|
3440
3593
|
{
|
|
3441
3594
|
src: selectedFullScreenItem,
|
|
@@ -3451,16 +3604,16 @@ var ShowBodyMediaByContentType = ({
|
|
|
3451
3604
|
const RenderMainContent = () => {
|
|
3452
3605
|
switch (type) {
|
|
3453
3606
|
case "TEXT":
|
|
3454
|
-
return /* @__PURE__ */ (0,
|
|
3607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-3 flex flex-row flex-wrap items-center mx-auto w-full", children: retrieveValueParts(value) });
|
|
3455
3608
|
case "IMAGE":
|
|
3456
|
-
return /* @__PURE__ */ (0,
|
|
3609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-3 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3457
3610
|
"div",
|
|
3458
3611
|
{
|
|
3459
3612
|
className: `${convertToPercentage(
|
|
3460
3613
|
size || ""
|
|
3461
3614
|
)} rounded-catchup-xlarge relative`,
|
|
3462
3615
|
children: [
|
|
3463
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3464
3617
|
BaseImage_default,
|
|
3465
3618
|
{
|
|
3466
3619
|
src: value,
|
|
@@ -3469,12 +3622,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3469
3622
|
className: "w-full rounded-catchup-xlarge"
|
|
3470
3623
|
}
|
|
3471
3624
|
),
|
|
3472
|
-
/* @__PURE__ */ (0,
|
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3473
3626
|
"div",
|
|
3474
3627
|
{
|
|
3475
3628
|
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",
|
|
3476
3629
|
onClick: () => handleOpenFullScreen(value),
|
|
3477
|
-
children: /* @__PURE__ */ (0,
|
|
3630
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3478
3631
|
BaseImage_default,
|
|
3479
3632
|
{
|
|
3480
3633
|
src: "/icons/arrow-up.webp",
|
|
@@ -3489,7 +3642,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3489
3642
|
}
|
|
3490
3643
|
) });
|
|
3491
3644
|
case "VIDEO":
|
|
3492
|
-
return /* @__PURE__ */ (0,
|
|
3645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3493
3646
|
"video",
|
|
3494
3647
|
{
|
|
3495
3648
|
src: value,
|
|
@@ -3500,12 +3653,12 @@ var ShowBodyMediaByContentType = ({
|
|
|
3500
3653
|
}
|
|
3501
3654
|
) });
|
|
3502
3655
|
case "AUDIO":
|
|
3503
|
-
return /* @__PURE__ */ (0,
|
|
3656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3504
3657
|
default:
|
|
3505
3658
|
return null;
|
|
3506
3659
|
}
|
|
3507
3660
|
};
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "w-full", children: [
|
|
3509
3662
|
RenderShowFullScreenItem(),
|
|
3510
3663
|
RenderMainContent()
|
|
3511
3664
|
] }, `body-content-${index}`);
|
|
@@ -3513,7 +3666,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3513
3666
|
var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
|
|
3514
3667
|
|
|
3515
3668
|
// src/components/activities/body-content/ActivityBodyContent.tsx
|
|
3516
|
-
var
|
|
3669
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3517
3670
|
var ActivityBodyContent = ({
|
|
3518
3671
|
templateType,
|
|
3519
3672
|
bodyMap,
|
|
@@ -3594,7 +3747,7 @@ var ActivityBodyContent = ({
|
|
|
3594
3747
|
key
|
|
3595
3748
|
});
|
|
3596
3749
|
}).filter(Boolean);
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
3750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-col justify-center items-center", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3598
3751
|
ShowBodyMediaByContentType_default,
|
|
3599
3752
|
{
|
|
3600
3753
|
index,
|
|
@@ -3608,16 +3761,16 @@ var ActivityBodyContent = ({
|
|
|
3608
3761
|
var ActivityBodyContent_default = ActivityBodyContent;
|
|
3609
3762
|
|
|
3610
3763
|
// src/components/dividers/DividerLine.tsx
|
|
3611
|
-
var
|
|
3764
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3612
3765
|
var DividerLine = () => {
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-catchup-gray-50 h-[1px] w-full my-3" });
|
|
3614
3767
|
};
|
|
3615
3768
|
var DividerLine_default = DividerLine;
|
|
3616
3769
|
|
|
3617
3770
|
// src/components/dividers/VerticalDividerLine.tsx
|
|
3618
|
-
var
|
|
3771
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3619
3772
|
var VerticalDividerLine = () => {
|
|
3620
|
-
return /* @__PURE__ */ (0,
|
|
3773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-catchup-gray-50 h-full w-[1px] mx-3" });
|
|
3621
3774
|
};
|
|
3622
3775
|
var VerticalDividerLine_default = VerticalDividerLine;
|
|
3623
3776
|
|
|
@@ -3626,8 +3779,8 @@ var import_react_katex2 = require("react-katex");
|
|
|
3626
3779
|
|
|
3627
3780
|
// src/components/groups/InputGroup.tsx
|
|
3628
3781
|
var import_react_select = __toESM(require("react-select"));
|
|
3629
|
-
var
|
|
3630
|
-
var
|
|
3782
|
+
var import_react11 = require("react");
|
|
3783
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3631
3784
|
var InputGroup = ({
|
|
3632
3785
|
type,
|
|
3633
3786
|
title,
|
|
@@ -3648,12 +3801,12 @@ var InputGroup = ({
|
|
|
3648
3801
|
limit,
|
|
3649
3802
|
useMath
|
|
3650
3803
|
}) => {
|
|
3651
|
-
const textAreaRef = (0,
|
|
3652
|
-
const latexTextAreaRef = (0,
|
|
3653
|
-
const [showMathConstructor, setShowMathConstructor] = (0,
|
|
3654
|
-
const [mathValue, setMathValue] = (0,
|
|
3655
|
-
const mathFieldRef = (0,
|
|
3656
|
-
(0,
|
|
3804
|
+
const textAreaRef = (0, import_react11.useRef)(null);
|
|
3805
|
+
const latexTextAreaRef = (0, import_react11.useRef)(null);
|
|
3806
|
+
const [showMathConstructor, setShowMathConstructor] = (0, import_react11.useState)(false);
|
|
3807
|
+
const [mathValue, setMathValue] = (0, import_react11.useState)("");
|
|
3808
|
+
const mathFieldRef = (0, import_react11.useRef)(null);
|
|
3809
|
+
(0, import_react11.useEffect)(() => {
|
|
3657
3810
|
if (!textAreaRef) return;
|
|
3658
3811
|
if (!textAreaRef.current) return;
|
|
3659
3812
|
if (value) {
|
|
@@ -3662,7 +3815,7 @@ var InputGroup = ({
|
|
|
3662
3815
|
textAreaRef.current.style.height = `44px`;
|
|
3663
3816
|
}
|
|
3664
3817
|
}, [textAreaRef, value]);
|
|
3665
|
-
(0,
|
|
3818
|
+
(0, import_react11.useEffect)(() => {
|
|
3666
3819
|
if (!latexTextAreaRef) return;
|
|
3667
3820
|
if (!latexTextAreaRef.current) return;
|
|
3668
3821
|
if (value) {
|
|
@@ -3671,7 +3824,7 @@ var InputGroup = ({
|
|
|
3671
3824
|
latexTextAreaRef.current.style.height = `44px`;
|
|
3672
3825
|
}
|
|
3673
3826
|
}, [latexTextAreaRef, value]);
|
|
3674
|
-
(0,
|
|
3827
|
+
(0, import_react11.useEffect)(() => {
|
|
3675
3828
|
if (!useMath) return;
|
|
3676
3829
|
import("mathlive").then(({ MathfieldElement }) => {
|
|
3677
3830
|
if (!customElements.get("math-field")) {
|
|
@@ -3706,7 +3859,7 @@ var InputGroup = ({
|
|
|
3706
3859
|
onChange && onChange(e);
|
|
3707
3860
|
}
|
|
3708
3861
|
};
|
|
3709
|
-
const handleMathFieldChange = (0,
|
|
3862
|
+
const handleMathFieldChange = (0, import_react11.useCallback)(() => {
|
|
3710
3863
|
if (!mathFieldRef.current) return;
|
|
3711
3864
|
const latexValue = mathFieldRef.current.value;
|
|
3712
3865
|
const wasFocused = mathFieldRef.current === document.activeElement;
|
|
@@ -3729,7 +3882,7 @@ var InputGroup = ({
|
|
|
3729
3882
|
setShowMathConstructor(true);
|
|
3730
3883
|
};
|
|
3731
3884
|
const MathConstructorModal = () => {
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3733
3886
|
BaseModal_default,
|
|
3734
3887
|
{
|
|
3735
3888
|
isOpen: showMathConstructor,
|
|
@@ -3739,10 +3892,10 @@ var InputGroup = ({
|
|
|
3739
3892
|
setShowMathConstructor(false);
|
|
3740
3893
|
},
|
|
3741
3894
|
size: "large",
|
|
3742
|
-
children: /* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FullCard_default, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "bg-white rounded-lg overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "p-6 space-y-6", children: [
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: i18n_default.t("math_editor") }),
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)(
|
|
3746
3899
|
"math-field",
|
|
3747
3900
|
{
|
|
3748
3901
|
ref: mathFieldRef,
|
|
@@ -3769,10 +3922,10 @@ var InputGroup = ({
|
|
|
3769
3922
|
}
|
|
3770
3923
|
) })
|
|
3771
3924
|
] }),
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: i18n_default.t("latex_output") }),
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3776
3929
|
"textarea",
|
|
3777
3930
|
{
|
|
3778
3931
|
ref: latexTextAreaRef,
|
|
@@ -3782,7 +3935,7 @@ var InputGroup = ({
|
|
|
3782
3935
|
placeholder: i18n_default.t("latex_will_appear_here")
|
|
3783
3936
|
}
|
|
3784
3937
|
),
|
|
3785
|
-
/* @__PURE__ */ (0,
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3786
3939
|
"button",
|
|
3787
3940
|
{
|
|
3788
3941
|
onClick: handleCopyLatex,
|
|
@@ -3798,13 +3951,13 @@ var InputGroup = ({
|
|
|
3798
3951
|
);
|
|
3799
3952
|
};
|
|
3800
3953
|
const CheckboxInputGroup = () => {
|
|
3801
|
-
return /* @__PURE__ */ (0,
|
|
3954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3802
3955
|
"div",
|
|
3803
3956
|
{
|
|
3804
3957
|
className: "flex flex-row items-center gap-x-1 cursor-pointer",
|
|
3805
3958
|
onClick,
|
|
3806
3959
|
children: [
|
|
3807
|
-
/* @__PURE__ */ (0,
|
|
3960
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3808
3961
|
BaseImage_default,
|
|
3809
3962
|
{
|
|
3810
3963
|
src: value ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -3814,15 +3967,15 @@ var InputGroup = ({
|
|
|
3814
3967
|
}
|
|
3815
3968
|
}
|
|
3816
3969
|
),
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3970
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "", children: title })
|
|
3818
3971
|
]
|
|
3819
3972
|
}
|
|
3820
3973
|
);
|
|
3821
3974
|
};
|
|
3822
3975
|
const FileInputGroup = () => {
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
3824
|
-
title ? /* @__PURE__ */ (0,
|
|
3825
|
-
/* @__PURE__ */ (0,
|
|
3976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "my-1", children: [
|
|
3977
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
3978
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3826
3979
|
"input",
|
|
3827
3980
|
{
|
|
3828
3981
|
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",
|
|
@@ -3839,9 +3992,9 @@ var InputGroup = ({
|
|
|
3839
3992
|
] });
|
|
3840
3993
|
};
|
|
3841
3994
|
const DateInputGroup = () => {
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
3843
|
-
title ? /* @__PURE__ */ (0,
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
3995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "my-1", children: [
|
|
3996
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
3997
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3845
3998
|
"input",
|
|
3846
3999
|
{
|
|
3847
4000
|
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`,
|
|
@@ -3856,9 +4009,9 @@ var InputGroup = ({
|
|
|
3856
4009
|
] });
|
|
3857
4010
|
};
|
|
3858
4011
|
const SearchableSelectInputGroup = () => {
|
|
3859
|
-
return /* @__PURE__ */ (0,
|
|
3860
|
-
title ? /* @__PURE__ */ (0,
|
|
3861
|
-
/* @__PURE__ */ (0,
|
|
4012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "my-1", children: [
|
|
4013
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400 ", children: title }) : null,
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3862
4015
|
import_react_select.default,
|
|
3863
4016
|
{
|
|
3864
4017
|
options: convertOptionListToSelectComponent(
|
|
@@ -3921,16 +4074,16 @@ var InputGroup = ({
|
|
|
3921
4074
|
] });
|
|
3922
4075
|
};
|
|
3923
4076
|
const TextAreaInputGroup = () => {
|
|
3924
|
-
return /* @__PURE__ */ (0,
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
3926
|
-
/* @__PURE__ */ (0,
|
|
3927
|
-
/* @__PURE__ */ (0,
|
|
4077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "my-1 flex-1 flex flex-col relative", children: [
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
4080
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: value && limit ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
3928
4081
|
value.length,
|
|
3929
4082
|
" / ",
|
|
3930
4083
|
limit
|
|
3931
4084
|
] }) : null })
|
|
3932
4085
|
] }),
|
|
3933
|
-
/* @__PURE__ */ (0,
|
|
4086
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3934
4087
|
"textarea",
|
|
3935
4088
|
{
|
|
3936
4089
|
ref: textAreaRef,
|
|
@@ -3943,22 +4096,22 @@ var InputGroup = ({
|
|
|
3943
4096
|
onKeyDown
|
|
3944
4097
|
}
|
|
3945
4098
|
),
|
|
3946
|
-
useMath && /* @__PURE__ */ (0,
|
|
4099
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3947
4100
|
"button",
|
|
3948
4101
|
{
|
|
3949
4102
|
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",
|
|
3950
4103
|
onClick: handleOpenMathConstructor,
|
|
3951
4104
|
type: "button",
|
|
3952
|
-
children: /* @__PURE__ */ (0,
|
|
3953
|
-
/* @__PURE__ */ (0,
|
|
3954
|
-
/* @__PURE__ */ (0,
|
|
4105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4107
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3955
4108
|
"svg",
|
|
3956
4109
|
{
|
|
3957
4110
|
className: "w-3 h-3",
|
|
3958
4111
|
fill: "none",
|
|
3959
4112
|
stroke: "currentColor",
|
|
3960
4113
|
viewBox: "0 0 24 24",
|
|
3961
|
-
children: /* @__PURE__ */ (0,
|
|
4114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3962
4115
|
"path",
|
|
3963
4116
|
{
|
|
3964
4117
|
strokeLinecap: "round",
|
|
@@ -3975,13 +4128,13 @@ var InputGroup = ({
|
|
|
3975
4128
|
] });
|
|
3976
4129
|
};
|
|
3977
4130
|
const TextInputGroup = () => {
|
|
3978
|
-
return /* @__PURE__ */ (0,
|
|
3979
|
-
title ? /* @__PURE__ */ (0,
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
4131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "my-1 relative", children: [
|
|
4132
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
4133
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3981
4134
|
"div",
|
|
3982
4135
|
{
|
|
3983
4136
|
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-white"}`,
|
|
3984
|
-
children: /* @__PURE__ */ (0,
|
|
4137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3985
4138
|
"input",
|
|
3986
4139
|
{
|
|
3987
4140
|
disabled,
|
|
@@ -3997,22 +4150,22 @@ var InputGroup = ({
|
|
|
3997
4150
|
)
|
|
3998
4151
|
}
|
|
3999
4152
|
),
|
|
4000
|
-
useMath && /* @__PURE__ */ (0,
|
|
4153
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4001
4154
|
"button",
|
|
4002
4155
|
{
|
|
4003
4156
|
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",
|
|
4004
4157
|
onClick: handleOpenMathConstructor,
|
|
4005
4158
|
type: "button",
|
|
4006
|
-
children: /* @__PURE__ */ (0,
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4008
|
-
/* @__PURE__ */ (0,
|
|
4159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4161
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4009
4162
|
"svg",
|
|
4010
4163
|
{
|
|
4011
4164
|
className: "w-3 h-3",
|
|
4012
4165
|
fill: "none",
|
|
4013
4166
|
stroke: "currentColor",
|
|
4014
4167
|
viewBox: "0 0 24 24",
|
|
4015
|
-
children: /* @__PURE__ */ (0,
|
|
4168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4016
4169
|
"path",
|
|
4017
4170
|
{
|
|
4018
4171
|
strokeLinecap: "round",
|
|
@@ -4045,16 +4198,16 @@ var InputGroup = ({
|
|
|
4045
4198
|
return CheckboxInputGroup();
|
|
4046
4199
|
}
|
|
4047
4200
|
};
|
|
4048
|
-
return /* @__PURE__ */ (0,
|
|
4201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
4049
4202
|
RenderMainContent(),
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MathConstructorModal, {})
|
|
4051
4204
|
] });
|
|
4052
4205
|
};
|
|
4053
4206
|
var InputGroup_default = InputGroup;
|
|
4054
4207
|
|
|
4055
4208
|
// src/components/activities/material-content/DropdownActivityMaterialContent.tsx
|
|
4056
|
-
var import_react13 = require("react");
|
|
4057
4209
|
var import_react14 = require("react");
|
|
4210
|
+
var import_react15 = require("react");
|
|
4058
4211
|
|
|
4059
4212
|
// src/utilization/AppUtilization.ts
|
|
4060
4213
|
var colors = [
|
|
@@ -4154,11 +4307,11 @@ var getColorByIndex = (index) => {
|
|
|
4154
4307
|
};
|
|
4155
4308
|
|
|
4156
4309
|
// src/components/dropdowns/MediaDropdown.tsx
|
|
4157
|
-
var
|
|
4158
|
-
var
|
|
4310
|
+
var import_react12 = require("react");
|
|
4311
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4159
4312
|
var MediaDropdown = ({ id, answer, optionList }) => {
|
|
4160
|
-
const [showDropdown, setShowDropdown] = (0,
|
|
4161
|
-
return /* @__PURE__ */ (0,
|
|
4313
|
+
const [showDropdown, setShowDropdown] = (0, import_react12.useState)(false);
|
|
4314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4162
4315
|
"div",
|
|
4163
4316
|
{
|
|
4164
4317
|
className: "w-full relative",
|
|
@@ -4169,17 +4322,17 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4169
4322
|
setShowDropdown(false);
|
|
4170
4323
|
},
|
|
4171
4324
|
children: [
|
|
4172
|
-
/* @__PURE__ */ (0,
|
|
4173
|
-
/* @__PURE__ */ (0,
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full flex flex-col items-center justify-center", children: answer }),
|
|
4326
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4174
4327
|
"ul",
|
|
4175
4328
|
{
|
|
4176
4329
|
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`,
|
|
4177
|
-
children: optionList.map((option, index) => /* @__PURE__ */ (0,
|
|
4330
|
+
children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4178
4331
|
"li",
|
|
4179
4332
|
{
|
|
4180
4333
|
className: `${option.listItemClassNames ? option.listItemClassNames : ""}`,
|
|
4181
4334
|
children: [
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4183
4336
|
"div",
|
|
4184
4337
|
{
|
|
4185
4338
|
className: `w-full flex flex-col my-2 ${option.divClassNames ? option.divClassNames : ""}`,
|
|
@@ -4187,7 +4340,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4187
4340
|
children: option.media
|
|
4188
4341
|
}
|
|
4189
4342
|
),
|
|
4190
|
-
index !== optionList.length - 1 ? /* @__PURE__ */ (0,
|
|
4343
|
+
index !== optionList.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-full border my-1 border-catchup-light-blue rounded-catchup-full" }) : null
|
|
4191
4344
|
]
|
|
4192
4345
|
},
|
|
4193
4346
|
option.id
|
|
@@ -4202,24 +4355,24 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4202
4355
|
var MediaDropdown_default = MediaDropdown;
|
|
4203
4356
|
|
|
4204
4357
|
// src/components/activities/material-content/ShowMaterialMediaByContentType.tsx
|
|
4205
|
-
var
|
|
4358
|
+
var import_react13 = require("react");
|
|
4206
4359
|
var import_react_modal3 = __toESM(require("react-modal"));
|
|
4207
|
-
var
|
|
4360
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4208
4361
|
var ShowMaterialMediaByContentType = ({
|
|
4209
4362
|
key,
|
|
4210
4363
|
contentType,
|
|
4211
4364
|
src,
|
|
4212
4365
|
canFullScreen
|
|
4213
4366
|
}) => {
|
|
4214
|
-
const [showFullScreen, setShowFullScreen] = (0,
|
|
4215
|
-
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0,
|
|
4216
|
-
const [isLoaded, setIsLoaded] = (0,
|
|
4217
|
-
const [isFullHeight, setIsFullHeight] = (0,
|
|
4218
|
-
const imageRef = (0,
|
|
4219
|
-
(0,
|
|
4367
|
+
const [showFullScreen, setShowFullScreen] = (0, import_react13.useState)(false);
|
|
4368
|
+
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react13.useState)(null);
|
|
4369
|
+
const [isLoaded, setIsLoaded] = (0, import_react13.useState)(false);
|
|
4370
|
+
const [isFullHeight, setIsFullHeight] = (0, import_react13.useState)(false);
|
|
4371
|
+
const imageRef = (0, import_react13.useRef)(null);
|
|
4372
|
+
(0, import_react13.useEffect)(() => {
|
|
4220
4373
|
setIsLoaded(false);
|
|
4221
4374
|
}, []);
|
|
4222
|
-
(0,
|
|
4375
|
+
(0, import_react13.useEffect)(() => {
|
|
4223
4376
|
if (!isLoaded) return;
|
|
4224
4377
|
if (!imageRef) return;
|
|
4225
4378
|
if (!imageRef.current) return;
|
|
@@ -4232,7 +4385,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4232
4385
|
}
|
|
4233
4386
|
}, [isLoaded, key]);
|
|
4234
4387
|
const RenderShowFullScreenItem = () => {
|
|
4235
|
-
return /* @__PURE__ */ (0,
|
|
4388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4236
4389
|
import_react_modal3.default,
|
|
4237
4390
|
{
|
|
4238
4391
|
isOpen: showFullScreen,
|
|
@@ -4263,8 +4416,8 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4263
4416
|
}
|
|
4264
4417
|
},
|
|
4265
4418
|
contentLabel: "",
|
|
4266
|
-
children: /* @__PURE__ */ (0,
|
|
4267
|
-
/* @__PURE__ */ (0,
|
|
4419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
4420
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4268
4421
|
BaseImage_default,
|
|
4269
4422
|
{
|
|
4270
4423
|
src: "/icons/cross-red.webp",
|
|
@@ -4276,7 +4429,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4276
4429
|
}
|
|
4277
4430
|
}
|
|
4278
4431
|
) }),
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4280
4433
|
BaseImage_default,
|
|
4281
4434
|
{
|
|
4282
4435
|
src: selectedFullScreenItem,
|
|
@@ -4289,14 +4442,14 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4289
4442
|
}
|
|
4290
4443
|
);
|
|
4291
4444
|
};
|
|
4292
|
-
return contentType === "IMAGE" ? /* @__PURE__ */ (0,
|
|
4445
|
+
return contentType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
4293
4446
|
RenderShowFullScreenItem(),
|
|
4294
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4295
4448
|
"div",
|
|
4296
4449
|
{
|
|
4297
4450
|
className: `${isFullHeight ? "h-catchup-activity-box-item" : "max-w-catchup-activity-box-item"} flex flex-col justify-center items-center relative`,
|
|
4298
4451
|
children: [
|
|
4299
|
-
/* @__PURE__ */ (0,
|
|
4452
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4300
4453
|
BaseImage_default,
|
|
4301
4454
|
{
|
|
4302
4455
|
src,
|
|
@@ -4309,7 +4462,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4309
4462
|
}
|
|
4310
4463
|
}
|
|
4311
4464
|
),
|
|
4312
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0,
|
|
4465
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4313
4466
|
"div",
|
|
4314
4467
|
{
|
|
4315
4468
|
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",
|
|
@@ -4321,7 +4474,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4321
4474
|
setShowFullScreen(true);
|
|
4322
4475
|
setSelectedFullScreenItem(src);
|
|
4323
4476
|
},
|
|
4324
|
-
children: /* @__PURE__ */ (0,
|
|
4477
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4325
4478
|
BaseImage_default,
|
|
4326
4479
|
{
|
|
4327
4480
|
src: "/icons/arrow-up.webp",
|
|
@@ -4335,7 +4488,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4335
4488
|
]
|
|
4336
4489
|
}
|
|
4337
4490
|
) }) })
|
|
4338
|
-
] }, key) : contentType === "VIDEO" ? /* @__PURE__ */ (0,
|
|
4491
|
+
] }, key) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4339
4492
|
"video",
|
|
4340
4493
|
{
|
|
4341
4494
|
className: "h-catchup-activity-box-item rounded-catchup-xlarge",
|
|
@@ -4344,7 +4497,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4344
4497
|
onClick: () => {
|
|
4345
4498
|
}
|
|
4346
4499
|
}
|
|
4347
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0,
|
|
4500
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4348
4501
|
"audio",
|
|
4349
4502
|
{
|
|
4350
4503
|
className: "h-catchup-activity-box-item rounded-catchup-xlarge",
|
|
@@ -4358,7 +4511,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4358
4511
|
var ShowMaterialMediaByContentType_default = ShowMaterialMediaByContentType;
|
|
4359
4512
|
|
|
4360
4513
|
// src/components/activities/material-content/DropdownActivityMaterialContent.tsx
|
|
4361
|
-
var
|
|
4514
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4362
4515
|
var DropdownActivityMaterialContent = ({
|
|
4363
4516
|
uniqueValue,
|
|
4364
4517
|
answer,
|
|
@@ -4369,8 +4522,8 @@ var DropdownActivityMaterialContent = ({
|
|
|
4369
4522
|
isPreview,
|
|
4370
4523
|
showCorrectAnswer
|
|
4371
4524
|
}) => {
|
|
4372
|
-
const [updated, setUpdated] = (0,
|
|
4373
|
-
(0,
|
|
4525
|
+
const [updated, setUpdated] = (0, import_react15.useState)(false);
|
|
4526
|
+
(0, import_react14.useEffect)(() => {
|
|
4374
4527
|
if (!showCorrectAnswer) return;
|
|
4375
4528
|
const foundAnswer = answer.data.find(
|
|
4376
4529
|
(answerData) => answerData.type === "DROPDOWN"
|
|
@@ -4383,7 +4536,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
4383
4536
|
onChange(answer, 0, Object.keys(materialMap[0])[0]);
|
|
4384
4537
|
setUpdated(true);
|
|
4385
4538
|
}, [showCorrectAnswer]);
|
|
4386
|
-
(0,
|
|
4539
|
+
(0, import_react14.useEffect)(() => {
|
|
4387
4540
|
if (!updated) return;
|
|
4388
4541
|
setUpdated(false);
|
|
4389
4542
|
}, [updated]);
|
|
@@ -4401,22 +4554,22 @@ var DropdownActivityMaterialContent = ({
|
|
|
4401
4554
|
return "INCORRECT";
|
|
4402
4555
|
};
|
|
4403
4556
|
const answerMap = retrieveAnswerMap();
|
|
4404
|
-
return /* @__PURE__ */ (0,
|
|
4405
|
-
/* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row flex-wrap items-center", children: [
|
|
4558
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4559
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DividerLine_default, {}) }),
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
4408
4561
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
4409
4562
|
const learnerAnswerState = checkAnswerState(
|
|
4410
4563
|
answerKey,
|
|
4411
4564
|
answerMap[materialKey]
|
|
4412
4565
|
);
|
|
4413
|
-
return /* @__PURE__ */ (0,
|
|
4414
|
-
/* @__PURE__ */ (0,
|
|
4566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4567
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "text-xl", children: [
|
|
4415
4568
|
parseFloat(materialKey) + 1,
|
|
4416
4569
|
"."
|
|
4417
4570
|
] }) }),
|
|
4418
|
-
/* @__PURE__ */ (0,
|
|
4419
|
-
/* @__PURE__ */ (0,
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "w-full relative", children: [
|
|
4572
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4420
4573
|
InputGroup_default,
|
|
4421
4574
|
{
|
|
4422
4575
|
type: "select",
|
|
@@ -4424,13 +4577,13 @@ var DropdownActivityMaterialContent = ({
|
|
|
4424
4577
|
optionList: shuffleArray(
|
|
4425
4578
|
materialMap[materialKey][answerKey]
|
|
4426
4579
|
).map((materialOption) => ({
|
|
4427
|
-
text: /* @__PURE__ */ (0,
|
|
4580
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4428
4581
|
materialOption
|
|
4429
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4582
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4430
4583
|
"span",
|
|
4431
4584
|
{
|
|
4432
4585
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4433
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4586
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4434
4587
|
import_react_katex2.InlineMath,
|
|
4435
4588
|
{
|
|
4436
4589
|
math: inputPart.value
|
|
@@ -4445,11 +4598,11 @@ var DropdownActivityMaterialContent = ({
|
|
|
4445
4598
|
onChange(answer, materialKey, e.target.value);
|
|
4446
4599
|
}
|
|
4447
4600
|
}
|
|
4448
|
-
) }) : /* @__PURE__ */ (0,
|
|
4601
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4449
4602
|
MediaDropdown_default,
|
|
4450
4603
|
{
|
|
4451
4604
|
id: materialKey,
|
|
4452
|
-
answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0,
|
|
4605
|
+
answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4453
4606
|
ShowMaterialMediaByContentType_default,
|
|
4454
4607
|
{
|
|
4455
4608
|
contentType: contentMap.type,
|
|
@@ -4461,7 +4614,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
4461
4614
|
optionList: materialMap[materialKey][answerKey].map(
|
|
4462
4615
|
(materialOption, index2) => ({
|
|
4463
4616
|
id: index2,
|
|
4464
|
-
media: /* @__PURE__ */ (0,
|
|
4617
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4465
4618
|
ShowMaterialMediaByContentType_default,
|
|
4466
4619
|
{
|
|
4467
4620
|
contentType: contentMap.type,
|
|
@@ -4480,24 +4633,24 @@ var DropdownActivityMaterialContent = ({
|
|
|
4480
4633
|
})
|
|
4481
4634
|
)
|
|
4482
4635
|
}
|
|
4483
|
-
) : /* @__PURE__ */ (0,
|
|
4636
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4484
4637
|
answerMap[materialKey]
|
|
4485
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4638
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4486
4639
|
"span",
|
|
4487
4640
|
{
|
|
4488
4641
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4489
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4642
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
4490
4643
|
},
|
|
4491
4644
|
index2
|
|
4492
4645
|
)) }) }),
|
|
4493
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0,
|
|
4646
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4494
4647
|
BaseImage_default,
|
|
4495
4648
|
{
|
|
4496
4649
|
src: "/icons/checkbox.webp",
|
|
4497
4650
|
alt: "chekbbox",
|
|
4498
4651
|
size: "small"
|
|
4499
4652
|
}
|
|
4500
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0,
|
|
4653
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4501
4654
|
BaseImage_default,
|
|
4502
4655
|
{
|
|
4503
4656
|
src: "/icons/cross-red.webp",
|
|
@@ -4513,8 +4666,8 @@ var DropdownActivityMaterialContent = ({
|
|
|
4513
4666
|
var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
4514
4667
|
|
|
4515
4668
|
// src/components/activities/DropdownActivityContent.tsx
|
|
4516
|
-
var
|
|
4517
|
-
var
|
|
4669
|
+
var import_react16 = require("react");
|
|
4670
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4518
4671
|
var DropdownActivityContent = ({
|
|
4519
4672
|
answer,
|
|
4520
4673
|
data,
|
|
@@ -4527,7 +4680,7 @@ var DropdownActivityContent = ({
|
|
|
4527
4680
|
const contentMap = parseContentMapFromData(data);
|
|
4528
4681
|
const dropdownBodyMap = parseBodyMapFromData(data, "DROPDOWN");
|
|
4529
4682
|
const dropdownMaterialMap = parseMaterialMapFromData(data, "DROPDOWN");
|
|
4530
|
-
const [currentAnswerMap, setCurrentAnswerMap] = (0,
|
|
4683
|
+
const [currentAnswerMap, setCurrentAnswerMap] = (0, import_react16.useState)(() => {
|
|
4531
4684
|
return retrieveCurrentAnswerMap();
|
|
4532
4685
|
});
|
|
4533
4686
|
function retrieveCurrentAnswerMap() {
|
|
@@ -4536,7 +4689,7 @@ var DropdownActivityContent = ({
|
|
|
4536
4689
|
);
|
|
4537
4690
|
return answer.data[foundIndex].answerMap;
|
|
4538
4691
|
}
|
|
4539
|
-
(0,
|
|
4692
|
+
(0, import_react16.useEffect)(() => {
|
|
4540
4693
|
setCurrentAnswerMap(retrieveCurrentAnswerMap());
|
|
4541
4694
|
}, [answer]);
|
|
4542
4695
|
const handleDropdownAnswerOnChange = (answerObj, key, value) => {
|
|
@@ -4556,8 +4709,8 @@ var DropdownActivityContent = ({
|
|
|
4556
4709
|
setCurrentAnswerMap(newAnswerMap);
|
|
4557
4710
|
changeAnswer(newAnswer);
|
|
4558
4711
|
};
|
|
4559
|
-
return /* @__PURE__ */ (0,
|
|
4560
|
-
/* @__PURE__ */ (0,
|
|
4712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4561
4714
|
ActivityBodyContent_default,
|
|
4562
4715
|
{
|
|
4563
4716
|
bodyMap: dropdownBodyMap,
|
|
@@ -4566,9 +4719,9 @@ var DropdownActivityContent = ({
|
|
|
4566
4719
|
templateType: "DROPDOWN"
|
|
4567
4720
|
}
|
|
4568
4721
|
) }),
|
|
4569
|
-
/* @__PURE__ */ (0,
|
|
4570
|
-
/* @__PURE__ */ (0,
|
|
4571
|
-
/* @__PURE__ */ (0,
|
|
4722
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DividerLine_default, {}) }),
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(VerticalDividerLine_default, {}) }),
|
|
4724
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4572
4725
|
DropdownActivityMaterialContent_default,
|
|
4573
4726
|
{
|
|
4574
4727
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4587,13 +4740,13 @@ var DropdownActivityContent_default = DropdownActivityContent;
|
|
|
4587
4740
|
|
|
4588
4741
|
// src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
|
|
4589
4742
|
var import_react_katex3 = require("react-katex");
|
|
4590
|
-
var import_react17 = require("react");
|
|
4591
4743
|
var import_react18 = require("react");
|
|
4744
|
+
var import_react19 = require("react");
|
|
4592
4745
|
var import_react_dnd3 = require("react-dnd");
|
|
4593
4746
|
|
|
4594
4747
|
// src/components/dnds/DraggableItem.tsx
|
|
4595
4748
|
var import_react_dnd = require("react-dnd");
|
|
4596
|
-
var
|
|
4749
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4597
4750
|
var DraggableItem = ({
|
|
4598
4751
|
key,
|
|
4599
4752
|
item,
|
|
@@ -4615,11 +4768,11 @@ var DraggableItem = ({
|
|
|
4615
4768
|
})
|
|
4616
4769
|
});
|
|
4617
4770
|
const opacity = isDragging ? 0.4 : 1;
|
|
4618
|
-
return /* @__PURE__ */ (0,
|
|
4771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4619
4772
|
"div",
|
|
4620
4773
|
{
|
|
4621
4774
|
className: `${isDragging ? "w-[0px] opacity-0" : "opacity-100"} transition-all duration-500`,
|
|
4622
|
-
children: /* @__PURE__ */ (0,
|
|
4775
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: drag, className: "", style: { opacity }, children: component })
|
|
4623
4776
|
},
|
|
4624
4777
|
key
|
|
4625
4778
|
);
|
|
@@ -4627,9 +4780,9 @@ var DraggableItem = ({
|
|
|
4627
4780
|
var DraggableItem_default = DraggableItem;
|
|
4628
4781
|
|
|
4629
4782
|
// src/components/dnds/DroppableItem.tsx
|
|
4630
|
-
var
|
|
4783
|
+
var import_react17 = require("react");
|
|
4631
4784
|
var import_react_dnd2 = require("react-dnd");
|
|
4632
|
-
var
|
|
4785
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4633
4786
|
var DroppableItem = ({
|
|
4634
4787
|
key,
|
|
4635
4788
|
item,
|
|
@@ -4639,7 +4792,7 @@ var DroppableItem = ({
|
|
|
4639
4792
|
target,
|
|
4640
4793
|
setTarget
|
|
4641
4794
|
}) => {
|
|
4642
|
-
const ref = (0,
|
|
4795
|
+
const ref = (0, import_react17.useRef)(null);
|
|
4643
4796
|
const [, drop] = (0, import_react_dnd2.useDrop)({
|
|
4644
4797
|
accept: type,
|
|
4645
4798
|
hover() {
|
|
@@ -4649,7 +4802,7 @@ var DroppableItem = ({
|
|
|
4649
4802
|
}
|
|
4650
4803
|
});
|
|
4651
4804
|
dropRef(drop(ref));
|
|
4652
|
-
return /* @__PURE__ */ (0,
|
|
4805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4653
4806
|
"div",
|
|
4654
4807
|
{
|
|
4655
4808
|
className: `w-full transition-all duration-500 h-full`,
|
|
@@ -4662,7 +4815,7 @@ var DroppableItem = ({
|
|
|
4662
4815
|
var DroppableItem_default = DroppableItem;
|
|
4663
4816
|
|
|
4664
4817
|
// src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
|
|
4665
|
-
var
|
|
4818
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4666
4819
|
var FillInTheBlanksActivityMaterialContent = ({
|
|
4667
4820
|
uniqueValue,
|
|
4668
4821
|
answer,
|
|
@@ -4674,9 +4827,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4674
4827
|
isPreview,
|
|
4675
4828
|
showCorrectAnswer
|
|
4676
4829
|
}) => {
|
|
4677
|
-
const [shuffleOptionList, setShuffleOptionList] = (0,
|
|
4678
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
4679
|
-
const [pasteOptionIndex, setPasteOptionIndex] = (0,
|
|
4830
|
+
const [shuffleOptionList, setShuffleOptionList] = (0, import_react18.useState)([]);
|
|
4831
|
+
const [selectedOption, setSelectedOption] = (0, import_react18.useState)(null);
|
|
4832
|
+
const [pasteOptionIndex, setPasteOptionIndex] = (0, import_react18.useState)(null);
|
|
4680
4833
|
const [{ isOver, canDrop }, drop] = (0, import_react_dnd3.useDrop)({
|
|
4681
4834
|
accept: "FILL_IN_THE_BLANKS",
|
|
4682
4835
|
drop: () => {
|
|
@@ -4686,10 +4839,10 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4686
4839
|
canDrop: monitor.canDrop()
|
|
4687
4840
|
})
|
|
4688
4841
|
});
|
|
4689
|
-
(0,
|
|
4842
|
+
(0, import_react19.useEffect)(() => {
|
|
4690
4843
|
setShuffleOptionList(shuffleArray(optionList));
|
|
4691
4844
|
}, []);
|
|
4692
|
-
(0,
|
|
4845
|
+
(0, import_react19.useEffect)(() => {
|
|
4693
4846
|
if (!showCorrectAnswer) return;
|
|
4694
4847
|
const foundAnswer = answer.data.find(
|
|
4695
4848
|
(answerData) => answerData.type === "FILL_IN_THE_BLANKS"
|
|
@@ -4721,12 +4874,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4721
4874
|
return Object.keys(answerMap2).findIndex((key) => answerMap2[key] === option) !== -1;
|
|
4722
4875
|
};
|
|
4723
4876
|
const answerMap = retrieveAnswerMap();
|
|
4724
|
-
return /* @__PURE__ */ (0,
|
|
4877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-row flex-wrap items-center", onMouseUp: () => {
|
|
4725
4878
|
}, children: [
|
|
4726
|
-
/* @__PURE__ */ (0,
|
|
4727
|
-
/* @__PURE__ */ (0,
|
|
4728
|
-
/* @__PURE__ */ (0,
|
|
4729
|
-
(option, index) => checkAnswerProvided(answerMap, option) ? /* @__PURE__ */ (0,
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DividerLine_default, {}) }),
|
|
4881
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
4882
|
+
(option, index) => checkAnswerProvided(answerMap, option) ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "opacity-30", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4730
4883
|
ShowMaterialMediaByContentType_default,
|
|
4731
4884
|
{
|
|
4732
4885
|
contentType: contentMap.type,
|
|
@@ -4734,12 +4887,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4734
4887
|
canFullScreen: true
|
|
4735
4888
|
},
|
|
4736
4889
|
`${uniqueValue}-${index}`
|
|
4737
|
-
) }, index) : /* @__PURE__ */ (0,
|
|
4890
|
+
) }, index) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4738
4891
|
DraggableItem_default,
|
|
4739
4892
|
{
|
|
4740
4893
|
item: { index: option },
|
|
4741
4894
|
type: "FILL_IN_THE_BLANKS",
|
|
4742
|
-
component: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
4895
|
+
component: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4743
4896
|
"div",
|
|
4744
4897
|
{
|
|
4745
4898
|
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
|
|
@@ -4747,9 +4900,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4747
4900
|
setSelectedOption(option);
|
|
4748
4901
|
setPasteOptionIndex(null);
|
|
4749
4902
|
},
|
|
4750
|
-
children: /* @__PURE__ */ (0,
|
|
4903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "italic whitespace-pre-wrap", children: option })
|
|
4751
4904
|
}
|
|
4752
|
-
) : /* @__PURE__ */ (0,
|
|
4905
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4753
4906
|
"div",
|
|
4754
4907
|
{
|
|
4755
4908
|
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
|
|
@@ -4757,7 +4910,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4757
4910
|
setSelectedOption(option);
|
|
4758
4911
|
setPasteOptionIndex(null);
|
|
4759
4912
|
},
|
|
4760
|
-
children: /* @__PURE__ */ (0,
|
|
4913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4761
4914
|
ShowMaterialMediaByContentType_default,
|
|
4762
4915
|
{
|
|
4763
4916
|
contentType: contentMap.type,
|
|
@@ -4775,12 +4928,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4775
4928
|
index
|
|
4776
4929
|
)
|
|
4777
4930
|
) }),
|
|
4778
|
-
/* @__PURE__ */ (0,
|
|
4931
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
4779
4932
|
const learnerAnswerState = checkAnswerState(
|
|
4780
4933
|
JSON.parse(materialMap[materialKey]),
|
|
4781
4934
|
answerMap[materialKey]
|
|
4782
4935
|
);
|
|
4783
|
-
return /* @__PURE__ */ (0,
|
|
4936
|
+
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.jsx)(
|
|
4784
4937
|
DroppableItem_default,
|
|
4785
4938
|
{
|
|
4786
4939
|
item: { index },
|
|
@@ -4788,13 +4941,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4788
4941
|
target: pasteOptionIndex,
|
|
4789
4942
|
setTarget: setPasteOptionIndex,
|
|
4790
4943
|
dropRef: drop,
|
|
4791
|
-
component: /* @__PURE__ */ (0,
|
|
4792
|
-
/* @__PURE__ */ (0,
|
|
4944
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4945
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "text-xl", children: [
|
|
4793
4946
|
parseFloat(materialKey) + 1,
|
|
4794
4947
|
"."
|
|
4795
4948
|
] }) }),
|
|
4796
|
-
/* @__PURE__ */ (0,
|
|
4797
|
-
/* @__PURE__ */ (0,
|
|
4949
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", children: [
|
|
4950
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4798
4951
|
InputGroup_default,
|
|
4799
4952
|
{
|
|
4800
4953
|
type: "textarea",
|
|
@@ -4809,14 +4962,14 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4809
4962
|
}
|
|
4810
4963
|
}
|
|
4811
4964
|
) }),
|
|
4812
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0,
|
|
4965
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4813
4966
|
BaseImage_default,
|
|
4814
4967
|
{
|
|
4815
4968
|
src: "/icons/checkbox.webp",
|
|
4816
4969
|
alt: "checkbox",
|
|
4817
4970
|
size: "small"
|
|
4818
4971
|
}
|
|
4819
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0,
|
|
4972
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4820
4973
|
BaseImage_default,
|
|
4821
4974
|
{
|
|
4822
4975
|
src: "/icons/cross-red.webp",
|
|
@@ -4824,20 +4977,20 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4824
4977
|
size: "small"
|
|
4825
4978
|
}
|
|
4826
4979
|
) }) : null
|
|
4827
|
-
] }) : answerMap[materialKey] === "" ? /* @__PURE__ */ (0,
|
|
4980
|
+
] }) : answerMap[materialKey] === "" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4828
4981
|
"div",
|
|
4829
4982
|
{
|
|
4830
4983
|
className: `w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
4831
|
-
children: /* @__PURE__ */ (0,
|
|
4984
|
+
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_drop_here") }) })
|
|
4832
4985
|
}
|
|
4833
|
-
) : /* @__PURE__ */ (0,
|
|
4986
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4834
4987
|
"div",
|
|
4835
4988
|
{
|
|
4836
4989
|
className: "flex-1 cursor-pointer",
|
|
4837
4990
|
onClick: () => {
|
|
4838
4991
|
onChange(answer, materialKey, "");
|
|
4839
4992
|
},
|
|
4840
|
-
children: /* @__PURE__ */ (0,
|
|
4993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4841
4994
|
ShowMaterialMediaByContentType_default,
|
|
4842
4995
|
{
|
|
4843
4996
|
contentType: contentMap.type,
|
|
@@ -4847,13 +5000,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4847
5000
|
`${uniqueValue}-${index}`
|
|
4848
5001
|
)
|
|
4849
5002
|
}
|
|
4850
|
-
) : /* @__PURE__ */ (0,
|
|
5003
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
4851
5004
|
answerMap[materialKey]
|
|
4852
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5005
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4853
5006
|
"span",
|
|
4854
5007
|
{
|
|
4855
5008
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4856
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5009
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
4857
5010
|
},
|
|
4858
5011
|
index2
|
|
4859
5012
|
)) }, materialKey) })
|
|
@@ -4867,8 +5020,8 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4867
5020
|
var FillInTheBlanksActivityMaterialContent_default = FillInTheBlanksActivityMaterialContent;
|
|
4868
5021
|
|
|
4869
5022
|
// src/components/activities/FillInTheBlanksActivityContent.tsx
|
|
4870
|
-
var
|
|
4871
|
-
var
|
|
5023
|
+
var import_react20 = require("react");
|
|
5024
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4872
5025
|
var FillInTheBlanksActivityContent = ({
|
|
4873
5026
|
answer,
|
|
4874
5027
|
data,
|
|
@@ -4888,7 +5041,7 @@ var FillInTheBlanksActivityContent = ({
|
|
|
4888
5041
|
"FILL_IN_THE_BLANKS"
|
|
4889
5042
|
);
|
|
4890
5043
|
const fillInTheBlanksIncorrectList = data.fillInTheBlanksIncorrectList ? JSON.parse(data.fillInTheBlanksIncorrectList) : [];
|
|
4891
|
-
const [currentAnswerMap, setCurrentAnswerMap] = (0,
|
|
5044
|
+
const [currentAnswerMap, setCurrentAnswerMap] = (0, import_react20.useState)(() => {
|
|
4892
5045
|
return retrieveCurrentAnswerMap();
|
|
4893
5046
|
});
|
|
4894
5047
|
function retrieveCurrentAnswerMap() {
|
|
@@ -4897,7 +5050,7 @@ var FillInTheBlanksActivityContent = ({
|
|
|
4897
5050
|
);
|
|
4898
5051
|
return answer.data[foundIndex].answerMap;
|
|
4899
5052
|
}
|
|
4900
|
-
(0,
|
|
5053
|
+
(0, import_react20.useEffect)(() => {
|
|
4901
5054
|
setCurrentAnswerMap(retrieveCurrentAnswerMap());
|
|
4902
5055
|
}, [answer]);
|
|
4903
5056
|
const constructAnswerOptionList = () => {
|
|
@@ -4935,8 +5088,8 @@ var FillInTheBlanksActivityContent = ({
|
|
|
4935
5088
|
setCurrentAnswerMap(newAnswerMap);
|
|
4936
5089
|
changeAnswer(newAnswer);
|
|
4937
5090
|
};
|
|
4938
|
-
return /* @__PURE__ */ (0,
|
|
4939
|
-
/* @__PURE__ */ (0,
|
|
5091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
5092
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4940
5093
|
ActivityBodyContent_default,
|
|
4941
5094
|
{
|
|
4942
5095
|
bodyMap: fillInTheBlanksBodyMap,
|
|
@@ -4945,9 +5098,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
4945
5098
|
templateType: "FILL_IN_THE_BLANKS"
|
|
4946
5099
|
}
|
|
4947
5100
|
) }),
|
|
4948
|
-
/* @__PURE__ */ (0,
|
|
4949
|
-
/* @__PURE__ */ (0,
|
|
4950
|
-
/* @__PURE__ */ (0,
|
|
5101
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DividerLine_default, {}) }),
|
|
5102
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VerticalDividerLine_default, {}) }),
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4951
5104
|
FillInTheBlanksActivityMaterialContent_default,
|
|
4952
5105
|
{
|
|
4953
5106
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4966,22 +5119,22 @@ var FillInTheBlanksActivityContent = ({
|
|
|
4966
5119
|
var FillInTheBlanksActivityContent_default = FillInTheBlanksActivityContent;
|
|
4967
5120
|
|
|
4968
5121
|
// src/components/activities/material-content/GroupingActivityMaterialContent.tsx
|
|
4969
|
-
var
|
|
5122
|
+
var import_react22 = require("react");
|
|
4970
5123
|
var import_react_dnd4 = require("react-dnd");
|
|
4971
5124
|
var import_react_katex4 = require("react-katex");
|
|
4972
5125
|
|
|
4973
5126
|
// src/hooks/useScreenSize.ts
|
|
4974
|
-
var
|
|
5127
|
+
var import_react21 = require("react");
|
|
4975
5128
|
var useScreenSize = () => {
|
|
4976
|
-
const [containerSize, setContainerSize] = (0,
|
|
5129
|
+
const [containerSize, setContainerSize] = (0, import_react21.useState)({
|
|
4977
5130
|
width: 0,
|
|
4978
5131
|
height: 0
|
|
4979
5132
|
});
|
|
4980
|
-
const [screenSize, setScreenSize] = (0,
|
|
5133
|
+
const [screenSize, setScreenSize] = (0, import_react21.useState)({
|
|
4981
5134
|
width: window.innerWidth,
|
|
4982
5135
|
height: window.innerHeight
|
|
4983
5136
|
});
|
|
4984
|
-
(0,
|
|
5137
|
+
(0, import_react21.useEffect)(() => {
|
|
4985
5138
|
const handleResize = () => {
|
|
4986
5139
|
setScreenSize({
|
|
4987
5140
|
width: window.innerWidth,
|
|
@@ -5006,7 +5159,7 @@ var useScreenSize = () => {
|
|
|
5006
5159
|
var useScreenSize_default = useScreenSize;
|
|
5007
5160
|
|
|
5008
5161
|
// src/components/activities/material-content/GroupingActivityMaterialContent.tsx
|
|
5009
|
-
var
|
|
5162
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5010
5163
|
var GroupingActivityMaterialContent = ({
|
|
5011
5164
|
uniqueValue,
|
|
5012
5165
|
answer,
|
|
@@ -5017,10 +5170,10 @@ var GroupingActivityMaterialContent = ({
|
|
|
5017
5170
|
isPreview,
|
|
5018
5171
|
showCorrectAnswer
|
|
5019
5172
|
}) => {
|
|
5020
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5021
|
-
const [selectedTargetKey, setSelectedTargetKey] = (0,
|
|
5022
|
-
const [isShuffled, setIsShuffled] = (0,
|
|
5023
|
-
const [shuffledMaterialList, setShuffledMaterialList] = (0,
|
|
5173
|
+
const [selectedValue, setSelectedValue] = (0, import_react22.useState)(null);
|
|
5174
|
+
const [selectedTargetKey, setSelectedTargetKey] = (0, import_react22.useState)(null);
|
|
5175
|
+
const [isShuffled, setIsShuffled] = (0, import_react22.useState)(false);
|
|
5176
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react22.useState)([]);
|
|
5024
5177
|
const { screenSize, containerSize } = useScreenSize_default();
|
|
5025
5178
|
const [{ isOver, canDrop }, drop] = (0, import_react_dnd4.useDrop)({
|
|
5026
5179
|
accept: "GROUPING",
|
|
@@ -5031,16 +5184,16 @@ var GroupingActivityMaterialContent = ({
|
|
|
5031
5184
|
canDrop: monitor.canDrop()
|
|
5032
5185
|
})
|
|
5033
5186
|
});
|
|
5034
|
-
const ref = (0,
|
|
5035
|
-
const itemsRef = (0,
|
|
5036
|
-
const [maxWidth, setMaxWidth] = (0,
|
|
5037
|
-
(0,
|
|
5187
|
+
const ref = (0, import_react22.useRef)(null);
|
|
5188
|
+
const itemsRef = (0, import_react22.useRef)(null);
|
|
5189
|
+
const [maxWidth, setMaxWidth] = (0, import_react22.useState)(0);
|
|
5190
|
+
(0, import_react22.useEffect)(() => {
|
|
5038
5191
|
if (!ref) return;
|
|
5039
5192
|
if (!ref.current) return;
|
|
5040
5193
|
if (!screenSize) return;
|
|
5041
5194
|
setMaxWidth(ref.current.offsetWidth - 12);
|
|
5042
5195
|
}, [ref, screenSize]);
|
|
5043
|
-
(0,
|
|
5196
|
+
(0, import_react22.useEffect)(() => {
|
|
5044
5197
|
const shuffleArray2 = (array) => {
|
|
5045
5198
|
if (!isShuffled) {
|
|
5046
5199
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5061,7 +5214,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5061
5214
|
});
|
|
5062
5215
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5063
5216
|
}, []);
|
|
5064
|
-
(0,
|
|
5217
|
+
(0, import_react22.useEffect)(() => {
|
|
5065
5218
|
if (!showCorrectAnswer) return;
|
|
5066
5219
|
answer.data.find(
|
|
5067
5220
|
(answerData) => answerData.type === "GROUPING"
|
|
@@ -5105,19 +5258,19 @@ var GroupingActivityMaterialContent = ({
|
|
|
5105
5258
|
};
|
|
5106
5259
|
const answerMap = retrieveAnswerMap();
|
|
5107
5260
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5108
|
-
return /* @__PURE__ */ (0,
|
|
5109
|
-
/* @__PURE__ */ (0,
|
|
5261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
5262
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5110
5263
|
"div",
|
|
5111
5264
|
{
|
|
5112
5265
|
ref: itemsRef,
|
|
5113
5266
|
className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
|
|
5114
5267
|
children: filteredMaterialList.map((materialValue, index) => {
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5116
5269
|
DraggableItem_default,
|
|
5117
5270
|
{
|
|
5118
5271
|
item: { index: materialValue },
|
|
5119
5272
|
type: "GROUPING",
|
|
5120
|
-
component: /* @__PURE__ */ (0,
|
|
5273
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5121
5274
|
"div",
|
|
5122
5275
|
{
|
|
5123
5276
|
className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
|
|
@@ -5131,22 +5284,22 @@ var GroupingActivityMaterialContent = ({
|
|
|
5131
5284
|
setSelectedValue(null);
|
|
5132
5285
|
}
|
|
5133
5286
|
},
|
|
5134
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5287
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5135
5288
|
"div",
|
|
5136
5289
|
{
|
|
5137
5290
|
className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
|
|
5138
|
-
children: /* @__PURE__ */ (0,
|
|
5291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5139
5292
|
materialValue
|
|
5140
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5293
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5141
5294
|
"span",
|
|
5142
5295
|
{
|
|
5143
5296
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5144
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5297
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5145
5298
|
},
|
|
5146
5299
|
index2
|
|
5147
5300
|
)) })
|
|
5148
5301
|
}
|
|
5149
|
-
) : /* @__PURE__ */ (0,
|
|
5302
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5150
5303
|
ShowMaterialMediaByContentType_default,
|
|
5151
5304
|
{
|
|
5152
5305
|
contentType: contentMap.type,
|
|
@@ -5171,22 +5324,22 @@ var GroupingActivityMaterialContent = ({
|
|
|
5171
5324
|
})
|
|
5172
5325
|
}
|
|
5173
5326
|
),
|
|
5174
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0,
|
|
5175
|
-
Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0,
|
|
5176
|
-
/* @__PURE__ */ (0,
|
|
5327
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DividerLine_default, {}) : null,
|
|
5328
|
+
Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5329
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5177
5330
|
"div",
|
|
5178
5331
|
{
|
|
5179
5332
|
className: `border-catchup-blue h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
|
|
5180
|
-
children: /* @__PURE__ */ (0,
|
|
5333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5181
5334
|
"div",
|
|
5182
5335
|
{
|
|
5183
5336
|
className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
|
|
5184
|
-
children: /* @__PURE__ */ (0,
|
|
5185
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
5337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5338
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5186
5339
|
"span",
|
|
5187
5340
|
{
|
|
5188
5341
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5189
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5342
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex4.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5190
5343
|
},
|
|
5191
5344
|
index2
|
|
5192
5345
|
)
|
|
@@ -5195,12 +5348,12 @@ var GroupingActivityMaterialContent = ({
|
|
|
5195
5348
|
)
|
|
5196
5349
|
}
|
|
5197
5350
|
) }),
|
|
5198
|
-
/* @__PURE__ */ (0,
|
|
5199
|
-
/* @__PURE__ */ (0,
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1", ref, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-full py-3", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5200
5353
|
"div",
|
|
5201
5354
|
{
|
|
5202
5355
|
className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} flex-1 border-catchup-blue rounded-catchup-xlarge border-2 h-full p-1`,
|
|
5203
|
-
children: /* @__PURE__ */ (0,
|
|
5356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5204
5357
|
DroppableItem_default,
|
|
5205
5358
|
{
|
|
5206
5359
|
item: { index: answerMapKey },
|
|
@@ -5208,7 +5361,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5208
5361
|
target: selectedTargetKey,
|
|
5209
5362
|
setTarget: setSelectedTargetKey,
|
|
5210
5363
|
dropRef: drop,
|
|
5211
|
-
component: /* @__PURE__ */ (0,
|
|
5364
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5212
5365
|
"div",
|
|
5213
5366
|
{
|
|
5214
5367
|
className: "h-full flex-1 flex flex-row items-center overflow-x-auto",
|
|
@@ -5221,7 +5374,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5221
5374
|
materialMap[answerMapKey],
|
|
5222
5375
|
answerMapValue
|
|
5223
5376
|
);
|
|
5224
|
-
return /* @__PURE__ */ (0,
|
|
5377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-catchup-activity-box-item", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5225
5378
|
"div",
|
|
5226
5379
|
{
|
|
5227
5380
|
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`,
|
|
@@ -5237,17 +5390,17 @@ var GroupingActivityMaterialContent = ({
|
|
|
5237
5390
|
setSelectedValue(null);
|
|
5238
5391
|
}
|
|
5239
5392
|
},
|
|
5240
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5393
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5241
5394
|
"div",
|
|
5242
5395
|
{
|
|
5243
5396
|
className: `flex flex-col items-center justify-center transition-all duration-300 min-h-[64px] min-w-[200px]`,
|
|
5244
|
-
children: /* @__PURE__ */ (0,
|
|
5397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5245
5398
|
answerMapValue
|
|
5246
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5399
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5247
5400
|
"span",
|
|
5248
5401
|
{
|
|
5249
5402
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5250
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5403
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5251
5404
|
import_react_katex4.InlineMath,
|
|
5252
5405
|
{
|
|
5253
5406
|
math: inputPart.value
|
|
@@ -5257,7 +5410,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5257
5410
|
index2
|
|
5258
5411
|
)) }) })
|
|
5259
5412
|
}
|
|
5260
|
-
) : /* @__PURE__ */ (0,
|
|
5413
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5261
5414
|
ShowMaterialMediaByContentType_default,
|
|
5262
5415
|
{
|
|
5263
5416
|
contentType: contentMap.type,
|
|
@@ -5283,7 +5436,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5283
5436
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
5284
5437
|
|
|
5285
5438
|
// src/components/activities/GroupingActivityContent.tsx
|
|
5286
|
-
var
|
|
5439
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5287
5440
|
var GroupingActivityContent = ({
|
|
5288
5441
|
answer,
|
|
5289
5442
|
data,
|
|
@@ -5308,16 +5461,16 @@ var GroupingActivityContent = ({
|
|
|
5308
5461
|
}
|
|
5309
5462
|
changeAnswer(answer2);
|
|
5310
5463
|
};
|
|
5311
|
-
return /* @__PURE__ */ (0,
|
|
5312
|
-
/* @__PURE__ */ (0,
|
|
5464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
5465
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5313
5466
|
ActivityBodyContent_default,
|
|
5314
5467
|
{
|
|
5315
5468
|
bodyMap: groupingBodyMap,
|
|
5316
5469
|
templateType: "GROUPING"
|
|
5317
5470
|
}
|
|
5318
5471
|
),
|
|
5319
|
-
/* @__PURE__ */ (0,
|
|
5320
|
-
/* @__PURE__ */ (0,
|
|
5472
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DividerLine_default, {}),
|
|
5473
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5321
5474
|
GroupingActivityMaterialContent_default,
|
|
5322
5475
|
{
|
|
5323
5476
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5335,10 +5488,10 @@ var GroupingActivityContent = ({
|
|
|
5335
5488
|
var GroupingActivityContent_default = GroupingActivityContent;
|
|
5336
5489
|
|
|
5337
5490
|
// src/components/activities/material-content/MatchingActivityMaterialContent.tsx
|
|
5338
|
-
var
|
|
5491
|
+
var import_react23 = require("react");
|
|
5339
5492
|
var import_react_dnd5 = require("react-dnd");
|
|
5340
5493
|
var import_react_katex5 = require("react-katex");
|
|
5341
|
-
var
|
|
5494
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5342
5495
|
var MatchingActivityMaterialContent = ({
|
|
5343
5496
|
uniqueValue,
|
|
5344
5497
|
answer,
|
|
@@ -5349,10 +5502,10 @@ var MatchingActivityMaterialContent = ({
|
|
|
5349
5502
|
isPreview,
|
|
5350
5503
|
showCorrectAnswer
|
|
5351
5504
|
}) => {
|
|
5352
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
5353
|
-
const [selectedTargetKey, setSelectedTargetKey] = (0,
|
|
5354
|
-
const [isShuffled, setIsShuffled] = (0,
|
|
5355
|
-
const [shuffledMaterialList, setShuffledMaterialList] = (0,
|
|
5505
|
+
const [selectedValue, setSelectedValue] = (0, import_react23.useState)(null);
|
|
5506
|
+
const [selectedTargetKey, setSelectedTargetKey] = (0, import_react23.useState)(null);
|
|
5507
|
+
const [isShuffled, setIsShuffled] = (0, import_react23.useState)(false);
|
|
5508
|
+
const [shuffledMaterialList, setShuffledMaterialList] = (0, import_react23.useState)([]);
|
|
5356
5509
|
const [{ isOver, canDrop }, drop] = (0, import_react_dnd5.useDrop)({
|
|
5357
5510
|
accept: "MATCHING",
|
|
5358
5511
|
drop: () => {
|
|
@@ -5363,8 +5516,8 @@ var MatchingActivityMaterialContent = ({
|
|
|
5363
5516
|
})
|
|
5364
5517
|
});
|
|
5365
5518
|
const { containerSize } = useScreenSize_default();
|
|
5366
|
-
const itemsRef = (0,
|
|
5367
|
-
(0,
|
|
5519
|
+
const itemsRef = (0, import_react23.useRef)(null);
|
|
5520
|
+
(0, import_react23.useEffect)(() => {
|
|
5368
5521
|
const shuffleArray2 = (array) => {
|
|
5369
5522
|
if (!isShuffled) {
|
|
5370
5523
|
const copyArray = JSON.parse(JSON.stringify(array));
|
|
@@ -5383,13 +5536,13 @@ var MatchingActivityMaterialContent = ({
|
|
|
5383
5536
|
});
|
|
5384
5537
|
setShuffledMaterialList(shuffleArray2(materialList));
|
|
5385
5538
|
}, []);
|
|
5386
|
-
(0,
|
|
5539
|
+
(0, import_react23.useEffect)(() => {
|
|
5387
5540
|
if (!showCorrectAnswer) return;
|
|
5388
5541
|
answer.data.find(
|
|
5389
5542
|
(answerData) => answerData.type === "MATCHING"
|
|
5390
5543
|
).answerMap = materialMap;
|
|
5391
5544
|
}, [showCorrectAnswer]);
|
|
5392
|
-
(0,
|
|
5545
|
+
(0, import_react23.useEffect)(() => {
|
|
5393
5546
|
if (!itemsRef) return;
|
|
5394
5547
|
if (!itemsRef.current) return;
|
|
5395
5548
|
if (!containerSize) return;
|
|
@@ -5434,18 +5587,18 @@ var MatchingActivityMaterialContent = ({
|
|
|
5434
5587
|
};
|
|
5435
5588
|
const answerMap = retrieveAnswerMap();
|
|
5436
5589
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
5437
|
-
return /* @__PURE__ */ (0,
|
|
5438
|
-
/* @__PURE__ */ (0,
|
|
5590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
5591
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5439
5592
|
"div",
|
|
5440
5593
|
{
|
|
5441
5594
|
ref: itemsRef,
|
|
5442
5595
|
className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
|
|
5443
|
-
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0,
|
|
5596
|
+
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5444
5597
|
DraggableItem_default,
|
|
5445
5598
|
{
|
|
5446
5599
|
item: { index: materialValue },
|
|
5447
5600
|
type: "MATCHING",
|
|
5448
|
-
component: /* @__PURE__ */ (0,
|
|
5601
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5449
5602
|
"div",
|
|
5450
5603
|
{
|
|
5451
5604
|
className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
|
|
@@ -5459,22 +5612,22 @@ var MatchingActivityMaterialContent = ({
|
|
|
5459
5612
|
setSelectedValue(null);
|
|
5460
5613
|
}
|
|
5461
5614
|
},
|
|
5462
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5615
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5463
5616
|
"div",
|
|
5464
5617
|
{
|
|
5465
5618
|
className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
|
|
5466
|
-
children: /* @__PURE__ */ (0,
|
|
5619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5467
5620
|
materialValue
|
|
5468
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5621
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5469
5622
|
"span",
|
|
5470
5623
|
{
|
|
5471
5624
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5472
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5625
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5473
5626
|
},
|
|
5474
5627
|
index2
|
|
5475
5628
|
)) })
|
|
5476
5629
|
}
|
|
5477
|
-
) : /* @__PURE__ */ (0,
|
|
5630
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5478
5631
|
ShowMaterialMediaByContentType_default,
|
|
5479
5632
|
{
|
|
5480
5633
|
contentType: contentMap.type,
|
|
@@ -5498,27 +5651,27 @@ var MatchingActivityMaterialContent = ({
|
|
|
5498
5651
|
))
|
|
5499
5652
|
}
|
|
5500
5653
|
),
|
|
5501
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0,
|
|
5654
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DividerLine_default, {}) : null,
|
|
5502
5655
|
Object.keys(answerMap).map((answerMapKey, index) => {
|
|
5503
5656
|
const learnerAnswerState = checkAnswerState(
|
|
5504
5657
|
materialMap[answerMapKey],
|
|
5505
5658
|
answerMap[answerMapKey]
|
|
5506
5659
|
);
|
|
5507
|
-
return /* @__PURE__ */ (0,
|
|
5508
|
-
/* @__PURE__ */ (0,
|
|
5660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row w-full", children: [
|
|
5661
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5509
5662
|
"div",
|
|
5510
5663
|
{
|
|
5511
5664
|
className: `h-catchup-activity-outer-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"}`,
|
|
5512
|
-
children: /* @__PURE__ */ (0,
|
|
5665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5513
5666
|
"div",
|
|
5514
5667
|
{
|
|
5515
5668
|
className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
|
|
5516
|
-
children: /* @__PURE__ */ (0,
|
|
5517
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
5669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5670
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5518
5671
|
"span",
|
|
5519
5672
|
{
|
|
5520
5673
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5521
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5674
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5522
5675
|
},
|
|
5523
5676
|
index2
|
|
5524
5677
|
)
|
|
@@ -5527,8 +5680,8 @@ var MatchingActivityMaterialContent = ({
|
|
|
5527
5680
|
)
|
|
5528
5681
|
}
|
|
5529
5682
|
) }),
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5531
|
-
/* @__PURE__ */ (0,
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
5684
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5532
5685
|
"div",
|
|
5533
5686
|
{
|
|
5534
5687
|
className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} h-catchup-activity-outer-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"}`,
|
|
@@ -5537,7 +5690,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5537
5690
|
setSelectedValue(null);
|
|
5538
5691
|
}
|
|
5539
5692
|
},
|
|
5540
|
-
children: /* @__PURE__ */ (0,
|
|
5693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5541
5694
|
DroppableItem_default,
|
|
5542
5695
|
{
|
|
5543
5696
|
item: { index: answerMapKey },
|
|
@@ -5545,7 +5698,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5545
5698
|
target: selectedTargetKey,
|
|
5546
5699
|
setTarget: setSelectedTargetKey,
|
|
5547
5700
|
dropRef: drop,
|
|
5548
|
-
component: /* @__PURE__ */ (0,
|
|
5701
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5549
5702
|
"div",
|
|
5550
5703
|
{
|
|
5551
5704
|
className: `h-full flex-1 flex flex-row items-center justify-center `,
|
|
@@ -5558,16 +5711,16 @@ var MatchingActivityMaterialContent = ({
|
|
|
5558
5711
|
);
|
|
5559
5712
|
}
|
|
5560
5713
|
},
|
|
5561
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
5714
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5562
5715
|
answerMap[answerMapKey]
|
|
5563
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5716
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5564
5717
|
"span",
|
|
5565
5718
|
{
|
|
5566
5719
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5567
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5720
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_katex5.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5568
5721
|
},
|
|
5569
5722
|
index2
|
|
5570
|
-
)) }) : /* @__PURE__ */ (0,
|
|
5723
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5571
5724
|
ShowMaterialMediaByContentType_default,
|
|
5572
5725
|
{
|
|
5573
5726
|
contentType: contentMap.type,
|
|
@@ -5590,7 +5743,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5590
5743
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
5591
5744
|
|
|
5592
5745
|
// src/components/activities/MatchingActivityContent.tsx
|
|
5593
|
-
var
|
|
5746
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5594
5747
|
var MatchingActivityContent = ({
|
|
5595
5748
|
answer,
|
|
5596
5749
|
data,
|
|
@@ -5611,16 +5764,16 @@ var MatchingActivityContent = ({
|
|
|
5611
5764
|
answerMap[key] = value;
|
|
5612
5765
|
changeAnswer(answer2);
|
|
5613
5766
|
};
|
|
5614
|
-
return /* @__PURE__ */ (0,
|
|
5615
|
-
/* @__PURE__ */ (0,
|
|
5767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5616
5769
|
ActivityBodyContent_default,
|
|
5617
5770
|
{
|
|
5618
5771
|
bodyMap: matchingBodyMap,
|
|
5619
5772
|
templateType: "MATCHING"
|
|
5620
5773
|
}
|
|
5621
5774
|
),
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5623
|
-
/* @__PURE__ */ (0,
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {}),
|
|
5776
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5624
5777
|
MatchingActivityMaterialContent_default,
|
|
5625
5778
|
{
|
|
5626
5779
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5639,7 +5792,7 @@ var MatchingActivityContent_default = MatchingActivityContent;
|
|
|
5639
5792
|
|
|
5640
5793
|
// src/components/activities/material-content/MCMAActivityMaterialContent.tsx
|
|
5641
5794
|
var import_react_katex6 = require("react-katex");
|
|
5642
|
-
var
|
|
5795
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5643
5796
|
var MCMAActivityMaterialContent = ({
|
|
5644
5797
|
uniqueValue,
|
|
5645
5798
|
answer,
|
|
@@ -5672,10 +5825,10 @@ var MCMAActivityMaterialContent = ({
|
|
|
5672
5825
|
const answerMap = retrieveAnswerMap();
|
|
5673
5826
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
5674
5827
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5675
|
-
return /* @__PURE__ */ (0,
|
|
5676
|
-
/* @__PURE__ */ (0,
|
|
5677
|
-
/* @__PURE__ */ (0,
|
|
5678
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
5828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5", children: [
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DividerLine_default, {}) }),
|
|
5831
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
5679
5832
|
(materialSubKey, index2) => {
|
|
5680
5833
|
const foundAnswer = answerMap[materialKey].find(
|
|
5681
5834
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -5688,7 +5841,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5688
5841
|
const foundIndex = correctAnswerList.findIndex(
|
|
5689
5842
|
(correctAnswer) => correctAnswer === materialSubKey
|
|
5690
5843
|
);
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5692
5845
|
"div",
|
|
5693
5846
|
{
|
|
5694
5847
|
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" : ""}`,
|
|
@@ -5696,7 +5849,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5696
5849
|
onChange(answer, materialKey, materialSubKey);
|
|
5697
5850
|
},
|
|
5698
5851
|
children: [
|
|
5699
|
-
/* @__PURE__ */ (0,
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5700
5853
|
BaseImage_default,
|
|
5701
5854
|
{
|
|
5702
5855
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -5706,16 +5859,16 @@ var MCMAActivityMaterialContent = ({
|
|
|
5706
5859
|
}
|
|
5707
5860
|
}
|
|
5708
5861
|
),
|
|
5709
|
-
/* @__PURE__ */ (0,
|
|
5862
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5710
5863
|
materialSubKey
|
|
5711
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
5864
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5712
5865
|
"span",
|
|
5713
5866
|
{
|
|
5714
5867
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5715
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5868
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5716
5869
|
},
|
|
5717
5870
|
index3
|
|
5718
|
-
)) }) : /* @__PURE__ */ (0,
|
|
5871
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5719
5872
|
ShowMaterialMediaByContentType_default,
|
|
5720
5873
|
{
|
|
5721
5874
|
contentType: contentMap.type,
|
|
@@ -5729,13 +5882,13 @@ var MCMAActivityMaterialContent = ({
|
|
|
5729
5882
|
index2
|
|
5730
5883
|
);
|
|
5731
5884
|
}
|
|
5732
|
-
) }) : /* @__PURE__ */ (0,
|
|
5885
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
5733
5886
|
answerMap[materialKey]
|
|
5734
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
5887
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5735
5888
|
"span",
|
|
5736
5889
|
{
|
|
5737
5890
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5738
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
5891
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_katex6.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5739
5892
|
},
|
|
5740
5893
|
index2
|
|
5741
5894
|
)) }, materialKey)
|
|
@@ -5745,7 +5898,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
5745
5898
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
5746
5899
|
|
|
5747
5900
|
// src/components/activities/MCMAActivityContent.tsx
|
|
5748
|
-
var
|
|
5901
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5749
5902
|
var MCMAActivityContent = ({
|
|
5750
5903
|
answer,
|
|
5751
5904
|
data,
|
|
@@ -5772,11 +5925,11 @@ var MCMAActivityContent = ({
|
|
|
5772
5925
|
}
|
|
5773
5926
|
changeAnswer(answer2);
|
|
5774
5927
|
};
|
|
5775
|
-
return /* @__PURE__ */ (0,
|
|
5776
|
-
/* @__PURE__ */ (0,
|
|
5777
|
-
/* @__PURE__ */ (0,
|
|
5778
|
-
/* @__PURE__ */ (0,
|
|
5779
|
-
/* @__PURE__ */ (0,
|
|
5928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
5929
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ActivityBodyContent_default, { bodyMap: MCMABodyMap, templateType: "MCMA" }) }),
|
|
5930
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) }),
|
|
5931
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerticalDividerLine_default, {}) }),
|
|
5932
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5780
5933
|
MCMAActivityMaterialContent_default,
|
|
5781
5934
|
{
|
|
5782
5935
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5794,7 +5947,7 @@ var MCMAActivityContent_default = MCMAActivityContent;
|
|
|
5794
5947
|
|
|
5795
5948
|
// src/components/activities/material-content/MCSAActivityMaterialContent.tsx
|
|
5796
5949
|
var import_react_katex7 = require("react-katex");
|
|
5797
|
-
var
|
|
5950
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5798
5951
|
var MCSAActivityMaterialContent = ({
|
|
5799
5952
|
uniqueValue,
|
|
5800
5953
|
answer,
|
|
@@ -5824,10 +5977,10 @@ var MCSAActivityMaterialContent = ({
|
|
|
5824
5977
|
const answerMap = retrieveAnswerMap();
|
|
5825
5978
|
const correctAnswer = retrieveCorrectAnswer();
|
|
5826
5979
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
5827
|
-
return /* @__PURE__ */ (0,
|
|
5828
|
-
/* @__PURE__ */ (0,
|
|
5829
|
-
/* @__PURE__ */ (0,
|
|
5830
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
5980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5", children: [
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DividerLine_default, {}) }),
|
|
5983
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5831
5984
|
"div",
|
|
5832
5985
|
{
|
|
5833
5986
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -5838,7 +5991,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5838
5991
|
materialSubKey,
|
|
5839
5992
|
answerMap[materialKey]
|
|
5840
5993
|
);
|
|
5841
|
-
return /* @__PURE__ */ (0,
|
|
5994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5842
5995
|
"div",
|
|
5843
5996
|
{
|
|
5844
5997
|
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" : ""}`,
|
|
@@ -5846,7 +5999,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5846
5999
|
onChange(answer, materialKey, materialSubKey);
|
|
5847
6000
|
},
|
|
5848
6001
|
children: [
|
|
5849
|
-
/* @__PURE__ */ (0,
|
|
6002
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5850
6003
|
BaseImage_default,
|
|
5851
6004
|
{
|
|
5852
6005
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.webp" : "/icons/not-selected-item-element.webp",
|
|
@@ -5856,16 +6009,16 @@ var MCSAActivityMaterialContent = ({
|
|
|
5856
6009
|
}
|
|
5857
6010
|
}
|
|
5858
6011
|
),
|
|
5859
|
-
/* @__PURE__ */ (0,
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5860
6013
|
materialSubKey
|
|
5861
|
-
).map((inputPart, index3) => /* @__PURE__ */ (0,
|
|
6014
|
+
).map((inputPart, index3) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5862
6015
|
"span",
|
|
5863
6016
|
{
|
|
5864
6017
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5865
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6018
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5866
6019
|
},
|
|
5867
6020
|
index3
|
|
5868
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6021
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5869
6022
|
ShowMaterialMediaByContentType_default,
|
|
5870
6023
|
{
|
|
5871
6024
|
contentType: contentMap.type,
|
|
@@ -5881,13 +6034,13 @@ var MCSAActivityMaterialContent = ({
|
|
|
5881
6034
|
}
|
|
5882
6035
|
)
|
|
5883
6036
|
}
|
|
5884
|
-
) : /* @__PURE__ */ (0,
|
|
6037
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5885
6038
|
answerMap[materialKey]
|
|
5886
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6039
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5887
6040
|
"span",
|
|
5888
6041
|
{
|
|
5889
6042
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5890
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6043
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_katex7.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5891
6044
|
},
|
|
5892
6045
|
index2
|
|
5893
6046
|
)) })
|
|
@@ -5897,7 +6050,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
5897
6050
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
5898
6051
|
|
|
5899
6052
|
// src/components/activities/MCSAActivityContent.tsx
|
|
5900
|
-
var
|
|
6053
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5901
6054
|
var MCSAActivityContent = ({
|
|
5902
6055
|
answer,
|
|
5903
6056
|
data,
|
|
@@ -5917,11 +6070,11 @@ var MCSAActivityContent = ({
|
|
|
5917
6070
|
answerMap[key] = value;
|
|
5918
6071
|
changeAnswer(answer2);
|
|
5919
6072
|
};
|
|
5920
|
-
return /* @__PURE__ */ (0,
|
|
5921
|
-
/* @__PURE__ */ (0,
|
|
5922
|
-
/* @__PURE__ */ (0,
|
|
5923
|
-
/* @__PURE__ */ (0,
|
|
5924
|
-
/* @__PURE__ */ (0,
|
|
6073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6074
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ActivityBodyContent_default, { bodyMap: MCSABodyMap, templateType: "MCSA" }) }),
|
|
6075
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DividerLine_default, {}) }),
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VerticalDividerLine_default, {}) }),
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5925
6078
|
MCSAActivityMaterialContent_default,
|
|
5926
6079
|
{
|
|
5927
6080
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5938,7 +6091,7 @@ var MCSAActivityContent = ({
|
|
|
5938
6091
|
var MCSAActivityContent_default = MCSAActivityContent;
|
|
5939
6092
|
|
|
5940
6093
|
// src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
|
|
5941
|
-
var
|
|
6094
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5942
6095
|
var OpenEndedActivityMaterialContent = ({
|
|
5943
6096
|
answer,
|
|
5944
6097
|
contentMap,
|
|
@@ -5961,7 +6114,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5961
6114
|
};
|
|
5962
6115
|
const RenderTextContent = (answerMap2) => {
|
|
5963
6116
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
5964
|
-
return /* @__PURE__ */ (0,
|
|
6117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5965
6118
|
InputGroup_default,
|
|
5966
6119
|
{
|
|
5967
6120
|
type: "textarea",
|
|
@@ -5974,16 +6127,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
5974
6127
|
);
|
|
5975
6128
|
};
|
|
5976
6129
|
const answerMap = retrieveAnswerMap();
|
|
5977
|
-
return /* @__PURE__ */ (0,
|
|
5978
|
-
/* @__PURE__ */ (0,
|
|
5979
|
-
/* @__PURE__ */ (0,
|
|
6130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "", children: [
|
|
6131
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
6132
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DividerLine_default, {}) }),
|
|
5980
6133
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : null
|
|
5981
6134
|
] }) });
|
|
5982
6135
|
};
|
|
5983
6136
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
5984
6137
|
|
|
5985
6138
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
5986
|
-
var
|
|
6139
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5987
6140
|
var OpenEndedActivityContent = ({
|
|
5988
6141
|
answer,
|
|
5989
6142
|
data,
|
|
@@ -6001,12 +6154,12 @@ var OpenEndedActivityContent = ({
|
|
|
6001
6154
|
answerMap["ANSWER"] = value;
|
|
6002
6155
|
changeAnswer(answer2);
|
|
6003
6156
|
};
|
|
6004
|
-
return /* @__PURE__ */ (0,
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6158
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6006
6159
|
"div",
|
|
6007
6160
|
{
|
|
6008
6161
|
className: `${showMaterialContent ? isFullScreen ? "w-full" : "w-full md:w-[40%]" : "w-full"}`,
|
|
6009
|
-
children: /* @__PURE__ */ (0,
|
|
6162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6010
6163
|
ActivityBodyContent_default,
|
|
6011
6164
|
{
|
|
6012
6165
|
bodyMap: openEndedBodyMap,
|
|
@@ -6015,16 +6168,16 @@ var OpenEndedActivityContent = ({
|
|
|
6015
6168
|
)
|
|
6016
6169
|
}
|
|
6017
6170
|
),
|
|
6018
|
-
showMaterialContent ? /* @__PURE__ */ (0,
|
|
6019
|
-
/* @__PURE__ */ (0,
|
|
6171
|
+
showMaterialContent ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6020
6173
|
"div",
|
|
6021
6174
|
{
|
|
6022
6175
|
className: `${isFullScreen ? "contents" : "contents md:hidden"}`,
|
|
6023
|
-
children: /* @__PURE__ */ (0,
|
|
6176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DividerLine_default, {})
|
|
6024
6177
|
}
|
|
6025
6178
|
),
|
|
6026
|
-
/* @__PURE__ */ (0,
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
6179
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(VerticalDividerLine_default, {}) }),
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6028
6181
|
OpenEndedActivityMaterialContent_default,
|
|
6029
6182
|
{
|
|
6030
6183
|
answer,
|
|
@@ -6038,14 +6191,14 @@ var OpenEndedActivityContent = ({
|
|
|
6038
6191
|
var OpenEndedActivityContent_default = OpenEndedActivityContent;
|
|
6039
6192
|
|
|
6040
6193
|
// src/components/activities/material-content/OrderingActivityMaterialContent.tsx
|
|
6041
|
-
var
|
|
6194
|
+
var import_react25 = require("react");
|
|
6042
6195
|
var import_react_dnd7 = require("react-dnd");
|
|
6043
6196
|
var import_react_katex8 = require("react-katex");
|
|
6044
6197
|
|
|
6045
6198
|
// src/components/dnds/DraggableDroppableItem.tsx
|
|
6046
|
-
var
|
|
6199
|
+
var import_react24 = require("react");
|
|
6047
6200
|
var import_react_dnd6 = require("react-dnd");
|
|
6048
|
-
var
|
|
6201
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6049
6202
|
var DraggableDroppableItem = ({
|
|
6050
6203
|
key,
|
|
6051
6204
|
item,
|
|
@@ -6056,7 +6209,7 @@ var DraggableDroppableItem = ({
|
|
|
6056
6209
|
target,
|
|
6057
6210
|
setTarget
|
|
6058
6211
|
}) => {
|
|
6059
|
-
const ref = (0,
|
|
6212
|
+
const ref = (0, import_react24.useRef)(null);
|
|
6060
6213
|
const [, drop] = (0, import_react_dnd6.useDrop)({
|
|
6061
6214
|
accept: type,
|
|
6062
6215
|
hover() {
|
|
@@ -6083,12 +6236,12 @@ var DraggableDroppableItem = ({
|
|
|
6083
6236
|
});
|
|
6084
6237
|
const opacity = isDragging ? 0.4 : 1;
|
|
6085
6238
|
drag(drop(ref));
|
|
6086
|
-
return /* @__PURE__ */ (0,
|
|
6239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6087
6240
|
"div",
|
|
6088
6241
|
{
|
|
6089
6242
|
className: `${isDragging ? "w-[0px] opacity-0" : "w-full opacity-100"} transition-all duration-500`,
|
|
6090
6243
|
ref: dropRef,
|
|
6091
|
-
children: /* @__PURE__ */ (0,
|
|
6244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: "w-full", style: { opacity }, children: component })
|
|
6092
6245
|
},
|
|
6093
6246
|
key
|
|
6094
6247
|
);
|
|
@@ -6096,7 +6249,7 @@ var DraggableDroppableItem = ({
|
|
|
6096
6249
|
var DraggableDroppableItem_default = DraggableDroppableItem;
|
|
6097
6250
|
|
|
6098
6251
|
// src/components/activities/material-content/OrderingActivityMaterialContent.tsx
|
|
6099
|
-
var
|
|
6252
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6100
6253
|
var OrderingActivityMaterialContent = ({
|
|
6101
6254
|
uniqueValue,
|
|
6102
6255
|
answer,
|
|
@@ -6107,10 +6260,10 @@ var OrderingActivityMaterialContent = ({
|
|
|
6107
6260
|
isPreview,
|
|
6108
6261
|
showCorrectAnswer
|
|
6109
6262
|
}) => {
|
|
6110
|
-
const [selectedTargetKey, setSelectedTargetKey] = (0,
|
|
6111
|
-
const [selectedKey, setSelectedKey] = (0,
|
|
6263
|
+
const [selectedTargetKey, setSelectedTargetKey] = (0, import_react25.useState)(null);
|
|
6264
|
+
const [selectedKey, setSelectedKey] = (0, import_react25.useState)(null);
|
|
6112
6265
|
const { screenSize } = useScreenSize_default();
|
|
6113
|
-
const [view, setView] = (0,
|
|
6266
|
+
const [view, setView] = (0, import_react25.useState)("PC");
|
|
6114
6267
|
const [{ isOver, canDrop }, drop] = (0, import_react_dnd7.useDrop)({
|
|
6115
6268
|
accept: "ORDERING",
|
|
6116
6269
|
drop: () => {
|
|
@@ -6120,7 +6273,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6120
6273
|
canDrop: monitor.canDrop()
|
|
6121
6274
|
})
|
|
6122
6275
|
});
|
|
6123
|
-
(0,
|
|
6276
|
+
(0, import_react25.useEffect)(() => {
|
|
6124
6277
|
if (!screenSize) return;
|
|
6125
6278
|
if (screenSize.width <= 768) {
|
|
6126
6279
|
setView("TABLET");
|
|
@@ -6128,7 +6281,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6128
6281
|
setView("PC");
|
|
6129
6282
|
}
|
|
6130
6283
|
}, [screenSize]);
|
|
6131
|
-
(0,
|
|
6284
|
+
(0, import_react25.useEffect)(() => {
|
|
6132
6285
|
if (!showCorrectAnswer) return;
|
|
6133
6286
|
const answerMap2 = answer.data.find(
|
|
6134
6287
|
(answerData) => answerData.type === "ORDERING"
|
|
@@ -6173,12 +6326,12 @@ var OrderingActivityMaterialContent = ({
|
|
|
6173
6326
|
return 0;
|
|
6174
6327
|
};
|
|
6175
6328
|
const answerMap = retrieveAnswerMap();
|
|
6176
|
-
return /* @__PURE__ */ (0,
|
|
6329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
6177
6330
|
const learnerAnswerState = checkAnswerState(
|
|
6178
6331
|
answerMap[materialKey] + "",
|
|
6179
6332
|
index + ""
|
|
6180
6333
|
);
|
|
6181
|
-
return /* @__PURE__ */ (0,
|
|
6334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6182
6335
|
"div",
|
|
6183
6336
|
{
|
|
6184
6337
|
className: `flex flex-row items-center my-4 mx-2`,
|
|
@@ -6186,26 +6339,26 @@ var OrderingActivityMaterialContent = ({
|
|
|
6186
6339
|
marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
|
|
6187
6340
|
},
|
|
6188
6341
|
children: [
|
|
6189
|
-
/* @__PURE__ */ (0,
|
|
6342
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mr-3", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6190
6343
|
"div",
|
|
6191
6344
|
{
|
|
6192
6345
|
className: `min-h-catchup-activity-outer-box-item w-catchup-activity-box-item flex flex-col items-center justify-center cursor-pointer transition-all duration-300`,
|
|
6193
|
-
children: /* @__PURE__ */ (0,
|
|
6346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6194
6347
|
"div",
|
|
6195
6348
|
{
|
|
6196
6349
|
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]`,
|
|
6197
|
-
children: /* @__PURE__ */ (0,
|
|
6350
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "", children: parseFloat(materialKey) + 1 })
|
|
6198
6351
|
}
|
|
6199
6352
|
)
|
|
6200
6353
|
}
|
|
6201
6354
|
) }),
|
|
6202
|
-
/* @__PURE__ */ (0,
|
|
6355
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6203
6356
|
DraggableDroppableItem_default,
|
|
6204
6357
|
{
|
|
6205
6358
|
item: { index: materialKey },
|
|
6206
6359
|
type: "ORDERING",
|
|
6207
6360
|
dropRef: drop,
|
|
6208
|
-
component: /* @__PURE__ */ (0,
|
|
6361
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6209
6362
|
"div",
|
|
6210
6363
|
{
|
|
6211
6364
|
className: `${canDrop ? selectedKey !== materialKey ? selectedTargetKey === materialKey ? "bg-catchup-light-blue rounded-catchup-xlarge" : "bg-catchup-light-blue rounded-catchup-xlarge opacity-40" : "" : ""} flex-1 min-h-catchup-activity-outer-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"}`,
|
|
@@ -6214,16 +6367,16 @@ var OrderingActivityMaterialContent = ({
|
|
|
6214
6367
|
setSelectedKey(materialKey);
|
|
6215
6368
|
}
|
|
6216
6369
|
},
|
|
6217
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0,
|
|
6370
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6218
6371
|
materialMap[answerMap[materialKey]]
|
|
6219
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6372
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6220
6373
|
"span",
|
|
6221
6374
|
{
|
|
6222
6375
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6223
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6376
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_katex8.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6224
6377
|
},
|
|
6225
6378
|
index2
|
|
6226
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6379
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6227
6380
|
ShowMaterialMediaByContentType_default,
|
|
6228
6381
|
{
|
|
6229
6382
|
contentType: contentMap.type,
|
|
@@ -6255,7 +6408,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6255
6408
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
6256
6409
|
|
|
6257
6410
|
// src/components/activities/OrderingActivityContent.tsx
|
|
6258
|
-
var
|
|
6411
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6259
6412
|
var OrderingActivityContent = ({
|
|
6260
6413
|
answer,
|
|
6261
6414
|
data,
|
|
@@ -6278,16 +6431,16 @@ var OrderingActivityContent = ({
|
|
|
6278
6431
|
answerMap[secondaryKey] = prevValue;
|
|
6279
6432
|
changeAnswer(answer2);
|
|
6280
6433
|
};
|
|
6281
|
-
return /* @__PURE__ */ (0,
|
|
6282
|
-
/* @__PURE__ */ (0,
|
|
6434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6283
6436
|
ActivityBodyContent_default,
|
|
6284
6437
|
{
|
|
6285
6438
|
bodyMap: orderingBodyMap,
|
|
6286
6439
|
templateType: "ORDERING"
|
|
6287
6440
|
}
|
|
6288
6441
|
),
|
|
6289
|
-
/* @__PURE__ */ (0,
|
|
6290
|
-
/* @__PURE__ */ (0,
|
|
6442
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {}),
|
|
6443
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6291
6444
|
OrderingActivityMaterialContent_default,
|
|
6292
6445
|
{
|
|
6293
6446
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6305,9 +6458,9 @@ var OrderingActivityContent = ({
|
|
|
6305
6458
|
var OrderingActivityContent_default = OrderingActivityContent;
|
|
6306
6459
|
|
|
6307
6460
|
// src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
|
|
6308
|
-
var
|
|
6461
|
+
var import_react26 = require("react");
|
|
6309
6462
|
var import_react_katex9 = require("react-katex");
|
|
6310
|
-
var
|
|
6463
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6311
6464
|
var TrueFalseActivityMaterialContent = ({
|
|
6312
6465
|
uniqueValue,
|
|
6313
6466
|
answer,
|
|
@@ -6319,8 +6472,8 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6319
6472
|
showCorrectAnswer
|
|
6320
6473
|
}) => {
|
|
6321
6474
|
const { screenSize } = useScreenSize_default();
|
|
6322
|
-
const [shuffleOptionList, setShuffleOptionList] = (0,
|
|
6323
|
-
(0,
|
|
6475
|
+
const [shuffleOptionList, setShuffleOptionList] = (0, import_react26.useState)([]);
|
|
6476
|
+
(0, import_react26.useEffect)(() => {
|
|
6324
6477
|
const optionList = [];
|
|
6325
6478
|
optionList.push(...materialMap.trueList);
|
|
6326
6479
|
optionList.push(...materialMap.falseList);
|
|
@@ -6330,7 +6483,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6330
6483
|
setShuffleOptionList(shuffleArray(optionList));
|
|
6331
6484
|
}
|
|
6332
6485
|
}, []);
|
|
6333
|
-
(0,
|
|
6486
|
+
(0, import_react26.useEffect)(() => {
|
|
6334
6487
|
if (!showCorrectAnswer) return;
|
|
6335
6488
|
answer.data.find(
|
|
6336
6489
|
(answerData) => answerData.type === "TRUE_FALSE"
|
|
@@ -6360,14 +6513,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6360
6513
|
return "INCORRECT";
|
|
6361
6514
|
};
|
|
6362
6515
|
const answerMap = retrieveAnswerMap();
|
|
6363
|
-
return /* @__PURE__ */ (0,
|
|
6364
|
-
/* @__PURE__ */ (0,
|
|
6365
|
-
/* @__PURE__ */ (0,
|
|
6366
|
-
/* @__PURE__ */ (0,
|
|
6367
|
-
/* @__PURE__ */ (0,
|
|
6368
|
-
/* @__PURE__ */ (0,
|
|
6516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "", children: [
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
6518
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}) }),
|
|
6519
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
6521
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
6369
6522
|
] }),
|
|
6370
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */ (0,
|
|
6523
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
6371
6524
|
const correctAnswer = materialMap.trueList.find(
|
|
6372
6525
|
(trueItem) => trueItem === shuffleOption
|
|
6373
6526
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -6378,21 +6531,21 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6378
6531
|
correctAnswer,
|
|
6379
6532
|
learnerAnswer
|
|
6380
6533
|
);
|
|
6381
|
-
return /* @__PURE__ */ (0,
|
|
6534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6382
6535
|
"div",
|
|
6383
6536
|
{
|
|
6384
6537
|
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" : ""}`,
|
|
6385
6538
|
children: [
|
|
6386
|
-
/* @__PURE__ */ (0,
|
|
6539
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl p-2 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
6387
6540
|
shuffleOption
|
|
6388
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
6541
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6389
6542
|
"span",
|
|
6390
6543
|
{
|
|
6391
6544
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6392
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6545
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_katex9.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6393
6546
|
},
|
|
6394
6547
|
index2
|
|
6395
|
-
)) }) : /* @__PURE__ */ (0,
|
|
6548
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6396
6549
|
ShowMaterialMediaByContentType_default,
|
|
6397
6550
|
{
|
|
6398
6551
|
contentType: contentMap.type,
|
|
@@ -6401,8 +6554,8 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6401
6554
|
},
|
|
6402
6555
|
`${uniqueValue}-${index}`
|
|
6403
6556
|
) }),
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6405
|
-
/* @__PURE__ */ (0,
|
|
6557
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6406
6559
|
BaseImage_default,
|
|
6407
6560
|
{
|
|
6408
6561
|
src: answerMap.trueList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6413,7 +6566,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6413
6566
|
}
|
|
6414
6567
|
}
|
|
6415
6568
|
) }) }),
|
|
6416
|
-
/* @__PURE__ */ (0,
|
|
6569
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6417
6570
|
BaseImage_default,
|
|
6418
6571
|
{
|
|
6419
6572
|
src: answerMap.falseList.includes(shuffleOption) ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -6429,14 +6582,14 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6429
6582
|
},
|
|
6430
6583
|
index
|
|
6431
6584
|
);
|
|
6432
|
-
}) }) : /* @__PURE__ */ (0,
|
|
6433
|
-
answerMap.trueList.map((item) => /* @__PURE__ */ (0,
|
|
6434
|
-
/* @__PURE__ */ (0,
|
|
6435
|
-
/* @__PURE__ */ (0,
|
|
6585
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
6586
|
+
answerMap.trueList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6587
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: item }) }),
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
6436
6589
|
] })),
|
|
6437
|
-
answerMap.falseList.map((item) => /* @__PURE__ */ (0,
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6590
|
+
answerMap.falseList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6591
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { children: item }) }),
|
|
6592
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[50px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
6440
6593
|
] }))
|
|
6441
6594
|
] })
|
|
6442
6595
|
] });
|
|
@@ -6444,7 +6597,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
6444
6597
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
6445
6598
|
|
|
6446
6599
|
// src/components/activities/TrueFalseActivityContent.tsx
|
|
6447
|
-
var
|
|
6600
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6448
6601
|
var TrueFalseActivityContent = ({
|
|
6449
6602
|
answer,
|
|
6450
6603
|
data,
|
|
@@ -6494,17 +6647,17 @@ var TrueFalseActivityContent = ({
|
|
|
6494
6647
|
}
|
|
6495
6648
|
changeAnswer(answer2);
|
|
6496
6649
|
};
|
|
6497
|
-
return /* @__PURE__ */ (0,
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
6650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
|
|
6651
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6499
6652
|
ActivityBodyContent_default,
|
|
6500
6653
|
{
|
|
6501
6654
|
bodyMap: trueFalseBodyMap,
|
|
6502
6655
|
templateType: "GROUPING"
|
|
6503
6656
|
}
|
|
6504
6657
|
) }),
|
|
6505
|
-
/* @__PURE__ */ (0,
|
|
6506
|
-
/* @__PURE__ */ (0,
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6658
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DividerLine_default, {}) }),
|
|
6659
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VerticalDividerLine_default, {}) }),
|
|
6660
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6508
6661
|
TrueFalseActivityMaterialContent_default,
|
|
6509
6662
|
{
|
|
6510
6663
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -6523,7 +6676,7 @@ var TrueFalseActivityContent_default = TrueFalseActivityContent;
|
|
|
6523
6676
|
|
|
6524
6677
|
// src/components/activities/solution-content/ActivitySolutionContent.tsx
|
|
6525
6678
|
var import_react_katex10 = require("react-katex");
|
|
6526
|
-
var
|
|
6679
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6527
6680
|
var ActivitySolutionContent = ({
|
|
6528
6681
|
activityTemplateType,
|
|
6529
6682
|
data
|
|
@@ -6553,8 +6706,8 @@ var ActivitySolutionContent = ({
|
|
|
6553
6706
|
return null;
|
|
6554
6707
|
}
|
|
6555
6708
|
if (!solutionMap || Object.keys(solutionMap).length === 0) return null;
|
|
6556
|
-
return /* @__PURE__ */ (0,
|
|
6557
|
-
/* @__PURE__ */ (0,
|
|
6709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "p-4 border-catchup-blue border-2 rounded-catchup-xlarge", children: [
|
|
6710
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("solution") }),
|
|
6558
6711
|
Object.keys(solutionMap).map((key) => {
|
|
6559
6712
|
let currentItem;
|
|
6560
6713
|
try {
|
|
@@ -6564,12 +6717,12 @@ var ActivitySolutionContent = ({
|
|
|
6564
6717
|
return null;
|
|
6565
6718
|
}
|
|
6566
6719
|
const { value } = currentItem;
|
|
6567
|
-
return /* @__PURE__ */ (0,
|
|
6568
|
-
(inputPart, partIndex) => /* @__PURE__ */ (0,
|
|
6720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
6721
|
+
(inputPart, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6569
6722
|
"span",
|
|
6570
6723
|
{
|
|
6571
6724
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6572
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6725
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_katex10.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6573
6726
|
},
|
|
6574
6727
|
`${key}_part_${partIndex}`
|
|
6575
6728
|
)
|
|
@@ -6581,7 +6734,7 @@ var ActivitySolutionContent_default = ActivitySolutionContent;
|
|
|
6581
6734
|
|
|
6582
6735
|
// src/components/activities/evaluation-rubric-content/ActivityEvaluationRubricContent.tsx
|
|
6583
6736
|
var import_react_katex11 = require("react-katex");
|
|
6584
|
-
var
|
|
6737
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6585
6738
|
var ActivityEvaluationRubricContent = ({
|
|
6586
6739
|
activityTemplateType,
|
|
6587
6740
|
data
|
|
@@ -6610,21 +6763,21 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6610
6763
|
}
|
|
6611
6764
|
if (!evaluationRubricMap || Object.keys(evaluationRubricMap).length === 0)
|
|
6612
6765
|
return null;
|
|
6613
|
-
return /* @__PURE__ */ (0,
|
|
6614
|
-
/* @__PURE__ */ (0,
|
|
6766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "p-4 border-catchup-gray-400 border-2 rounded-catchup-xlarge", children: [
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-xl font-bold text-center mb-3", children: i18n_default.t("evaluation_rubric") }),
|
|
6615
6768
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
6616
6769
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
6617
6770
|
const { value } = currentItem;
|
|
6618
|
-
return /* @__PURE__ */ (0,
|
|
6771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "my-3", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6619
6772
|
"span",
|
|
6620
6773
|
{
|
|
6621
6774
|
className: "text-xl whitespace-pre-wrap",
|
|
6622
6775
|
children: constructInputWithSpecialExpressionList(value).map(
|
|
6623
|
-
(inputPart, index2) => /* @__PURE__ */ (0,
|
|
6776
|
+
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6624
6777
|
"span",
|
|
6625
6778
|
{
|
|
6626
6779
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6627
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
6780
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_katex11.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
6628
6781
|
},
|
|
6629
6782
|
index2
|
|
6630
6783
|
)
|
|
@@ -6638,31 +6791,31 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6638
6791
|
var ActivityEvaluationRubricContent_default = ActivityEvaluationRubricContent;
|
|
6639
6792
|
|
|
6640
6793
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
6641
|
-
var
|
|
6794
|
+
var import_react27 = require("react");
|
|
6642
6795
|
|
|
6643
6796
|
// src/components/boxes/SelectionBox.tsx
|
|
6644
|
-
var
|
|
6797
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6645
6798
|
var SelectionBox = ({
|
|
6646
6799
|
optionList,
|
|
6647
6800
|
selectedId,
|
|
6648
6801
|
handleSelectOnClick
|
|
6649
6802
|
}) => {
|
|
6650
|
-
return /* @__PURE__ */ (0,
|
|
6803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6651
6804
|
"div",
|
|
6652
6805
|
{
|
|
6653
6806
|
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`,
|
|
6654
6807
|
onClick: () => {
|
|
6655
6808
|
handleSelectOnClick(option.id);
|
|
6656
6809
|
},
|
|
6657
|
-
children: /* @__PURE__ */ (0,
|
|
6810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6658
6811
|
"div",
|
|
6659
6812
|
{
|
|
6660
6813
|
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
6661
6814
|
children: [
|
|
6662
6815
|
option.icon,
|
|
6663
|
-
/* @__PURE__ */ (0,
|
|
6664
|
-
/* @__PURE__ */ (0,
|
|
6665
|
-
option.subText ? /* @__PURE__ */ (0,
|
|
6816
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: option.text }),
|
|
6818
|
+
option.subText ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-md", children: [
|
|
6666
6819
|
"(",
|
|
6667
6820
|
option.subText,
|
|
6668
6821
|
")"
|
|
@@ -6678,7 +6831,7 @@ var SelectionBox = ({
|
|
|
6678
6831
|
var SelectionBox_default = SelectionBox;
|
|
6679
6832
|
|
|
6680
6833
|
// src/components/activities/ActivityPreviewByData.tsx
|
|
6681
|
-
var
|
|
6834
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6682
6835
|
var ActivityPreviewByData = ({
|
|
6683
6836
|
data,
|
|
6684
6837
|
showType,
|
|
@@ -6690,14 +6843,14 @@ var ActivityPreviewByData = ({
|
|
|
6690
6843
|
showTaxonomy,
|
|
6691
6844
|
isFullScreen
|
|
6692
6845
|
}) => {
|
|
6693
|
-
const [key, setKey] = (0,
|
|
6694
|
-
const [selectedType, setSelectedType] = (0,
|
|
6695
|
-
const [optionList, setOptionList] = (0,
|
|
6696
|
-
(0,
|
|
6846
|
+
const [key, setKey] = (0, import_react27.useState)((/* @__PURE__ */ new Date()).getTime());
|
|
6847
|
+
const [selectedType, setSelectedType] = (0, import_react27.useState)(null);
|
|
6848
|
+
const [optionList, setOptionList] = (0, import_react27.useState)([]);
|
|
6849
|
+
(0, import_react27.useEffect)(() => {
|
|
6697
6850
|
if (!data) return;
|
|
6698
6851
|
setKey((/* @__PURE__ */ new Date()).getTime());
|
|
6699
6852
|
}, [data]);
|
|
6700
|
-
(0,
|
|
6853
|
+
(0, import_react27.useEffect)(() => {
|
|
6701
6854
|
if (!typeOptionList) return;
|
|
6702
6855
|
if (typeOptionList.length === 0) return;
|
|
6703
6856
|
let foundTypeOption;
|
|
@@ -6712,7 +6865,7 @@ var ActivityPreviewByData = ({
|
|
|
6712
6865
|
setSelectedType(typeOptionList[0].id);
|
|
6713
6866
|
}
|
|
6714
6867
|
}, [typeOptionList, lockedType]);
|
|
6715
|
-
(0,
|
|
6868
|
+
(0, import_react27.useEffect)(() => {
|
|
6716
6869
|
const retrieveTaxonomyNameByActivityTypeFromData = (type) => {
|
|
6717
6870
|
let taxonomyMap = {
|
|
6718
6871
|
name: ""
|
|
@@ -6761,10 +6914,10 @@ var ActivityPreviewByData = ({
|
|
|
6761
6914
|
}, [data, lockedType, typeOptionList, showTaxonomy]);
|
|
6762
6915
|
if (!data) return;
|
|
6763
6916
|
const answer = constructAnswerBasedOnData(data);
|
|
6764
|
-
return /* @__PURE__ */ (0,
|
|
6765
|
-
showType ? /* @__PURE__ */ (0,
|
|
6766
|
-
showDescription ? /* @__PURE__ */ (0,
|
|
6767
|
-
/* @__PURE__ */ (0,
|
|
6917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
6918
|
+
showType ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mb-4", children: [
|
|
6919
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
6920
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6768
6921
|
SelectionBox_default,
|
|
6769
6922
|
{
|
|
6770
6923
|
optionList,
|
|
@@ -6775,7 +6928,7 @@ var ActivityPreviewByData = ({
|
|
|
6775
6928
|
}
|
|
6776
6929
|
)
|
|
6777
6930
|
] }) : null,
|
|
6778
|
-
selectedType ? /* @__PURE__ */ (0,
|
|
6931
|
+
selectedType ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6779
6932
|
OrderingActivityContent_default,
|
|
6780
6933
|
{
|
|
6781
6934
|
answer,
|
|
@@ -6789,7 +6942,7 @@ var ActivityPreviewByData = ({
|
|
|
6789
6942
|
showCorrectAnswer: true,
|
|
6790
6943
|
isFullScreen
|
|
6791
6944
|
}
|
|
6792
|
-
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
6945
|
+
) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6793
6946
|
DropdownActivityContent_default,
|
|
6794
6947
|
{
|
|
6795
6948
|
answer,
|
|
@@ -6803,7 +6956,7 @@ var ActivityPreviewByData = ({
|
|
|
6803
6956
|
showCorrectAnswer: true,
|
|
6804
6957
|
isFullScreen
|
|
6805
6958
|
}
|
|
6806
|
-
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
6959
|
+
) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6807
6960
|
MCSAActivityContent_default,
|
|
6808
6961
|
{
|
|
6809
6962
|
answer,
|
|
@@ -6817,7 +6970,7 @@ var ActivityPreviewByData = ({
|
|
|
6817
6970
|
showCorrectAnswer: true,
|
|
6818
6971
|
isFullScreen
|
|
6819
6972
|
}
|
|
6820
|
-
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
6973
|
+
) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6821
6974
|
MCMAActivityContent_default,
|
|
6822
6975
|
{
|
|
6823
6976
|
answer,
|
|
@@ -6831,7 +6984,7 @@ var ActivityPreviewByData = ({
|
|
|
6831
6984
|
showCorrectAnswer: true,
|
|
6832
6985
|
isFullScreen
|
|
6833
6986
|
}
|
|
6834
|
-
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
6987
|
+
) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6835
6988
|
MatchingActivityContent_default,
|
|
6836
6989
|
{
|
|
6837
6990
|
answer,
|
|
@@ -6845,7 +6998,7 @@ var ActivityPreviewByData = ({
|
|
|
6845
6998
|
showCorrectAnswer: true,
|
|
6846
6999
|
isFullScreen
|
|
6847
7000
|
}
|
|
6848
|
-
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7001
|
+
) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6849
7002
|
GroupingActivityContent_default,
|
|
6850
7003
|
{
|
|
6851
7004
|
answer,
|
|
@@ -6859,7 +7012,7 @@ var ActivityPreviewByData = ({
|
|
|
6859
7012
|
showCorrectAnswer: true,
|
|
6860
7013
|
isFullScreen
|
|
6861
7014
|
}
|
|
6862
|
-
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7015
|
+
) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6863
7016
|
FillInTheBlanksActivityContent_default,
|
|
6864
7017
|
{
|
|
6865
7018
|
answer,
|
|
@@ -6873,7 +7026,7 @@ var ActivityPreviewByData = ({
|
|
|
6873
7026
|
showCorrectAnswer: true,
|
|
6874
7027
|
isFullScreen
|
|
6875
7028
|
}
|
|
6876
|
-
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ (0,
|
|
7029
|
+
) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6877
7030
|
OpenEndedActivityContent_default,
|
|
6878
7031
|
{
|
|
6879
7032
|
answer,
|
|
@@ -6883,7 +7036,7 @@ var ActivityPreviewByData = ({
|
|
|
6883
7036
|
data,
|
|
6884
7037
|
isFullScreen
|
|
6885
7038
|
}
|
|
6886
|
-
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0,
|
|
7039
|
+
) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6887
7040
|
TrueFalseActivityContent_default,
|
|
6888
7041
|
{
|
|
6889
7042
|
answer,
|
|
@@ -6898,14 +7051,14 @@ var ActivityPreviewByData = ({
|
|
|
6898
7051
|
isFullScreen
|
|
6899
7052
|
}
|
|
6900
7053
|
) : null }, selectedType) : null,
|
|
6901
|
-
selectedType && showSolution ? /* @__PURE__ */ (0,
|
|
7054
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6902
7055
|
ActivitySolutionContent_default,
|
|
6903
7056
|
{
|
|
6904
7057
|
activityTemplateType: selectedType,
|
|
6905
7058
|
data
|
|
6906
7059
|
}
|
|
6907
7060
|
) }) : null,
|
|
6908
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0,
|
|
7061
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6909
7062
|
ActivityEvaluationRubricContent_default,
|
|
6910
7063
|
{
|
|
6911
7064
|
activityTemplateType: selectedType,
|
|
@@ -6917,8 +7070,8 @@ var ActivityPreviewByData = ({
|
|
|
6917
7070
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
6918
7071
|
|
|
6919
7072
|
// src/components/activities/ActivityPreviewByAnswerData.tsx
|
|
6920
|
-
var
|
|
6921
|
-
var
|
|
7073
|
+
var import_react28 = require("react");
|
|
7074
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6922
7075
|
var ActivityPreviewByAnswerData = ({
|
|
6923
7076
|
data,
|
|
6924
7077
|
showType = true,
|
|
@@ -6932,11 +7085,11 @@ var ActivityPreviewByAnswerData = ({
|
|
|
6932
7085
|
showCorrectAnswer = false
|
|
6933
7086
|
}) => {
|
|
6934
7087
|
var _a;
|
|
6935
|
-
const [key, setKey] = (0,
|
|
6936
|
-
const [selectedType, setSelectedType] = (0,
|
|
6937
|
-
const [optionList, setOptionList] = (0,
|
|
6938
|
-
const [answer, setAnswer] = (0,
|
|
6939
|
-
(0,
|
|
7088
|
+
const [key, setKey] = (0, import_react28.useState)((/* @__PURE__ */ new Date()).getTime());
|
|
7089
|
+
const [selectedType, setSelectedType] = (0, import_react28.useState)(null);
|
|
7090
|
+
const [optionList, setOptionList] = (0, import_react28.useState)([]);
|
|
7091
|
+
const [answer, setAnswer] = (0, import_react28.useState)({ data: [] });
|
|
7092
|
+
(0, import_react28.useEffect)(() => {
|
|
6940
7093
|
if (!data) return;
|
|
6941
7094
|
setKey((/* @__PURE__ */ new Date()).getTime());
|
|
6942
7095
|
}, [data]);
|
|
@@ -6973,7 +7126,7 @@ var ActivityPreviewByAnswerData = ({
|
|
|
6973
7126
|
}
|
|
6974
7127
|
return taxonomyMap.name || "";
|
|
6975
7128
|
};
|
|
6976
|
-
(0,
|
|
7129
|
+
(0, import_react28.useEffect)(() => {
|
|
6977
7130
|
if (!data) return;
|
|
6978
7131
|
const constructAnswerBasedOnData2 = () => {
|
|
6979
7132
|
const newAnswer = { data: [] };
|
|
@@ -7012,7 +7165,7 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7012
7165
|
};
|
|
7013
7166
|
constructAnswerBasedOnData2();
|
|
7014
7167
|
}, [data, lockedType]);
|
|
7015
|
-
(0,
|
|
7168
|
+
(0, import_react28.useEffect)(() => {
|
|
7016
7169
|
if (!data || !answer.data.length) return;
|
|
7017
7170
|
let currentTypeOptionList = typeOptionList || answer.data.map((item) => ({
|
|
7018
7171
|
id: item.type,
|
|
@@ -7045,37 +7198,37 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7045
7198
|
};
|
|
7046
7199
|
switch (selectedType) {
|
|
7047
7200
|
case "ORDERING":
|
|
7048
|
-
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0,
|
|
7201
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OrderingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7049
7202
|
case "DROPDOWN":
|
|
7050
|
-
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0,
|
|
7203
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DropdownActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7051
7204
|
case "MCSA":
|
|
7052
|
-
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0,
|
|
7205
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MCSAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7053
7206
|
case "MCMA":
|
|
7054
|
-
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0,
|
|
7207
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MCMAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7055
7208
|
case "MATCHING":
|
|
7056
|
-
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0,
|
|
7209
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MatchingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7057
7210
|
case "GROUPING":
|
|
7058
|
-
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0,
|
|
7211
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(GroupingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7059
7212
|
case "FILL_IN_THE_BLANKS":
|
|
7060
|
-
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0,
|
|
7213
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7061
7214
|
case "OPEN_ENDED":
|
|
7062
|
-
return data.openEndedBodyMap ? /* @__PURE__ */ (0,
|
|
7215
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7063
7216
|
OpenEndedActivityContent_default,
|
|
7064
7217
|
__spreadProps(__spreadValues({}, commonProps), {
|
|
7065
7218
|
showMaterialContent: true
|
|
7066
7219
|
})
|
|
7067
7220
|
) : null;
|
|
7068
7221
|
case "TRUE_FALSE":
|
|
7069
|
-
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0,
|
|
7222
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TrueFalseActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
7070
7223
|
default:
|
|
7071
7224
|
return null;
|
|
7072
7225
|
}
|
|
7073
7226
|
};
|
|
7074
7227
|
if (!data) return null;
|
|
7075
|
-
return /* @__PURE__ */ (0,
|
|
7076
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ (0,
|
|
7077
|
-
showDescription ? /* @__PURE__ */ (0,
|
|
7078
|
-
/* @__PURE__ */ (0,
|
|
7228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { children: [
|
|
7229
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mb-4", children: [
|
|
7230
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7231
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7079
7232
|
SelectionBox_default,
|
|
7080
7233
|
{
|
|
7081
7234
|
optionList,
|
|
@@ -7086,19 +7239,19 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7086
7239
|
}
|
|
7087
7240
|
)
|
|
7088
7241
|
] }) : null,
|
|
7089
|
-
/* @__PURE__ */ (0,
|
|
7090
|
-
/* @__PURE__ */ (0,
|
|
7091
|
-
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0,
|
|
7092
|
-
selectedType ? /* @__PURE__ */ (0,
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DividerLine_default, {}),
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
7244
|
+
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ActivityEmptyContent_default, {}) : null,
|
|
7245
|
+
selectedType ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
|
7093
7246
|
] }),
|
|
7094
|
-
selectedType && showSolution ? /* @__PURE__ */ (0,
|
|
7247
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7095
7248
|
ActivitySolutionContent_default,
|
|
7096
7249
|
{
|
|
7097
7250
|
activityTemplateType: selectedType,
|
|
7098
7251
|
data
|
|
7099
7252
|
}
|
|
7100
7253
|
) }) : null,
|
|
7101
|
-
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0,
|
|
7254
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7102
7255
|
ActivityEvaluationRubricContent_default,
|
|
7103
7256
|
{
|
|
7104
7257
|
activityTemplateType: selectedType,
|
|
@@ -7110,9 +7263,9 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7110
7263
|
var ActivityPreviewByAnswerData_default = ActivityPreviewByAnswerData;
|
|
7111
7264
|
|
|
7112
7265
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
7113
|
-
var
|
|
7266
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7114
7267
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
7115
|
-
return /* @__PURE__ */ (0,
|
|
7268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7116
7269
|
"div",
|
|
7117
7270
|
{
|
|
7118
7271
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -7122,7 +7275,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
7122
7275
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
7123
7276
|
|
|
7124
7277
|
// src/components/groups/LeftTextRightInputGroup.tsx
|
|
7125
|
-
var
|
|
7278
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7126
7279
|
var LeftTextRightInputGroup = ({
|
|
7127
7280
|
type,
|
|
7128
7281
|
title,
|
|
@@ -7132,9 +7285,9 @@ var LeftTextRightInputGroup = ({
|
|
|
7132
7285
|
disabled,
|
|
7133
7286
|
errorText
|
|
7134
7287
|
}) => {
|
|
7135
|
-
return /* @__PURE__ */ (0,
|
|
7136
|
-
/* @__PURE__ */ (0,
|
|
7137
|
-
/* @__PURE__ */ (0,
|
|
7288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "w-full flex flex-row mx-2", children: [
|
|
7289
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { children: title }) }),
|
|
7290
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7138
7291
|
InputGroup_default,
|
|
7139
7292
|
{
|
|
7140
7293
|
type,
|
|
@@ -7150,14 +7303,14 @@ var LeftTextRightInputGroup = ({
|
|
|
7150
7303
|
var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
|
|
7151
7304
|
|
|
7152
7305
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
7153
|
-
var
|
|
7306
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7154
7307
|
var SelectionCheckbox = ({
|
|
7155
7308
|
optionList,
|
|
7156
7309
|
selectedIdList,
|
|
7157
7310
|
handleSelectOnClick,
|
|
7158
7311
|
handleRemoveOnClick
|
|
7159
7312
|
}) => {
|
|
7160
|
-
return /* @__PURE__ */ (0,
|
|
7313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.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_runtime51.jsx)(
|
|
7161
7314
|
"div",
|
|
7162
7315
|
{
|
|
7163
7316
|
className: `${selectedIdList.findIndex(
|
|
@@ -7172,14 +7325,14 @@ var SelectionCheckbox = ({
|
|
|
7172
7325
|
handleRemoveOnClick(option.id);
|
|
7173
7326
|
}
|
|
7174
7327
|
},
|
|
7175
|
-
children: /* @__PURE__ */ (0,
|
|
7328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
7176
7329
|
"div",
|
|
7177
7330
|
{
|
|
7178
7331
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
7179
7332
|
(selectedId) => selectedId === option.id
|
|
7180
7333
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
7181
7334
|
children: [
|
|
7182
|
-
/* @__PURE__ */ (0,
|
|
7335
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7183
7336
|
BaseImage_default,
|
|
7184
7337
|
{
|
|
7185
7338
|
src: selectedIdList.findIndex(
|
|
@@ -7189,7 +7342,7 @@ var SelectionCheckbox = ({
|
|
|
7189
7342
|
size: "small"
|
|
7190
7343
|
}
|
|
7191
7344
|
),
|
|
7192
|
-
/* @__PURE__ */ (0,
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: option.text }) })
|
|
7193
7346
|
]
|
|
7194
7347
|
}
|
|
7195
7348
|
)
|
|
@@ -7200,7 +7353,7 @@ var SelectionCheckbox = ({
|
|
|
7200
7353
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
7201
7354
|
|
|
7202
7355
|
// src/components/tabs/SelectionTab.tsx
|
|
7203
|
-
var
|
|
7356
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7204
7357
|
var SelectionTab = ({
|
|
7205
7358
|
optionList,
|
|
7206
7359
|
selectedId,
|
|
@@ -7210,7 +7363,7 @@ var SelectionTab = ({
|
|
|
7210
7363
|
textColor,
|
|
7211
7364
|
borderColor
|
|
7212
7365
|
}) => {
|
|
7213
|
-
return /* @__PURE__ */ (0,
|
|
7366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.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_runtime52.jsxs)(
|
|
7214
7367
|
"div",
|
|
7215
7368
|
{
|
|
7216
7369
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
@@ -7218,8 +7371,8 @@ var SelectionTab = ({
|
|
|
7218
7371
|
handleSelectOnClick(option.id);
|
|
7219
7372
|
},
|
|
7220
7373
|
children: [
|
|
7221
|
-
/* @__PURE__ */ (0,
|
|
7222
|
-
option.subTitle ? /* @__PURE__ */ (0,
|
|
7374
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-lg", children: option.title }),
|
|
7375
|
+
option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-md", children: option.subTitle }) : null
|
|
7223
7376
|
]
|
|
7224
7377
|
},
|
|
7225
7378
|
index
|
|
@@ -7228,20 +7381,20 @@ var SelectionTab = ({
|
|
|
7228
7381
|
var SelectionTab_default = SelectionTab;
|
|
7229
7382
|
|
|
7230
7383
|
// src/components/tabs/SelectionTabFill.tsx
|
|
7231
|
-
var
|
|
7384
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7232
7385
|
var SelectionTabFill = ({
|
|
7233
7386
|
optionList,
|
|
7234
7387
|
selectedId,
|
|
7235
7388
|
handleSelectOnClick
|
|
7236
7389
|
}) => {
|
|
7237
|
-
return /* @__PURE__ */ (0,
|
|
7390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.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_runtime53.jsx)(
|
|
7238
7391
|
"div",
|
|
7239
7392
|
{
|
|
7240
7393
|
className: "cursor-pointer",
|
|
7241
7394
|
onClick: () => {
|
|
7242
7395
|
handleSelectOnClick(option.id);
|
|
7243
7396
|
},
|
|
7244
|
-
children: /* @__PURE__ */ (0,
|
|
7397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7245
7398
|
"p",
|
|
7246
7399
|
{
|
|
7247
7400
|
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`,
|
|
@@ -7255,57 +7408,57 @@ var SelectionTabFill = ({
|
|
|
7255
7408
|
var SelectionTabFill_default = SelectionTabFill;
|
|
7256
7409
|
|
|
7257
7410
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
7258
|
-
var
|
|
7411
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7259
7412
|
var ActivityTemplateLabel = ({
|
|
7260
7413
|
title,
|
|
7261
7414
|
font
|
|
7262
7415
|
}) => {
|
|
7263
|
-
return /* @__PURE__ */ (0,
|
|
7264
|
-
/* @__PURE__ */ (0,
|
|
7265
|
-
/* @__PURE__ */ (0,
|
|
7416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7417
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7266
7419
|
] }) });
|
|
7267
7420
|
};
|
|
7268
7421
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
7269
7422
|
|
|
7270
7423
|
// src/components/labels/BrandLabel.tsx
|
|
7271
|
-
var
|
|
7424
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7272
7425
|
var BrandLabel = ({ title, icon, font }) => {
|
|
7273
|
-
return /* @__PURE__ */ (0,
|
|
7274
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7275
|
-
/* @__PURE__ */ (0,
|
|
7426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7427
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
|
|
7428
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7276
7429
|
] }) });
|
|
7277
7430
|
};
|
|
7278
7431
|
var BrandLabel_default = BrandLabel;
|
|
7279
7432
|
|
|
7280
7433
|
// src/components/labels/CoterieLabel.tsx
|
|
7281
|
-
var
|
|
7434
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7282
7435
|
var CoterieLabel = ({ title, font }) => {
|
|
7283
|
-
return /* @__PURE__ */ (0,
|
|
7436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7284
7437
|
};
|
|
7285
7438
|
var CoterieLabel_default = CoterieLabel;
|
|
7286
7439
|
|
|
7287
7440
|
// src/components/labels/GradeLabel.tsx
|
|
7288
|
-
var
|
|
7441
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7289
7442
|
var GradeLabel = ({ title, font }) => {
|
|
7290
|
-
return /* @__PURE__ */ (0,
|
|
7443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7291
7444
|
};
|
|
7292
7445
|
var GradeLabel_default = GradeLabel;
|
|
7293
7446
|
|
|
7294
7447
|
// src/components/labels/OutcomeLabel.tsx
|
|
7295
|
-
var
|
|
7448
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7296
7449
|
var OutcomeLabel = ({ title, font }) => {
|
|
7297
|
-
return /* @__PURE__ */ (0,
|
|
7298
|
-
/* @__PURE__ */ (0,
|
|
7299
|
-
/* @__PURE__ */ (0,
|
|
7450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7451
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
|
|
7452
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7300
7453
|
] }) });
|
|
7301
7454
|
};
|
|
7302
7455
|
var OutcomeLabel_default = OutcomeLabel;
|
|
7303
7456
|
|
|
7304
7457
|
// src/components/labels/PersonalLabel.tsx
|
|
7305
|
-
var
|
|
7458
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7306
7459
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
7307
|
-
return /* @__PURE__ */ (0,
|
|
7308
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7461
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7309
7462
|
BaseImage_default,
|
|
7310
7463
|
{
|
|
7311
7464
|
src: "/icons/personal-label.webp",
|
|
@@ -7313,16 +7466,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
7313
7466
|
size: "xsmall"
|
|
7314
7467
|
}
|
|
7315
7468
|
),
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7469
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7317
7470
|
] }) });
|
|
7318
7471
|
};
|
|
7319
7472
|
var PersonalLabel_default = PersonalLabel;
|
|
7320
7473
|
|
|
7321
7474
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
7322
|
-
var
|
|
7475
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7323
7476
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
7324
|
-
return /* @__PURE__ */ (0,
|
|
7325
|
-
icon ? icon : /* @__PURE__ */ (0,
|
|
7477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
7478
|
+
icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7326
7479
|
BaseImage_default,
|
|
7327
7480
|
{
|
|
7328
7481
|
src: "/icons/publishing-house-label.webp",
|
|
@@ -7330,79 +7483,79 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
7330
7483
|
size: "xsmall"
|
|
7331
7484
|
}
|
|
7332
7485
|
),
|
|
7333
|
-
/* @__PURE__ */ (0,
|
|
7486
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: font ? font : "text-sm", children: title })
|
|
7334
7487
|
] }) });
|
|
7335
7488
|
};
|
|
7336
7489
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
7337
7490
|
|
|
7338
7491
|
// src/components/labels/ActivityLabel.tsx
|
|
7339
|
-
var
|
|
7492
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7340
7493
|
var ActivityLabel = ({ title, font }) => {
|
|
7341
|
-
return /* @__PURE__ */ (0,
|
|
7494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: font ? font : "text-sm", children: title }) });
|
|
7342
7495
|
};
|
|
7343
7496
|
var ActivityLabel_default = ActivityLabel;
|
|
7344
7497
|
|
|
7345
7498
|
// src/components/infos/InfoWithText.tsx
|
|
7346
|
-
var
|
|
7499
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7347
7500
|
var InfoWithText = (props) => {
|
|
7348
7501
|
const { value } = props;
|
|
7349
|
-
return /* @__PURE__ */ (0,
|
|
7350
|
-
/* @__PURE__ */ (0,
|
|
7351
|
-
/* @__PURE__ */ (0,
|
|
7502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
|
|
7504
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "", children: value }) })
|
|
7352
7505
|
] });
|
|
7353
7506
|
};
|
|
7354
7507
|
var InfoWithText_default = InfoWithText;
|
|
7355
7508
|
|
|
7356
7509
|
// src/components/texts/InputWithSpecialExpression.tsx
|
|
7357
7510
|
var import_react_katex12 = require("react-katex");
|
|
7358
|
-
var
|
|
7511
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7359
7512
|
var InputWithSpecialExpression = ({
|
|
7360
7513
|
value,
|
|
7361
7514
|
showSpecialOnly
|
|
7362
7515
|
}) => {
|
|
7363
7516
|
const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
|
|
7364
|
-
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0,
|
|
7517
|
+
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7365
7518
|
"span",
|
|
7366
7519
|
{
|
|
7367
7520
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7368
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7521
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
7369
7522
|
}
|
|
7370
|
-
)) }) }) : null : /* @__PURE__ */ (0,
|
|
7523
|
+
)) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7371
7524
|
"span",
|
|
7372
7525
|
{
|
|
7373
7526
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7374
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
7527
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
7375
7528
|
}
|
|
7376
7529
|
)) }) });
|
|
7377
7530
|
};
|
|
7378
7531
|
var InputWithSpecialExpression_default = InputWithSpecialExpression;
|
|
7379
7532
|
|
|
7380
7533
|
// src/components/titles/BaseTitle.tsx
|
|
7381
|
-
var
|
|
7534
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7382
7535
|
var BaseTitle = ({
|
|
7383
7536
|
title,
|
|
7384
7537
|
totalItemCount,
|
|
7385
7538
|
itemName,
|
|
7386
7539
|
description
|
|
7387
7540
|
}) => {
|
|
7388
|
-
return /* @__PURE__ */ (0,
|
|
7389
|
-
/* @__PURE__ */ (0,
|
|
7541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
|
|
7542
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("p", { className: "text-2xl font-medium", children: [
|
|
7390
7543
|
title,
|
|
7391
|
-
totalItemCount && itemName ? /* @__PURE__ */ (0,
|
|
7544
|
+
totalItemCount && itemName ? /* @__PURE__ */ (0, import_jsx_runtime64.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: [
|
|
7392
7545
|
totalItemCount,
|
|
7393
7546
|
" ",
|
|
7394
7547
|
itemName
|
|
7395
7548
|
] }) : null
|
|
7396
7549
|
] }),
|
|
7397
|
-
description ? /* @__PURE__ */ (0,
|
|
7550
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "", children: description }) : null
|
|
7398
7551
|
] });
|
|
7399
7552
|
};
|
|
7400
7553
|
var BaseTitle_default = BaseTitle;
|
|
7401
7554
|
|
|
7402
7555
|
// src/components/titles/SubTitle.tsx
|
|
7403
|
-
var
|
|
7556
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7404
7557
|
var SubTitle = ({ title }) => {
|
|
7405
|
-
return /* @__PURE__ */ (0,
|
|
7558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
|
|
7406
7559
|
};
|
|
7407
7560
|
var SubTitle_default = SubTitle;
|
|
7408
7561
|
|
|
@@ -8885,6 +9038,50 @@ var constructWeekName = (beginDate, endDate, untilSunday) => {
|
|
|
8885
9038
|
}
|
|
8886
9039
|
}
|
|
8887
9040
|
};
|
|
9041
|
+
var retrieveTimeFilterOptionList = () => {
|
|
9042
|
+
return [
|
|
9043
|
+
{
|
|
9044
|
+
text: i18n_default.t("all_time"),
|
|
9045
|
+
value: "all"
|
|
9046
|
+
},
|
|
9047
|
+
{
|
|
9048
|
+
text: i18n_default.t("today"),
|
|
9049
|
+
value: "today"
|
|
9050
|
+
},
|
|
9051
|
+
{
|
|
9052
|
+
text: i18n_default.t("yesterday"),
|
|
9053
|
+
value: "yesterday"
|
|
9054
|
+
},
|
|
9055
|
+
{
|
|
9056
|
+
text: i18n_default.t("this_week"),
|
|
9057
|
+
value: "this_week"
|
|
9058
|
+
},
|
|
9059
|
+
{
|
|
9060
|
+
text: i18n_default.t("last_week"),
|
|
9061
|
+
value: "last_week"
|
|
9062
|
+
},
|
|
9063
|
+
{
|
|
9064
|
+
text: i18n_default.t("this_month"),
|
|
9065
|
+
value: "this_month"
|
|
9066
|
+
},
|
|
9067
|
+
{
|
|
9068
|
+
text: i18n_default.t("last_month"),
|
|
9069
|
+
value: "last_month"
|
|
9070
|
+
},
|
|
9071
|
+
{
|
|
9072
|
+
text: i18n_default.t("last_7_days"),
|
|
9073
|
+
value: "last_7_days"
|
|
9074
|
+
},
|
|
9075
|
+
{
|
|
9076
|
+
text: i18n_default.t("last_30_days"),
|
|
9077
|
+
value: "last_30_days"
|
|
9078
|
+
},
|
|
9079
|
+
{
|
|
9080
|
+
text: i18n_default.t("last_90_days"),
|
|
9081
|
+
value: "last_90_days"
|
|
9082
|
+
}
|
|
9083
|
+
];
|
|
9084
|
+
};
|
|
8888
9085
|
|
|
8889
9086
|
// src/utilization/FunctionUtilization.ts
|
|
8890
9087
|
var calculateLevenshteinDistance = (s, t) => {
|
|
@@ -9990,7 +10187,9 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
9990
10187
|
OutcomeLabel,
|
|
9991
10188
|
PersonalLabel,
|
|
9992
10189
|
PrimaryButton,
|
|
10190
|
+
ProgressBar,
|
|
9993
10191
|
PublishingHouseLabel,
|
|
10192
|
+
ScoreBar,
|
|
9994
10193
|
SecondaryButton,
|
|
9995
10194
|
SelectionBox,
|
|
9996
10195
|
SelectionCheckbox,
|
|
@@ -9998,6 +10197,7 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
9998
10197
|
SelectionTabFill,
|
|
9999
10198
|
SubTitle,
|
|
10000
10199
|
THREE_MONTHS,
|
|
10200
|
+
TimedProgressBar,
|
|
10001
10201
|
TrueFalseActivityContent,
|
|
10002
10202
|
VerticalDividerLine,
|
|
10003
10203
|
adjustForTimezone,
|
|
@@ -10110,6 +10310,7 @@ var retrieveActivityMethodologyOptionList = () => {
|
|
|
10110
10310
|
retrieveTaxonomyName,
|
|
10111
10311
|
retrieveTaxonomyType,
|
|
10112
10312
|
retrieveTeachingMethodologyOptionList,
|
|
10313
|
+
retrieveTimeFilterOptionList,
|
|
10113
10314
|
retrieveTokenUsageSubTypeOptionList,
|
|
10114
10315
|
retrieveTokenUsageTypeOptionList,
|
|
10115
10316
|
retrieveTotalTimeSpentInMinutes,
|