catchup-library-web 1.11.0 → 1.11.2
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 +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +255 -60
- package/dist/index.mjs +254 -60
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByAnswerData.tsx +301 -0
- package/src/index.ts +1 -0
- package/src/properties/ActivityProperties.ts +13 -0
package/dist/index.mjs
CHANGED
|
@@ -6512,10 +6512,203 @@ var ActivityPreviewByData = ({
|
|
|
6512
6512
|
};
|
|
6513
6513
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
6514
6514
|
|
|
6515
|
+
// src/components/activities/ActivityPreviewByAnswerData.tsx
|
|
6516
|
+
import { useEffect as useEffect14, useState as useState22 } from "react";
|
|
6517
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6518
|
+
var ActivityPreviewByAnswerData = ({
|
|
6519
|
+
data,
|
|
6520
|
+
showType = true,
|
|
6521
|
+
showDescription = true,
|
|
6522
|
+
lockedType = null,
|
|
6523
|
+
typeOptionList = [],
|
|
6524
|
+
showSolution = false,
|
|
6525
|
+
showEvaluationRubric = false,
|
|
6526
|
+
showTaxonomy = true,
|
|
6527
|
+
isFullScreen = false,
|
|
6528
|
+
showCorrectAnswer = false
|
|
6529
|
+
}) => {
|
|
6530
|
+
var _a;
|
|
6531
|
+
const [key, setKey] = useState22((/* @__PURE__ */ new Date()).getTime());
|
|
6532
|
+
const [selectedType, setSelectedType] = useState22(null);
|
|
6533
|
+
const [optionList, setOptionList] = useState22([]);
|
|
6534
|
+
const [answer, setAnswer] = useState22({ data: [] });
|
|
6535
|
+
useEffect14(() => {
|
|
6536
|
+
if (!data) return;
|
|
6537
|
+
setKey((/* @__PURE__ */ new Date()).getTime());
|
|
6538
|
+
}, [data]);
|
|
6539
|
+
const checkAnswerMapExists = (type) => {
|
|
6540
|
+
if (data && data.answerMap && Array.isArray(data.answerMap)) {
|
|
6541
|
+
const foundAnswer = data.answerMap.find(
|
|
6542
|
+
(answer2) => answer2.type === type
|
|
6543
|
+
);
|
|
6544
|
+
return foundAnswer || null;
|
|
6545
|
+
}
|
|
6546
|
+
return null;
|
|
6547
|
+
};
|
|
6548
|
+
const retrieveTaxonomyNameFromActivityType = (type) => {
|
|
6549
|
+
if (!data) return "";
|
|
6550
|
+
let taxonomyMap = { name: "" };
|
|
6551
|
+
const taxonomyMapNames = {
|
|
6552
|
+
ORDERING: "orderingTaxonomyMap",
|
|
6553
|
+
DROPDOWN: "dropdownTaxonomyMap",
|
|
6554
|
+
MCSA: "MCSATaxonomyMap",
|
|
6555
|
+
MCMA: "MCMATaxonomyMap",
|
|
6556
|
+
MATCHING: "matchingTaxonomyMap",
|
|
6557
|
+
GROUPING: "groupingTaxonomyMap",
|
|
6558
|
+
FILL_IN_THE_BLANKS: "fillInTheBlanksTaxonomyMap",
|
|
6559
|
+
OPEN_ENDED: "openEndedTaxonomyMap",
|
|
6560
|
+
TRUE_FALSE: "trueFalseTaxonomyMap"
|
|
6561
|
+
};
|
|
6562
|
+
const mapName = taxonomyMapNames[type];
|
|
6563
|
+
if (mapName && data[mapName]) {
|
|
6564
|
+
try {
|
|
6565
|
+
taxonomyMap = JSON.parse(data[mapName]);
|
|
6566
|
+
} catch (error) {
|
|
6567
|
+
console.error(`Error parsing taxonomy map for ${type}:`, error);
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
return taxonomyMap.name || "";
|
|
6571
|
+
};
|
|
6572
|
+
useEffect14(() => {
|
|
6573
|
+
if (!data) return;
|
|
6574
|
+
const constructAnswerBasedOnData2 = () => {
|
|
6575
|
+
const newAnswer = { data: [] };
|
|
6576
|
+
const activityTypes = [
|
|
6577
|
+
{ type: "ORDERING", materialMap: "orderingMaterialMap" },
|
|
6578
|
+
{ type: "DROPDOWN", materialMap: "dropdownMaterialMap" },
|
|
6579
|
+
{ type: "MCSA", materialMap: "MCSAMaterialMap" },
|
|
6580
|
+
{ type: "MCMA", materialMap: "MCMAMaterialMap" },
|
|
6581
|
+
{ type: "MATCHING", materialMap: "matchingMaterialMap" },
|
|
6582
|
+
{ type: "GROUPING", materialMap: "groupingMaterialMap" },
|
|
6583
|
+
{
|
|
6584
|
+
type: "FILL_IN_THE_BLANKS",
|
|
6585
|
+
materialMap: "fillInTheBlanksMaterialMap"
|
|
6586
|
+
},
|
|
6587
|
+
{ type: "OPEN_ENDED", materialMap: "openEndedMaterialMap" },
|
|
6588
|
+
{ type: "TRUE_FALSE", materialMap: "trueFalseMaterialMap" }
|
|
6589
|
+
];
|
|
6590
|
+
activityTypes.forEach(({ type, materialMap }) => {
|
|
6591
|
+
if (data[materialMap]) {
|
|
6592
|
+
const foundAnswer = checkAnswerMapExists(type);
|
|
6593
|
+
const answerItem = foundAnswer || constructActivityAnswerMap(
|
|
6594
|
+
{ type },
|
|
6595
|
+
JSON.parse(JSON.stringify(data))
|
|
6596
|
+
);
|
|
6597
|
+
newAnswer.data.push(answerItem);
|
|
6598
|
+
}
|
|
6599
|
+
});
|
|
6600
|
+
setAnswer(newAnswer);
|
|
6601
|
+
if (newAnswer.data.length > 0) {
|
|
6602
|
+
if (lockedType && newAnswer.data.find((item) => item.type === lockedType)) {
|
|
6603
|
+
setSelectedType(lockedType);
|
|
6604
|
+
} else {
|
|
6605
|
+
setSelectedType(newAnswer.data[0].type);
|
|
6606
|
+
}
|
|
6607
|
+
}
|
|
6608
|
+
};
|
|
6609
|
+
constructAnswerBasedOnData2();
|
|
6610
|
+
}, [data, lockedType]);
|
|
6611
|
+
useEffect14(() => {
|
|
6612
|
+
if (!data || !answer.data.length) return;
|
|
6613
|
+
let currentTypeOptionList = typeOptionList || answer.data.map((item) => ({
|
|
6614
|
+
id: item.type,
|
|
6615
|
+
text: i18n_default.t(item.type)
|
|
6616
|
+
}));
|
|
6617
|
+
if (lockedType) {
|
|
6618
|
+
currentTypeOptionList = currentTypeOptionList.filter(
|
|
6619
|
+
(typeOption) => typeOption.id === lockedType
|
|
6620
|
+
);
|
|
6621
|
+
}
|
|
6622
|
+
if (showTaxonomy) {
|
|
6623
|
+
setOptionList(
|
|
6624
|
+
currentTypeOptionList.map((typeOption) => __spreadProps(__spreadValues({}, typeOption), {
|
|
6625
|
+
subText: i18n_default.t(retrieveTaxonomyNameFromActivityType(typeOption.id))
|
|
6626
|
+
}))
|
|
6627
|
+
);
|
|
6628
|
+
} else {
|
|
6629
|
+
setOptionList(currentTypeOptionList);
|
|
6630
|
+
}
|
|
6631
|
+
}, [data, answer.data, lockedType, typeOptionList, showTaxonomy]);
|
|
6632
|
+
const RenderSelectedActivityContent = () => {
|
|
6633
|
+
const commonProps = {
|
|
6634
|
+
answer,
|
|
6635
|
+
data,
|
|
6636
|
+
canAnswerQuestion: () => true,
|
|
6637
|
+
changeAnswer: (newAnswer) => setAnswer(JSON.parse(JSON.stringify(newAnswer))),
|
|
6638
|
+
isPreview: true,
|
|
6639
|
+
showCorrectAnswer,
|
|
6640
|
+
isFullScreen
|
|
6641
|
+
};
|
|
6642
|
+
switch (selectedType) {
|
|
6643
|
+
case "ORDERING":
|
|
6644
|
+
return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ jsx44(OrderingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6645
|
+
case "DROPDOWN":
|
|
6646
|
+
return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ jsx44(DropdownActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6647
|
+
case "MCSA":
|
|
6648
|
+
return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ jsx44(MCSAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6649
|
+
case "MCMA":
|
|
6650
|
+
return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ jsx44(MCMAActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6651
|
+
case "MATCHING":
|
|
6652
|
+
return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ jsx44(MatchingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6653
|
+
case "GROUPING":
|
|
6654
|
+
return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ jsx44(GroupingActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6655
|
+
case "FILL_IN_THE_BLANKS":
|
|
6656
|
+
return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ jsx44(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6657
|
+
case "OPEN_ENDED":
|
|
6658
|
+
return data.openEndedBodyMap ? /* @__PURE__ */ jsx44(
|
|
6659
|
+
OpenEndedActivityContent_default,
|
|
6660
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
6661
|
+
showMaterialContent: true
|
|
6662
|
+
})
|
|
6663
|
+
) : null;
|
|
6664
|
+
case "TRUE_FALSE":
|
|
6665
|
+
return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ jsx44(TrueFalseActivityContent_default, __spreadValues({}, commonProps)) : null;
|
|
6666
|
+
default:
|
|
6667
|
+
return null;
|
|
6668
|
+
}
|
|
6669
|
+
};
|
|
6670
|
+
if (!data) return null;
|
|
6671
|
+
return /* @__PURE__ */ jsxs34("div", { children: [
|
|
6672
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "mb-4", children: [
|
|
6673
|
+
showDescription ? /* @__PURE__ */ jsx44("div", { className: "my-2", children: /* @__PURE__ */ jsx44("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
6674
|
+
/* @__PURE__ */ jsx44(
|
|
6675
|
+
SelectionBox_default,
|
|
6676
|
+
{
|
|
6677
|
+
optionList,
|
|
6678
|
+
selectedId: selectedType,
|
|
6679
|
+
handleSelectOnClick: (itemId) => {
|
|
6680
|
+
setSelectedType(itemId);
|
|
6681
|
+
}
|
|
6682
|
+
}
|
|
6683
|
+
)
|
|
6684
|
+
] }) : null,
|
|
6685
|
+
/* @__PURE__ */ jsx44(DividerLine_default, {}),
|
|
6686
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
6687
|
+
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ jsx44(ActivityEmptyContent_default, {}) : null,
|
|
6688
|
+
selectedType ? /* @__PURE__ */ jsx44("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
|
6689
|
+
] }),
|
|
6690
|
+
selectedType && showSolution ? /* @__PURE__ */ jsx44("div", { className: "my-4", children: /* @__PURE__ */ jsx44(
|
|
6691
|
+
ActivitySolutionContent_default,
|
|
6692
|
+
{
|
|
6693
|
+
activityTemplateType: selectedType,
|
|
6694
|
+
data
|
|
6695
|
+
}
|
|
6696
|
+
) }) : null,
|
|
6697
|
+
selectedType && showEvaluationRubric ? /* @__PURE__ */ jsx44("div", { className: "my-4", children: /* @__PURE__ */ jsx44(
|
|
6698
|
+
ActivityEvaluationRubricContent_default,
|
|
6699
|
+
{
|
|
6700
|
+
activityTemplateType: selectedType,
|
|
6701
|
+
data
|
|
6702
|
+
}
|
|
6703
|
+
) }) : null
|
|
6704
|
+
] }, key);
|
|
6705
|
+
};
|
|
6706
|
+
var ActivityPreviewByAnswerData_default = ActivityPreviewByAnswerData;
|
|
6707
|
+
|
|
6515
6708
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
6516
|
-
import { jsx as
|
|
6709
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
6517
6710
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
6518
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ jsx45(
|
|
6519
6712
|
"div",
|
|
6520
6713
|
{
|
|
6521
6714
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -6525,7 +6718,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
6525
6718
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
6526
6719
|
|
|
6527
6720
|
// src/components/groups/LeftTextRightInputGroup.tsx
|
|
6528
|
-
import { jsx as
|
|
6721
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6529
6722
|
var LeftTextRightInputGroup = ({
|
|
6530
6723
|
type,
|
|
6531
6724
|
title,
|
|
@@ -6535,9 +6728,9 @@ var LeftTextRightInputGroup = ({
|
|
|
6535
6728
|
disabled,
|
|
6536
6729
|
errorText
|
|
6537
6730
|
}) => {
|
|
6538
|
-
return /* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6540
|
-
/* @__PURE__ */
|
|
6731
|
+
return /* @__PURE__ */ jsxs35("div", { className: "w-full flex flex-row mx-2", children: [
|
|
6732
|
+
/* @__PURE__ */ jsx46("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ jsx46("p", { children: title }) }),
|
|
6733
|
+
/* @__PURE__ */ jsx46("div", { className: "flex-1", children: /* @__PURE__ */ jsx46(
|
|
6541
6734
|
InputGroup_default,
|
|
6542
6735
|
{
|
|
6543
6736
|
type,
|
|
@@ -6553,14 +6746,14 @@ var LeftTextRightInputGroup = ({
|
|
|
6553
6746
|
var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
|
|
6554
6747
|
|
|
6555
6748
|
// src/components/boxes/SelectionCheckbox.tsx
|
|
6556
|
-
import { jsx as
|
|
6749
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6557
6750
|
var SelectionCheckbox = ({
|
|
6558
6751
|
optionList,
|
|
6559
6752
|
selectedIdList,
|
|
6560
6753
|
handleSelectOnClick,
|
|
6561
6754
|
handleRemoveOnClick
|
|
6562
6755
|
}) => {
|
|
6563
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ jsx47("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx47(
|
|
6564
6757
|
"div",
|
|
6565
6758
|
{
|
|
6566
6759
|
className: `${selectedIdList.findIndex(
|
|
@@ -6575,14 +6768,14 @@ var SelectionCheckbox = ({
|
|
|
6575
6768
|
handleRemoveOnClick(option.id);
|
|
6576
6769
|
}
|
|
6577
6770
|
},
|
|
6578
|
-
children: /* @__PURE__ */
|
|
6771
|
+
children: /* @__PURE__ */ jsxs36(
|
|
6579
6772
|
"div",
|
|
6580
6773
|
{
|
|
6581
6774
|
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
6582
6775
|
(selectedId) => selectedId === option.id
|
|
6583
6776
|
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
6584
6777
|
children: [
|
|
6585
|
-
/* @__PURE__ */
|
|
6778
|
+
/* @__PURE__ */ jsx47(
|
|
6586
6779
|
BaseImage_default,
|
|
6587
6780
|
{
|
|
6588
6781
|
src: selectedIdList.findIndex(
|
|
@@ -6592,7 +6785,7 @@ var SelectionCheckbox = ({
|
|
|
6592
6785
|
size: "small"
|
|
6593
6786
|
}
|
|
6594
6787
|
),
|
|
6595
|
-
/* @__PURE__ */
|
|
6788
|
+
/* @__PURE__ */ jsx47("div", { className: "flex-1", children: /* @__PURE__ */ jsx47("p", { children: option.text }) })
|
|
6596
6789
|
]
|
|
6597
6790
|
}
|
|
6598
6791
|
)
|
|
@@ -6603,7 +6796,7 @@ var SelectionCheckbox = ({
|
|
|
6603
6796
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
6604
6797
|
|
|
6605
6798
|
// src/components/tabs/SelectionTab.tsx
|
|
6606
|
-
import { jsx as
|
|
6799
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6607
6800
|
var SelectionTab = ({
|
|
6608
6801
|
optionList,
|
|
6609
6802
|
selectedId,
|
|
@@ -6613,7 +6806,7 @@ var SelectionTab = ({
|
|
|
6613
6806
|
textColor,
|
|
6614
6807
|
borderColor
|
|
6615
6808
|
}) => {
|
|
6616
|
-
return /* @__PURE__ */
|
|
6809
|
+
return /* @__PURE__ */ jsx48("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__ */ jsxs37(
|
|
6617
6810
|
"div",
|
|
6618
6811
|
{
|
|
6619
6812
|
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`,
|
|
@@ -6621,8 +6814,8 @@ var SelectionTab = ({
|
|
|
6621
6814
|
handleSelectOnClick(option.id);
|
|
6622
6815
|
},
|
|
6623
6816
|
children: [
|
|
6624
|
-
/* @__PURE__ */
|
|
6625
|
-
option.subTitle ? /* @__PURE__ */
|
|
6817
|
+
/* @__PURE__ */ jsx48("p", { className: "text-lg", children: option.title }),
|
|
6818
|
+
option.subTitle ? /* @__PURE__ */ jsx48("p", { className: "text-md", children: option.subTitle }) : null
|
|
6626
6819
|
]
|
|
6627
6820
|
},
|
|
6628
6821
|
index
|
|
@@ -6631,20 +6824,20 @@ var SelectionTab = ({
|
|
|
6631
6824
|
var SelectionTab_default = SelectionTab;
|
|
6632
6825
|
|
|
6633
6826
|
// src/components/tabs/SelectionTabFill.tsx
|
|
6634
|
-
import { jsx as
|
|
6827
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6635
6828
|
var SelectionTabFill = ({
|
|
6636
6829
|
optionList,
|
|
6637
6830
|
selectedId,
|
|
6638
6831
|
handleSelectOnClick
|
|
6639
6832
|
}) => {
|
|
6640
|
-
return /* @__PURE__ */
|
|
6833
|
+
return /* @__PURE__ */ jsx49("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__ */ jsx49(
|
|
6641
6834
|
"div",
|
|
6642
6835
|
{
|
|
6643
6836
|
className: "cursor-pointer",
|
|
6644
6837
|
onClick: () => {
|
|
6645
6838
|
handleSelectOnClick(option.id);
|
|
6646
6839
|
},
|
|
6647
|
-
children: /* @__PURE__ */
|
|
6840
|
+
children: /* @__PURE__ */ jsx49(
|
|
6648
6841
|
"p",
|
|
6649
6842
|
{
|
|
6650
6843
|
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`,
|
|
@@ -6658,57 +6851,57 @@ var SelectionTabFill = ({
|
|
|
6658
6851
|
var SelectionTabFill_default = SelectionTabFill;
|
|
6659
6852
|
|
|
6660
6853
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
6661
|
-
import { jsx as
|
|
6854
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6662
6855
|
var ActivityTemplateLabel = ({
|
|
6663
6856
|
title,
|
|
6664
6857
|
font
|
|
6665
6858
|
}) => {
|
|
6666
|
-
return /* @__PURE__ */
|
|
6667
|
-
/* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6859
|
+
return /* @__PURE__ */ jsx50("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__ */ jsxs38("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6860
|
+
/* @__PURE__ */ jsx50(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
|
|
6861
|
+
/* @__PURE__ */ jsx50("p", { className: font ? font : "text-sm", children: title })
|
|
6669
6862
|
] }) });
|
|
6670
6863
|
};
|
|
6671
6864
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
6672
6865
|
|
|
6673
6866
|
// src/components/labels/BrandLabel.tsx
|
|
6674
|
-
import { jsx as
|
|
6867
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6675
6868
|
var BrandLabel = ({ title, icon, font }) => {
|
|
6676
|
-
return /* @__PURE__ */
|
|
6677
|
-
icon ? icon : /* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6869
|
+
return /* @__PURE__ */ jsx51("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__ */ jsxs39("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6870
|
+
icon ? icon : /* @__PURE__ */ jsx51(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
|
|
6871
|
+
/* @__PURE__ */ jsx51("p", { className: font ? font : "text-sm", children: title })
|
|
6679
6872
|
] }) });
|
|
6680
6873
|
};
|
|
6681
6874
|
var BrandLabel_default = BrandLabel;
|
|
6682
6875
|
|
|
6683
6876
|
// src/components/labels/CoterieLabel.tsx
|
|
6684
|
-
import { jsx as
|
|
6877
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
6685
6878
|
var CoterieLabel = ({ title, font }) => {
|
|
6686
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ jsx52("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__ */ jsx52("p", { className: font ? font : "text-sm", children: title }) });
|
|
6687
6880
|
};
|
|
6688
6881
|
var CoterieLabel_default = CoterieLabel;
|
|
6689
6882
|
|
|
6690
6883
|
// src/components/labels/GradeLabel.tsx
|
|
6691
|
-
import { jsx as
|
|
6884
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6692
6885
|
var GradeLabel = ({ title, font }) => {
|
|
6693
|
-
return /* @__PURE__ */
|
|
6886
|
+
return /* @__PURE__ */ jsx53("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__ */ jsx53("p", { className: font ? font : "text-sm", children: title }) });
|
|
6694
6887
|
};
|
|
6695
6888
|
var GradeLabel_default = GradeLabel;
|
|
6696
6889
|
|
|
6697
6890
|
// src/components/labels/OutcomeLabel.tsx
|
|
6698
|
-
import { jsx as
|
|
6891
|
+
import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6699
6892
|
var OutcomeLabel = ({ title, font }) => {
|
|
6700
|
-
return /* @__PURE__ */
|
|
6701
|
-
/* @__PURE__ */
|
|
6702
|
-
/* @__PURE__ */
|
|
6893
|
+
return /* @__PURE__ */ jsx54("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__ */ jsxs40("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6894
|
+
/* @__PURE__ */ jsx54(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
|
|
6895
|
+
/* @__PURE__ */ jsx54("p", { className: font ? font : "text-sm", children: title })
|
|
6703
6896
|
] }) });
|
|
6704
6897
|
};
|
|
6705
6898
|
var OutcomeLabel_default = OutcomeLabel;
|
|
6706
6899
|
|
|
6707
6900
|
// src/components/labels/PersonalLabel.tsx
|
|
6708
|
-
import { jsx as
|
|
6901
|
+
import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6709
6902
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
6710
|
-
return /* @__PURE__ */
|
|
6711
|
-
icon ? icon : /* @__PURE__ */
|
|
6903
|
+
return /* @__PURE__ */ jsx55("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__ */ jsxs41("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6904
|
+
icon ? icon : /* @__PURE__ */ jsx55(
|
|
6712
6905
|
BaseImage_default,
|
|
6713
6906
|
{
|
|
6714
6907
|
src: "/icons/personal-label.webp",
|
|
@@ -6716,16 +6909,16 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
6716
6909
|
size: "xsmall"
|
|
6717
6910
|
}
|
|
6718
6911
|
),
|
|
6719
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsx55("p", { className: font ? font : "text-sm", children: title })
|
|
6720
6913
|
] }) });
|
|
6721
6914
|
};
|
|
6722
6915
|
var PersonalLabel_default = PersonalLabel;
|
|
6723
6916
|
|
|
6724
6917
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
6725
|
-
import { jsx as
|
|
6918
|
+
import { jsx as jsx56, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6726
6919
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
6727
|
-
return /* @__PURE__ */
|
|
6728
|
-
icon ? icon : /* @__PURE__ */
|
|
6920
|
+
return /* @__PURE__ */ jsx56("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__ */ jsxs42("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6921
|
+
icon ? icon : /* @__PURE__ */ jsx56(
|
|
6729
6922
|
BaseImage_default,
|
|
6730
6923
|
{
|
|
6731
6924
|
src: "/icons/publishing-house-label.webp",
|
|
@@ -6733,79 +6926,79 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
|
6733
6926
|
size: "xsmall"
|
|
6734
6927
|
}
|
|
6735
6928
|
),
|
|
6736
|
-
/* @__PURE__ */
|
|
6929
|
+
/* @__PURE__ */ jsx56("p", { className: font ? font : "text-sm", children: title })
|
|
6737
6930
|
] }) });
|
|
6738
6931
|
};
|
|
6739
6932
|
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
6740
6933
|
|
|
6741
6934
|
// src/components/labels/ActivityLabel.tsx
|
|
6742
|
-
import { jsx as
|
|
6935
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
6743
6936
|
var ActivityLabel = ({ title, font }) => {
|
|
6744
|
-
return /* @__PURE__ */
|
|
6937
|
+
return /* @__PURE__ */ jsx57("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__ */ jsx57("p", { className: font ? font : "text-sm", children: title }) });
|
|
6745
6938
|
};
|
|
6746
6939
|
var ActivityLabel_default = ActivityLabel;
|
|
6747
6940
|
|
|
6748
6941
|
// src/components/infos/InfoWithText.tsx
|
|
6749
|
-
import { jsx as
|
|
6942
|
+
import { jsx as jsx58, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6750
6943
|
var InfoWithText = (props) => {
|
|
6751
6944
|
const { value } = props;
|
|
6752
|
-
return /* @__PURE__ */
|
|
6753
|
-
/* @__PURE__ */
|
|
6754
|
-
/* @__PURE__ */
|
|
6945
|
+
return /* @__PURE__ */ jsxs43("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
|
|
6946
|
+
/* @__PURE__ */ jsx58(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
|
|
6947
|
+
/* @__PURE__ */ jsx58("div", { className: "flex-1", children: /* @__PURE__ */ jsx58("p", { className: "", children: value }) })
|
|
6755
6948
|
] });
|
|
6756
6949
|
};
|
|
6757
6950
|
var InfoWithText_default = InfoWithText;
|
|
6758
6951
|
|
|
6759
6952
|
// src/components/texts/InputWithSpecialExpression.tsx
|
|
6760
6953
|
import { InlineMath as InlineMath12 } from "react-katex";
|
|
6761
|
-
import { jsx as
|
|
6954
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6762
6955
|
var InputWithSpecialExpression = ({
|
|
6763
6956
|
value,
|
|
6764
6957
|
showSpecialOnly
|
|
6765
6958
|
}) => {
|
|
6766
6959
|
const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
|
|
6767
|
-
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */
|
|
6960
|
+
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ jsx59("div", { className: "m-2", children: /* @__PURE__ */ jsx59("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ jsx59(
|
|
6768
6961
|
"span",
|
|
6769
6962
|
{
|
|
6770
6963
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6771
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
6964
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx59("span", { className: "text-lg", children: /* @__PURE__ */ jsx59(InlineMath12, { math: inputPart.value }, index) }) : inputPart.value
|
|
6772
6965
|
}
|
|
6773
|
-
)) }) }) : null : /* @__PURE__ */
|
|
6966
|
+
)) }) }) : null : /* @__PURE__ */ jsx59("div", { className: "m-2", children: /* @__PURE__ */ jsx59("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ jsx59(
|
|
6774
6967
|
"span",
|
|
6775
6968
|
{
|
|
6776
6969
|
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6777
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
6970
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx59("span", { className: "text-lg", children: /* @__PURE__ */ jsx59(InlineMath12, { math: inputPart.value }, index) }) : inputPart.value
|
|
6778
6971
|
}
|
|
6779
6972
|
)) }) });
|
|
6780
6973
|
};
|
|
6781
6974
|
var InputWithSpecialExpression_default = InputWithSpecialExpression;
|
|
6782
6975
|
|
|
6783
6976
|
// src/components/titles/BaseTitle.tsx
|
|
6784
|
-
import { jsx as
|
|
6977
|
+
import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6785
6978
|
var BaseTitle = ({
|
|
6786
6979
|
title,
|
|
6787
6980
|
totalItemCount,
|
|
6788
6981
|
itemName,
|
|
6789
6982
|
description
|
|
6790
6983
|
}) => {
|
|
6791
|
-
return /* @__PURE__ */
|
|
6792
|
-
/* @__PURE__ */
|
|
6984
|
+
return /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-y-2", children: [
|
|
6985
|
+
/* @__PURE__ */ jsxs44("p", { className: "text-2xl font-medium", children: [
|
|
6793
6986
|
title,
|
|
6794
|
-
totalItemCount && itemName ? /* @__PURE__ */
|
|
6987
|
+
totalItemCount && itemName ? /* @__PURE__ */ jsxs44("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: [
|
|
6795
6988
|
totalItemCount,
|
|
6796
6989
|
" ",
|
|
6797
6990
|
itemName
|
|
6798
6991
|
] }) : null
|
|
6799
6992
|
] }),
|
|
6800
|
-
description ? /* @__PURE__ */
|
|
6993
|
+
description ? /* @__PURE__ */ jsx60("p", { className: "", children: description }) : null
|
|
6801
6994
|
] });
|
|
6802
6995
|
};
|
|
6803
6996
|
var BaseTitle_default = BaseTitle;
|
|
6804
6997
|
|
|
6805
6998
|
// src/components/titles/SubTitle.tsx
|
|
6806
|
-
import { jsx as
|
|
6999
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
6807
7000
|
var SubTitle = ({ title }) => {
|
|
6808
|
-
return /* @__PURE__ */
|
|
7001
|
+
return /* @__PURE__ */ jsx61("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
|
|
6809
7002
|
};
|
|
6810
7003
|
var SubTitle_default = SubTitle;
|
|
6811
7004
|
|
|
@@ -9255,6 +9448,7 @@ export {
|
|
|
9255
9448
|
ActivityEmptyContent_default as ActivityEmptyContent,
|
|
9256
9449
|
ActivityEvaluationRubricContent_default as ActivityEvaluationRubricContent,
|
|
9257
9450
|
ActivityLabel_default as ActivityLabel,
|
|
9451
|
+
ActivityPreviewByAnswerData_default as ActivityPreviewByAnswerData,
|
|
9258
9452
|
ActivityPreviewByData_default as ActivityPreviewByData,
|
|
9259
9453
|
ActivitySolutionContent_default as ActivitySolutionContent,
|
|
9260
9454
|
ActivityTemplateLabel_default as ActivityTemplateLabel,
|