catchup-library-web 1.11.1 → 1.11.3

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.js CHANGED
@@ -71,6 +71,7 @@ __export(index_exports, {
71
71
  ActivityEmptyContent: () => ActivityEmptyContent_default,
72
72
  ActivityEvaluationRubricContent: () => ActivityEvaluationRubricContent_default,
73
73
  ActivityLabel: () => ActivityLabel_default,
74
+ ActivityPreviewByAnswerData: () => ActivityPreviewByAnswerData_default,
74
75
  ActivityPreviewByData: () => ActivityPreviewByData_default,
75
76
  ActivitySolutionContent: () => ActivitySolutionContent_default,
76
77
  ActivityTemplateLabel: () => ActivityTemplateLabel_default,
@@ -3617,9 +3618,11 @@ var InputGroup = ({
3617
3618
  theme,
3618
3619
  useMinHeight,
3619
3620
  disabled,
3620
- limit
3621
+ limit,
3622
+ useMath
3621
3623
  }) => {
3622
3624
  const textAreaRef = (0, import_react10.useRef)(null);
3625
+ const mathFieldRef = (0, import_react10.useRef)(null);
3623
3626
  (0, import_react10.useEffect)(() => {
3624
3627
  if (!textAreaRef) return;
3625
3628
  if (!textAreaRef.current) return;
@@ -3629,6 +3632,14 @@ var InputGroup = ({
3629
3632
  textAreaRef.current.style.height = `44px`;
3630
3633
  }
3631
3634
  }, [textAreaRef, value]);
3635
+ (0, import_react10.useEffect)(() => {
3636
+ if (!useMath) return;
3637
+ import("mathlive").then(({ MathfieldElement }) => {
3638
+ if (!customElements.get("math-field")) {
3639
+ customElements.define("math-field", MathfieldElement);
3640
+ }
3641
+ });
3642
+ }, [useMath, type, placeholder, title]);
3632
3643
  const retrieveNullableOptionList = () => {
3633
3644
  if (!optionList) return [];
3634
3645
  const currentOptionList = {
@@ -3656,6 +3667,22 @@ var InputGroup = ({
3656
3667
  onChange && onChange(e);
3657
3668
  }
3658
3669
  };
3670
+ const handleMathFieldChange = (event) => {
3671
+ const mathField = event.currentTarget;
3672
+ const syntheticEvent = {
3673
+ target: {
3674
+ value: mathField.value,
3675
+ type: "text"
3676
+ }
3677
+ };
3678
+ onChange && onChange(syntheticEvent);
3679
+ };
3680
+ const handleMathFieldFocus = (event) => {
3681
+ const syntheticEvent = {
3682
+ target: event.currentTarget
3683
+ };
3684
+ onFocus && onFocus(syntheticEvent);
3685
+ };
3659
3686
  const CheckboxInputGroup = () => {
3660
3687
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3661
3688
  "div",
@@ -3808,6 +3835,44 @@ var InputGroup = ({
3808
3835
  ] });
3809
3836
  };
3810
3837
  const TextInputGroup = () => {
3838
+ if (useMath) {
3839
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "my-1 relative", children: [
3840
+ title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
3841
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3842
+ "div",
3843
+ {
3844
+ 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"}`,
3845
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3846
+ "math-field",
3847
+ {
3848
+ ref: mathFieldRef,
3849
+ value: value || "",
3850
+ onInput: handleMathFieldChange,
3851
+ onFocus: handleMathFieldFocus,
3852
+ placeholder: errorText ? errorText : placeholder,
3853
+ disabled,
3854
+ "virtual-keyboard-mode": "onfocus",
3855
+ "smart-fence": true,
3856
+ "smart-mode": true,
3857
+ "smart-superscript": true,
3858
+ style: {
3859
+ fontSize: "16px",
3860
+ padding: "8px 16px",
3861
+ border: "none",
3862
+ outline: "none",
3863
+ width: "100%",
3864
+ minHeight: "44px",
3865
+ backgroundColor: disabled ? "#f5f5f5" : "transparent",
3866
+ borderRadius: "16px",
3867
+ fontFamily: "inherit",
3868
+ color: disabled ? "#9ca3af" : "#000000"
3869
+ }
3870
+ }
3871
+ )
3872
+ }
3873
+ )
3874
+ ] });
3875
+ }
3811
3876
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "my-1 relative", children: [
3812
3877
  title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
3813
3878
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -6711,10 +6776,203 @@ var ActivityPreviewByData = ({
6711
6776
  };
6712
6777
  var ActivityPreviewByData_default = ActivityPreviewByData;
6713
6778
 
6714
- // src/components/dividers/BlueVerticalDividerLine.tsx
6779
+ // src/components/activities/ActivityPreviewByAnswerData.tsx
6780
+ var import_react27 = require("react");
6715
6781
  var import_jsx_runtime44 = require("react/jsx-runtime");
6782
+ var ActivityPreviewByAnswerData = ({
6783
+ data,
6784
+ showType = true,
6785
+ showDescription = true,
6786
+ lockedType = null,
6787
+ typeOptionList = [],
6788
+ showSolution = false,
6789
+ showEvaluationRubric = false,
6790
+ showTaxonomy = true,
6791
+ isFullScreen = false,
6792
+ showCorrectAnswer = false
6793
+ }) => {
6794
+ var _a;
6795
+ const [key, setKey] = (0, import_react27.useState)((/* @__PURE__ */ new Date()).getTime());
6796
+ const [selectedType, setSelectedType] = (0, import_react27.useState)(null);
6797
+ const [optionList, setOptionList] = (0, import_react27.useState)([]);
6798
+ const [answer, setAnswer] = (0, import_react27.useState)({ data: [] });
6799
+ (0, import_react27.useEffect)(() => {
6800
+ if (!data) return;
6801
+ setKey((/* @__PURE__ */ new Date()).getTime());
6802
+ }, [data]);
6803
+ const checkAnswerMapExists = (type) => {
6804
+ if (data && data.answerMap && Array.isArray(data.answerMap)) {
6805
+ const foundAnswer = data.answerMap.find(
6806
+ (answer2) => answer2.type === type
6807
+ );
6808
+ return foundAnswer || null;
6809
+ }
6810
+ return null;
6811
+ };
6812
+ const retrieveTaxonomyNameFromActivityType = (type) => {
6813
+ if (!data) return "";
6814
+ let taxonomyMap = { name: "" };
6815
+ const taxonomyMapNames = {
6816
+ ORDERING: "orderingTaxonomyMap",
6817
+ DROPDOWN: "dropdownTaxonomyMap",
6818
+ MCSA: "MCSATaxonomyMap",
6819
+ MCMA: "MCMATaxonomyMap",
6820
+ MATCHING: "matchingTaxonomyMap",
6821
+ GROUPING: "groupingTaxonomyMap",
6822
+ FILL_IN_THE_BLANKS: "fillInTheBlanksTaxonomyMap",
6823
+ OPEN_ENDED: "openEndedTaxonomyMap",
6824
+ TRUE_FALSE: "trueFalseTaxonomyMap"
6825
+ };
6826
+ const mapName = taxonomyMapNames[type];
6827
+ if (mapName && data[mapName]) {
6828
+ try {
6829
+ taxonomyMap = JSON.parse(data[mapName]);
6830
+ } catch (error) {
6831
+ console.error(`Error parsing taxonomy map for ${type}:`, error);
6832
+ }
6833
+ }
6834
+ return taxonomyMap.name || "";
6835
+ };
6836
+ (0, import_react27.useEffect)(() => {
6837
+ if (!data) return;
6838
+ const constructAnswerBasedOnData2 = () => {
6839
+ const newAnswer = { data: [] };
6840
+ const activityTypes = [
6841
+ { type: "ORDERING", materialMap: "orderingMaterialMap" },
6842
+ { type: "DROPDOWN", materialMap: "dropdownMaterialMap" },
6843
+ { type: "MCSA", materialMap: "MCSAMaterialMap" },
6844
+ { type: "MCMA", materialMap: "MCMAMaterialMap" },
6845
+ { type: "MATCHING", materialMap: "matchingMaterialMap" },
6846
+ { type: "GROUPING", materialMap: "groupingMaterialMap" },
6847
+ {
6848
+ type: "FILL_IN_THE_BLANKS",
6849
+ materialMap: "fillInTheBlanksMaterialMap"
6850
+ },
6851
+ { type: "OPEN_ENDED", materialMap: "openEndedMaterialMap" },
6852
+ { type: "TRUE_FALSE", materialMap: "trueFalseMaterialMap" }
6853
+ ];
6854
+ activityTypes.forEach(({ type, materialMap }) => {
6855
+ if (data[materialMap]) {
6856
+ const foundAnswer = checkAnswerMapExists(type);
6857
+ const answerItem = foundAnswer || constructActivityAnswerMap(
6858
+ { type },
6859
+ JSON.parse(JSON.stringify(data))
6860
+ );
6861
+ newAnswer.data.push(answerItem);
6862
+ }
6863
+ });
6864
+ setAnswer(newAnswer);
6865
+ if (newAnswer.data.length > 0) {
6866
+ if (lockedType && newAnswer.data.find((item) => item.type === lockedType)) {
6867
+ setSelectedType(lockedType);
6868
+ } else {
6869
+ setSelectedType(newAnswer.data[0].type);
6870
+ }
6871
+ }
6872
+ };
6873
+ constructAnswerBasedOnData2();
6874
+ }, [data, lockedType]);
6875
+ (0, import_react27.useEffect)(() => {
6876
+ if (!data || !answer.data.length) return;
6877
+ let currentTypeOptionList = typeOptionList || answer.data.map((item) => ({
6878
+ id: item.type,
6879
+ text: i18n_default.t(item.type)
6880
+ }));
6881
+ if (lockedType) {
6882
+ currentTypeOptionList = currentTypeOptionList.filter(
6883
+ (typeOption) => typeOption.id === lockedType
6884
+ );
6885
+ }
6886
+ if (showTaxonomy) {
6887
+ setOptionList(
6888
+ currentTypeOptionList.map((typeOption) => __spreadProps(__spreadValues({}, typeOption), {
6889
+ subText: i18n_default.t(retrieveTaxonomyNameFromActivityType(typeOption.id))
6890
+ }))
6891
+ );
6892
+ } else {
6893
+ setOptionList(currentTypeOptionList);
6894
+ }
6895
+ }, [data, answer.data, lockedType, typeOptionList, showTaxonomy]);
6896
+ const RenderSelectedActivityContent = () => {
6897
+ const commonProps = {
6898
+ answer,
6899
+ data,
6900
+ canAnswerQuestion: () => true,
6901
+ changeAnswer: (newAnswer) => setAnswer(JSON.parse(JSON.stringify(newAnswer))),
6902
+ isPreview: true,
6903
+ showCorrectAnswer,
6904
+ isFullScreen
6905
+ };
6906
+ switch (selectedType) {
6907
+ case "ORDERING":
6908
+ return data.orderingBodyMap && data.orderingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(OrderingActivityContent_default, __spreadValues({}, commonProps)) : null;
6909
+ case "DROPDOWN":
6910
+ return data.dropdownBodyMap && data.dropdownMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DropdownActivityContent_default, __spreadValues({}, commonProps)) : null;
6911
+ case "MCSA":
6912
+ return data.MCSABodyMap && data.MCSAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MCSAActivityContent_default, __spreadValues({}, commonProps)) : null;
6913
+ case "MCMA":
6914
+ return data.MCMABodyMap && data.MCMAMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MCMAActivityContent_default, __spreadValues({}, commonProps)) : null;
6915
+ case "MATCHING":
6916
+ return data.matchingBodyMap && data.matchingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MatchingActivityContent_default, __spreadValues({}, commonProps)) : null;
6917
+ case "GROUPING":
6918
+ return data.groupingBodyMap && data.groupingMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GroupingActivityContent_default, __spreadValues({}, commonProps)) : null;
6919
+ case "FILL_IN_THE_BLANKS":
6920
+ return data.fillInTheBlanksBodyMap && data.fillInTheBlanksMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FillInTheBlanksActivityContent_default, __spreadValues({}, commonProps)) : null;
6921
+ case "OPEN_ENDED":
6922
+ return data.openEndedBodyMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6923
+ OpenEndedActivityContent_default,
6924
+ __spreadProps(__spreadValues({}, commonProps), {
6925
+ showMaterialContent: true
6926
+ })
6927
+ ) : null;
6928
+ case "TRUE_FALSE":
6929
+ return data.trueFalseBodyMap && data.trueFalseMaterialMap ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TrueFalseActivityContent_default, __spreadValues({}, commonProps)) : null;
6930
+ default:
6931
+ return null;
6932
+ }
6933
+ };
6934
+ if (!data) return null;
6935
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
6936
+ showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mb-4", children: [
6937
+ showDescription ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
6938
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6939
+ SelectionBox_default,
6940
+ {
6941
+ optionList,
6942
+ selectedId: selectedType,
6943
+ handleSelectOnClick: (itemId) => {
6944
+ setSelectedType(itemId);
6945
+ }
6946
+ }
6947
+ )
6948
+ ] }) : null,
6949
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DividerLine_default, {}),
6950
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col my-2 w-full p-5", children: [
6951
+ ((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ActivityEmptyContent_default, {}) : null,
6952
+ selectedType ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: RenderSelectedActivityContent() }, selectedType) : null
6953
+ ] }),
6954
+ selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6955
+ ActivitySolutionContent_default,
6956
+ {
6957
+ activityTemplateType: selectedType,
6958
+ data
6959
+ }
6960
+ ) }) : null,
6961
+ selectedType && showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6962
+ ActivityEvaluationRubricContent_default,
6963
+ {
6964
+ activityTemplateType: selectedType,
6965
+ data
6966
+ }
6967
+ ) }) : null
6968
+ ] }, key);
6969
+ };
6970
+ var ActivityPreviewByAnswerData_default = ActivityPreviewByAnswerData;
6971
+
6972
+ // src/components/dividers/BlueVerticalDividerLine.tsx
6973
+ var import_jsx_runtime45 = require("react/jsx-runtime");
6716
6974
  var BlueVerticalDividerLine = ({ opacity }) => {
6717
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6975
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6718
6976
  "div",
6719
6977
  {
6720
6978
  className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
@@ -6724,7 +6982,7 @@ var BlueVerticalDividerLine = ({ opacity }) => {
6724
6982
  var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
6725
6983
 
6726
6984
  // src/components/groups/LeftTextRightInputGroup.tsx
6727
- var import_jsx_runtime45 = require("react/jsx-runtime");
6985
+ var import_jsx_runtime46 = require("react/jsx-runtime");
6728
6986
  var LeftTextRightInputGroup = ({
6729
6987
  type,
6730
6988
  title,
@@ -6734,9 +6992,9 @@ var LeftTextRightInputGroup = ({
6734
6992
  disabled,
6735
6993
  errorText
6736
6994
  }) => {
6737
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "w-full flex flex-row mx-2", children: [
6738
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: title }) }),
6739
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6995
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "w-full flex flex-row mx-2", children: [
6996
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "w-catchup-input-group-title py-5", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: title }) }),
6997
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6740
6998
  InputGroup_default,
6741
6999
  {
6742
7000
  type,
@@ -6752,14 +7010,14 @@ var LeftTextRightInputGroup = ({
6752
7010
  var LeftTextRightInputGroup_default = LeftTextRightInputGroup;
6753
7011
 
6754
7012
  // src/components/boxes/SelectionCheckbox.tsx
6755
- var import_jsx_runtime46 = require("react/jsx-runtime");
7013
+ var import_jsx_runtime47 = require("react/jsx-runtime");
6756
7014
  var SelectionCheckbox = ({
6757
7015
  optionList,
6758
7016
  selectedIdList,
6759
7017
  handleSelectOnClick,
6760
7018
  handleRemoveOnClick
6761
7019
  }) => {
6762
- 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)(
7020
+ return /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.jsx)(
6763
7021
  "div",
6764
7022
  {
6765
7023
  className: `${selectedIdList.findIndex(
@@ -6774,14 +7032,14 @@ var SelectionCheckbox = ({
6774
7032
  handleRemoveOnClick(option.id);
6775
7033
  }
6776
7034
  },
6777
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
7035
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6778
7036
  "div",
6779
7037
  {
6780
7038
  className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
6781
7039
  (selectedId) => selectedId === option.id
6782
7040
  ) > -1 ? "opacity-100" : "opacity-50"}`,
6783
7041
  children: [
6784
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7042
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6785
7043
  BaseImage_default,
6786
7044
  {
6787
7045
  src: selectedIdList.findIndex(
@@ -6791,7 +7049,7 @@ var SelectionCheckbox = ({
6791
7049
  size: "small"
6792
7050
  }
6793
7051
  ),
6794
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: option.text }) })
7052
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { children: option.text }) })
6795
7053
  ]
6796
7054
  }
6797
7055
  )
@@ -6802,7 +7060,7 @@ var SelectionCheckbox = ({
6802
7060
  var SelectionCheckbox_default = SelectionCheckbox;
6803
7061
 
6804
7062
  // src/components/tabs/SelectionTab.tsx
6805
- var import_jsx_runtime47 = require("react/jsx-runtime");
7063
+ var import_jsx_runtime48 = require("react/jsx-runtime");
6806
7064
  var SelectionTab = ({
6807
7065
  optionList,
6808
7066
  selectedId,
@@ -6812,7 +7070,7 @@ var SelectionTab = ({
6812
7070
  textColor,
6813
7071
  borderColor
6814
7072
  }) => {
6815
- return /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.jsxs)(
7073
+ return /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsxs)(
6816
7074
  "div",
6817
7075
  {
6818
7076
  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`,
@@ -6820,8 +7078,8 @@ var SelectionTab = ({
6820
7078
  handleSelectOnClick(option.id);
6821
7079
  },
6822
7080
  children: [
6823
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-lg", children: option.title }),
6824
- option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-md", children: option.subTitle }) : null
7081
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-lg", children: option.title }),
7082
+ option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-md", children: option.subTitle }) : null
6825
7083
  ]
6826
7084
  },
6827
7085
  index
@@ -6830,20 +7088,20 @@ var SelectionTab = ({
6830
7088
  var SelectionTab_default = SelectionTab;
6831
7089
 
6832
7090
  // src/components/tabs/SelectionTabFill.tsx
6833
- var import_jsx_runtime48 = require("react/jsx-runtime");
7091
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6834
7092
  var SelectionTabFill = ({
6835
7093
  optionList,
6836
7094
  selectedId,
6837
7095
  handleSelectOnClick
6838
7096
  }) => {
6839
- return /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsx)(
7097
+ return /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.jsx)(
6840
7098
  "div",
6841
7099
  {
6842
7100
  className: "cursor-pointer",
6843
7101
  onClick: () => {
6844
7102
  handleSelectOnClick(option.id);
6845
7103
  },
6846
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7104
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6847
7105
  "p",
6848
7106
  {
6849
7107
  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`,
@@ -6857,57 +7115,57 @@ var SelectionTabFill = ({
6857
7115
  var SelectionTabFill_default = SelectionTabFill;
6858
7116
 
6859
7117
  // src/components/labels/ActivityTemplateLabel.tsx
6860
- var import_jsx_runtime49 = require("react/jsx-runtime");
7118
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6861
7119
  var ActivityTemplateLabel = ({
6862
7120
  title,
6863
7121
  font
6864
7122
  }) => {
6865
- return /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6866
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
6867
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: font ? font : "text-sm", children: title })
7123
+ return /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
7124
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BaseImage_default, { src: "/icons/activity.webp", alt: "label", size: "xsmall" }),
7125
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: font ? font : "text-sm", children: title })
6868
7126
  ] }) });
6869
7127
  };
6870
7128
  var ActivityTemplateLabel_default = ActivityTemplateLabel;
6871
7129
 
6872
7130
  // src/components/labels/BrandLabel.tsx
6873
- var import_jsx_runtime50 = require("react/jsx-runtime");
7131
+ var import_jsx_runtime51 = require("react/jsx-runtime");
6874
7132
  var BrandLabel = ({ title, icon, font }) => {
6875
- return /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6876
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
6877
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: font ? font : "text-sm", children: title })
7133
+ return /* @__PURE__ */ (0, import_jsx_runtime51.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_runtime51.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
7134
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BaseImage_default, { src: "/icons/brand-label.webp", alt: "label", size: "xsmall" }),
7135
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: font ? font : "text-sm", children: title })
6878
7136
  ] }) });
6879
7137
  };
6880
7138
  var BrandLabel_default = BrandLabel;
6881
7139
 
6882
7140
  // src/components/labels/CoterieLabel.tsx
6883
- var import_jsx_runtime51 = require("react/jsx-runtime");
7141
+ var import_jsx_runtime52 = require("react/jsx-runtime");
6884
7142
  var CoterieLabel = ({ title, font }) => {
6885
- return /* @__PURE__ */ (0, import_jsx_runtime51.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_runtime51.jsx)("p", { className: font ? font : "text-sm", children: title }) });
7143
+ return /* @__PURE__ */ (0, import_jsx_runtime52.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_runtime52.jsx)("p", { className: font ? font : "text-sm", children: title }) });
6886
7144
  };
6887
7145
  var CoterieLabel_default = CoterieLabel;
6888
7146
 
6889
7147
  // src/components/labels/GradeLabel.tsx
6890
- var import_jsx_runtime52 = require("react/jsx-runtime");
7148
+ var import_jsx_runtime53 = require("react/jsx-runtime");
6891
7149
  var GradeLabel = ({ title, font }) => {
6892
- return /* @__PURE__ */ (0, import_jsx_runtime52.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_runtime52.jsx)("p", { className: font ? font : "text-sm", children: title }) });
7150
+ return /* @__PURE__ */ (0, import_jsx_runtime53.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_runtime53.jsx)("p", { className: font ? font : "text-sm", children: title }) });
6893
7151
  };
6894
7152
  var GradeLabel_default = GradeLabel;
6895
7153
 
6896
7154
  // src/components/labels/OutcomeLabel.tsx
6897
- var import_jsx_runtime53 = require("react/jsx-runtime");
7155
+ var import_jsx_runtime54 = require("react/jsx-runtime");
6898
7156
  var OutcomeLabel = ({ title, font }) => {
6899
- return /* @__PURE__ */ (0, import_jsx_runtime53.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_runtime53.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6900
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
6901
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: font ? font : "text-sm", children: title })
7157
+ return /* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
7158
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(BaseImage_default, { src: "/icons/category.webp", alt: "label", size: "xsmall" }),
7159
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: font ? font : "text-sm", children: title })
6902
7160
  ] }) });
6903
7161
  };
6904
7162
  var OutcomeLabel_default = OutcomeLabel;
6905
7163
 
6906
7164
  // src/components/labels/PersonalLabel.tsx
6907
- var import_jsx_runtime54 = require("react/jsx-runtime");
7165
+ var import_jsx_runtime55 = require("react/jsx-runtime");
6908
7166
  var PersonalLabel = ({ title, icon, font }) => {
6909
- return /* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6910
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
7167
+ return /* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
7168
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6911
7169
  BaseImage_default,
6912
7170
  {
6913
7171
  src: "/icons/personal-label.webp",
@@ -6915,16 +7173,16 @@ var PersonalLabel = ({ title, icon, font }) => {
6915
7173
  size: "xsmall"
6916
7174
  }
6917
7175
  ),
6918
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: font ? font : "text-sm", children: title })
7176
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: font ? font : "text-sm", children: title })
6919
7177
  ] }) });
6920
7178
  };
6921
7179
  var PersonalLabel_default = PersonalLabel;
6922
7180
 
6923
7181
  // src/components/labels/PublishingHouseLabel.tsx
6924
- var import_jsx_runtime55 = require("react/jsx-runtime");
7182
+ var import_jsx_runtime56 = require("react/jsx-runtime");
6925
7183
  var PublishingHouseLabel = ({ title, icon, font }) => {
6926
- return /* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
6927
- icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7184
+ return /* @__PURE__ */ (0, import_jsx_runtime56.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_runtime56.jsxs)("div", { className: "flex flex-row items-center gap-x-2", children: [
7185
+ icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
6928
7186
  BaseImage_default,
6929
7187
  {
6930
7188
  src: "/icons/publishing-house-label.webp",
@@ -6932,79 +7190,79 @@ var PublishingHouseLabel = ({ title, icon, font }) => {
6932
7190
  size: "xsmall"
6933
7191
  }
6934
7192
  ),
6935
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: font ? font : "text-sm", children: title })
7193
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: font ? font : "text-sm", children: title })
6936
7194
  ] }) });
6937
7195
  };
6938
7196
  var PublishingHouseLabel_default = PublishingHouseLabel;
6939
7197
 
6940
7198
  // src/components/labels/ActivityLabel.tsx
6941
- var import_jsx_runtime56 = require("react/jsx-runtime");
7199
+ var import_jsx_runtime57 = require("react/jsx-runtime");
6942
7200
  var ActivityLabel = ({ title, font }) => {
6943
- return /* @__PURE__ */ (0, import_jsx_runtime56.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_runtime56.jsx)("p", { className: font ? font : "text-sm", children: title }) });
7201
+ return /* @__PURE__ */ (0, import_jsx_runtime57.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_runtime57.jsx)("p", { className: font ? font : "text-sm", children: title }) });
6944
7202
  };
6945
7203
  var ActivityLabel_default = ActivityLabel;
6946
7204
 
6947
7205
  // src/components/infos/InfoWithText.tsx
6948
- var import_jsx_runtime57 = require("react/jsx-runtime");
7206
+ var import_jsx_runtime58 = require("react/jsx-runtime");
6949
7207
  var InfoWithText = (props) => {
6950
7208
  const { value } = props;
6951
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
6952
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
6953
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "", children: value }) })
7209
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "w-full flex flex-row items-center gap-x-2 my-2", children: [
7210
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BaseImage_default, { src: "/icons/info.webp", alt: "info", size: "small" }),
7211
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "", children: value }) })
6954
7212
  ] });
6955
7213
  };
6956
7214
  var InfoWithText_default = InfoWithText;
6957
7215
 
6958
7216
  // src/components/texts/InputWithSpecialExpression.tsx
6959
7217
  var import_react_katex12 = require("react-katex");
6960
- var import_jsx_runtime58 = require("react/jsx-runtime");
7218
+ var import_jsx_runtime59 = require("react/jsx-runtime");
6961
7219
  var InputWithSpecialExpression = ({
6962
7220
  value,
6963
7221
  showSpecialOnly
6964
7222
  }) => {
6965
7223
  const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
6966
- return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7224
+ return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6967
7225
  "span",
6968
7226
  {
6969
7227
  className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6970
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
7228
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
6971
7229
  }
6972
- )) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7230
+ )) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6973
7231
  "span",
6974
7232
  {
6975
7233
  className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
6976
- children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
7234
+ children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
6977
7235
  }
6978
7236
  )) }) });
6979
7237
  };
6980
7238
  var InputWithSpecialExpression_default = InputWithSpecialExpression;
6981
7239
 
6982
7240
  // src/components/titles/BaseTitle.tsx
6983
- var import_jsx_runtime59 = require("react/jsx-runtime");
7241
+ var import_jsx_runtime60 = require("react/jsx-runtime");
6984
7242
  var BaseTitle = ({
6985
7243
  title,
6986
7244
  totalItemCount,
6987
7245
  itemName,
6988
7246
  description
6989
7247
  }) => {
6990
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
6991
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("p", { className: "text-2xl font-medium", children: [
7248
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
7249
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("p", { className: "text-2xl font-medium", children: [
6992
7250
  title,
6993
- totalItemCount && itemName ? /* @__PURE__ */ (0, import_jsx_runtime59.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: [
7251
+ totalItemCount && itemName ? /* @__PURE__ */ (0, import_jsx_runtime60.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: [
6994
7252
  totalItemCount,
6995
7253
  " ",
6996
7254
  itemName
6997
7255
  ] }) : null
6998
7256
  ] }),
6999
- description ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "", children: description }) : null
7257
+ description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "", children: description }) : null
7000
7258
  ] });
7001
7259
  };
7002
7260
  var BaseTitle_default = BaseTitle;
7003
7261
 
7004
7262
  // src/components/titles/SubTitle.tsx
7005
- var import_jsx_runtime60 = require("react/jsx-runtime");
7263
+ var import_jsx_runtime61 = require("react/jsx-runtime");
7006
7264
  var SubTitle = ({ title }) => {
7007
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
7265
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-xl font-medium text-catchup-darker-blue", children: title });
7008
7266
  };
7009
7267
  var SubTitle_default = SubTitle;
7010
7268
 
@@ -9455,6 +9713,7 @@ var retrieveActivityMethodologyOptionList = () => {
9455
9713
  ActivityEmptyContent,
9456
9714
  ActivityEvaluationRubricContent,
9457
9715
  ActivityLabel,
9716
+ ActivityPreviewByAnswerData,
9458
9717
  ActivityPreviewByData,
9459
9718
  ActivitySolutionContent,
9460
9719
  ActivityTemplateLabel,