catchup-library-web 1.14.5 → 1.14.7

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
@@ -2506,6 +2506,7 @@ var findBestFitActivity = (activity, individualModelList, outcomeModelList) => {
2506
2506
  } else if (type === "TRUE_FALSE") {
2507
2507
  currentDifficulty = difficultyMap["trueFalseDifficulty"];
2508
2508
  }
2509
+ currentDifficulty = currentDifficulty.toLowerCase();
2509
2510
  const currentDifficultyScore = foundModel[currentDifficulty];
2510
2511
  const splittedTypeList = type.split("_");
2511
2512
  let activityTemplateString = "";
@@ -3271,7 +3272,14 @@ var ShowBodyMediaByContentType = ({
3271
3272
  }
3272
3273
  };
3273
3274
  const renderSpecialExpressions = (inputPart) => {
3274
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { 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 });
3275
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3276
+ "span",
3277
+ {
3278
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
3279
+ 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
3280
+ },
3281
+ index
3282
+ );
3275
3283
  };
3276
3284
  const balanceSpecialChars = (text) => {
3277
3285
  let result = text;
@@ -6738,10 +6746,10 @@ var ActivityEvaluationRubricContent = ({
6738
6746
  Object.keys(evaluationRubricMap).map((key, index) => {
6739
6747
  const currentItem = JSON.parse(evaluationRubricMap[key]);
6740
6748
  const { value } = currentItem;
6741
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "my-3", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6742
- "span",
6749
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6750
+ "p",
6743
6751
  {
6744
- className: "text-xl whitespace-pre-wrap",
6752
+ className: "my-1 text-xl whitespace-pre-wrap",
6745
6753
  children: constructInputWithSpecialExpressionList(value).map(
6746
6754
  (inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6747
6755
  "span",
@@ -6754,7 +6762,7 @@ var ActivityEvaluationRubricContent = ({
6754
6762
  )
6755
6763
  },
6756
6764
  `${key}_${index}`
6757
- ) });
6765
+ );
6758
6766
  })
6759
6767
  ] }) });
6760
6768
  };
package/dist/index.mjs CHANGED
@@ -2297,6 +2297,7 @@ var findBestFitActivity = (activity, individualModelList, outcomeModelList) => {
2297
2297
  } else if (type === "TRUE_FALSE") {
2298
2298
  currentDifficulty = difficultyMap["trueFalseDifficulty"];
2299
2299
  }
2300
+ currentDifficulty = currentDifficulty.toLowerCase();
2300
2301
  const currentDifficultyScore = foundModel[currentDifficulty];
2301
2302
  const splittedTypeList = type.split("_");
2302
2303
  let activityTemplateString = "";
@@ -3040,7 +3041,7 @@ var retrieveDifficultyByActivityTypeFromData = (type, data) => {
3040
3041
 
3041
3042
  // src/components/activities/body-content/ShowBodyMediaByContentType.tsx
3042
3043
  import { InlineMath } from "react-katex";
3043
- import { Fragment, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
3044
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
3044
3045
  var ShowBodyMediaByContentType = ({
3045
3046
  index,
3046
3047
  type,
@@ -3062,7 +3063,14 @@ var ShowBodyMediaByContentType = ({
3062
3063
  }
3063
3064
  };
3064
3065
  const renderSpecialExpressions = (inputPart) => {
3065
- return /* @__PURE__ */ jsx16(Fragment, { children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value });
3066
+ return /* @__PURE__ */ jsx16(
3067
+ "span",
3068
+ {
3069
+ className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
3070
+ children: inputPart.isEquation ? /* @__PURE__ */ jsx16("span", { className: "text-2xl", children: /* @__PURE__ */ jsx16(InlineMath, { math: inputPart.value }) }) : inputPart.value
3071
+ },
3072
+ index
3073
+ );
3066
3074
  };
3067
3075
  const balanceSpecialChars = (text) => {
3068
3076
  let result = text;
@@ -3540,7 +3548,7 @@ import { InlineMath as InlineMath2 } from "react-katex";
3540
3548
  // src/components/groups/InputGroup.tsx
3541
3549
  import Select from "react-select";
3542
3550
  import { useEffect as useEffect3, useRef, useState as useState11, useCallback } from "react";
3543
- import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
3551
+ import { Fragment, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
3544
3552
  var InputGroup = ({
3545
3553
  type,
3546
3554
  title,
@@ -3959,7 +3967,7 @@ var InputGroup = ({
3959
3967
  return CheckboxInputGroup();
3960
3968
  }
3961
3969
  };
3962
- return /* @__PURE__ */ jsxs11(Fragment2, { children: [
3970
+ return /* @__PURE__ */ jsxs11(Fragment, { children: [
3963
3971
  RenderMainContent(),
3964
3972
  /* @__PURE__ */ jsx20(MathConstructorModal, {})
3965
3973
  ] });
@@ -4920,7 +4928,7 @@ var useScreenSize = () => {
4920
4928
  var useScreenSize_default = useScreenSize;
4921
4929
 
4922
4930
  // src/components/activities/material-content/GroupingActivityMaterialContent.tsx
4923
- import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
4931
+ import { Fragment as Fragment2, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
4924
4932
  var GroupingActivityMaterialContent = ({
4925
4933
  uniqueValue,
4926
4934
  answer,
@@ -5019,7 +5027,7 @@ var GroupingActivityMaterialContent = ({
5019
5027
  };
5020
5028
  const answerMap = retrieveAnswerMap();
5021
5029
  const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
5022
- return /* @__PURE__ */ jsxs18(Fragment3, { children: [
5030
+ return /* @__PURE__ */ jsxs18(Fragment2, { children: [
5023
5031
  /* @__PURE__ */ jsx29(
5024
5032
  "div",
5025
5033
  {
@@ -5197,7 +5205,7 @@ var GroupingActivityMaterialContent = ({
5197
5205
  var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
5198
5206
 
5199
5207
  // src/components/activities/GroupingActivityContent.tsx
5200
- import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
5208
+ import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
5201
5209
  var GroupingActivityContent = ({
5202
5210
  answer,
5203
5211
  data,
@@ -5222,7 +5230,7 @@ var GroupingActivityContent = ({
5222
5230
  }
5223
5231
  changeAnswer(answer2);
5224
5232
  };
5225
- return /* @__PURE__ */ jsxs19(Fragment4, { children: [
5233
+ return /* @__PURE__ */ jsxs19(Fragment3, { children: [
5226
5234
  /* @__PURE__ */ jsx30(
5227
5235
  ActivityBodyContent_default,
5228
5236
  {
@@ -5252,7 +5260,7 @@ var GroupingActivityContent_default = GroupingActivityContent;
5252
5260
  import { useEffect as useEffect11, useRef as useRef5, useState as useState20 } from "react";
5253
5261
  import { useDrop as useDrop4 } from "react-dnd";
5254
5262
  import { InlineMath as InlineMath5 } from "react-katex";
5255
- import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
5263
+ import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
5256
5264
  var MatchingActivityMaterialContent = ({
5257
5265
  uniqueValue,
5258
5266
  answer,
@@ -5348,7 +5356,7 @@ var MatchingActivityMaterialContent = ({
5348
5356
  };
5349
5357
  const answerMap = retrieveAnswerMap();
5350
5358
  const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
5351
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
5359
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
5352
5360
  /* @__PURE__ */ jsx31(
5353
5361
  "div",
5354
5362
  {
@@ -5504,7 +5512,7 @@ var MatchingActivityMaterialContent = ({
5504
5512
  var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
5505
5513
 
5506
5514
  // src/components/activities/MatchingActivityContent.tsx
5507
- import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
5515
+ import { Fragment as Fragment5, jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
5508
5516
  var MatchingActivityContent = ({
5509
5517
  answer,
5510
5518
  data,
@@ -5525,7 +5533,7 @@ var MatchingActivityContent = ({
5525
5533
  answerMap[key] = value;
5526
5534
  changeAnswer(answer2);
5527
5535
  };
5528
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
5536
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
5529
5537
  /* @__PURE__ */ jsx32(
5530
5538
  ActivityBodyContent_default,
5531
5539
  {
@@ -5852,7 +5860,7 @@ var MCSAActivityContent = ({
5852
5860
  var MCSAActivityContent_default = MCSAActivityContent;
5853
5861
 
5854
5862
  // src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
5855
- import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
5863
+ import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
5856
5864
  var OpenEndedActivityMaterialContent = ({
5857
5865
  answer,
5858
5866
  contentMap,
@@ -5888,7 +5896,7 @@ var OpenEndedActivityMaterialContent = ({
5888
5896
  );
5889
5897
  };
5890
5898
  const answerMap = retrieveAnswerMap();
5891
- return /* @__PURE__ */ jsx37(Fragment7, { children: /* @__PURE__ */ jsxs26("div", { className: "", children: [
5899
+ return /* @__PURE__ */ jsx37(Fragment6, { children: /* @__PURE__ */ jsxs26("div", { className: "", children: [
5892
5900
  /* @__PURE__ */ jsx37("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx37("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
5893
5901
  /* @__PURE__ */ jsx37("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
5894
5902
  contentMap.type === "TEXT" ? RenderTextContent(answerMap) : null
@@ -5897,7 +5905,7 @@ var OpenEndedActivityMaterialContent = ({
5897
5905
  var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
5898
5906
 
5899
5907
  // src/components/activities/OpenEndedActivityContent.tsx
5900
- import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
5908
+ import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
5901
5909
  var OpenEndedActivityContent = ({
5902
5910
  answer,
5903
5911
  data,
@@ -5929,7 +5937,7 @@ var OpenEndedActivityContent = ({
5929
5937
  )
5930
5938
  }
5931
5939
  ),
5932
- showMaterialContent ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
5940
+ showMaterialContent ? /* @__PURE__ */ jsxs27(Fragment7, { children: [
5933
5941
  /* @__PURE__ */ jsx38(
5934
5942
  "div",
5935
5943
  {
@@ -6169,7 +6177,7 @@ var OrderingActivityMaterialContent = ({
6169
6177
  var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
6170
6178
 
6171
6179
  // src/components/activities/OrderingActivityContent.tsx
6172
- import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
6180
+ import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
6173
6181
  var OrderingActivityContent = ({
6174
6182
  answer,
6175
6183
  data,
@@ -6192,7 +6200,7 @@ var OrderingActivityContent = ({
6192
6200
  answerMap[secondaryKey] = prevValue;
6193
6201
  changeAnswer(answer2);
6194
6202
  };
6195
- return /* @__PURE__ */ jsxs29(Fragment9, { children: [
6203
+ return /* @__PURE__ */ jsxs29(Fragment8, { children: [
6196
6204
  /* @__PURE__ */ jsx41(
6197
6205
  ActivityBodyContent_default,
6198
6206
  {
@@ -6221,7 +6229,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
6221
6229
  // src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
6222
6230
  import { useEffect as useEffect13, useState as useState22 } from "react";
6223
6231
  import { InlineMath as InlineMath9 } from "react-katex";
6224
- import { Fragment as Fragment10, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
6232
+ import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
6225
6233
  var TrueFalseActivityMaterialContent = ({
6226
6234
  uniqueValue,
6227
6235
  answer,
@@ -6343,7 +6351,7 @@ var TrueFalseActivityMaterialContent = ({
6343
6351
  },
6344
6352
  index
6345
6353
  );
6346
- }) }) : /* @__PURE__ */ jsxs30(Fragment10, { children: [
6354
+ }) }) : /* @__PURE__ */ jsxs30(Fragment9, { children: [
6347
6355
  answerMap.trueList.map((item) => /* @__PURE__ */ jsxs30("div", { className: "flex flex-row items-center gap-x-2", children: [
6348
6356
  /* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("p", { children: item }) }),
6349
6357
  /* @__PURE__ */ jsx42("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx42("p", { className: "underline", children: i18n_default.t("true") }) })
@@ -6529,10 +6537,10 @@ var ActivityEvaluationRubricContent = ({
6529
6537
  Object.keys(evaluationRubricMap).map((key, index) => {
6530
6538
  const currentItem = JSON.parse(evaluationRubricMap[key]);
6531
6539
  const { value } = currentItem;
6532
- return /* @__PURE__ */ jsx45("p", { className: "my-3", children: /* @__PURE__ */ jsx45(
6533
- "span",
6540
+ return /* @__PURE__ */ jsx45(
6541
+ "p",
6534
6542
  {
6535
- className: "text-xl whitespace-pre-wrap",
6543
+ className: "my-1 text-xl whitespace-pre-wrap",
6536
6544
  children: constructInputWithSpecialExpressionList(value).map(
6537
6545
  (inputPart, index2) => /* @__PURE__ */ jsx45(
6538
6546
  "span",
@@ -6545,7 +6553,7 @@ var ActivityEvaluationRubricContent = ({
6545
6553
  )
6546
6554
  },
6547
6555
  `${key}_${index}`
6548
- ) });
6556
+ );
6549
6557
  })
6550
6558
  ] }) });
6551
6559
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.14.5",
3
+ "version": "1.14.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -35,7 +35,12 @@ const ShowBodyMediaByContentType = ({
35
35
  // Helper function to render special expressions with proper keys
36
36
  const renderSpecialExpressions = (inputPart: IInputPart) => {
37
37
  return (
38
- <>
38
+ <span
39
+ key={index}
40
+ className={`${inputPart.isBold ? "font-bold" : ""} ${
41
+ inputPart.isUnderline ? "underline" : ""
42
+ }`}
43
+ >
39
44
  {inputPart.isEquation ? (
40
45
  <span className="text-2xl">
41
46
  <InlineMath math={inputPart.value} />
@@ -43,7 +48,7 @@ const ShowBodyMediaByContentType = ({
43
48
  ) : (
44
49
  inputPart.value
45
50
  )}
46
- </>
51
+ </span>
47
52
  );
48
53
  };
49
54
 
@@ -44,30 +44,28 @@ const ActivityEvaluationRubricContent = ({
44
44
  const currentItem = JSON.parse(evaluationRubricMap[key]);
45
45
  const { value } = currentItem;
46
46
  return (
47
- <p className="my-3">
48
- <span
49
- key={`${key}_${index}`}
50
- className="text-xl whitespace-pre-wrap"
51
- >
52
- {constructInputWithSpecialExpressionList(value).map(
53
- (inputPart, index) => (
54
- <span
55
- key={index}
56
- className={`${inputPart.isBold ? "font-bold" : ""} ${
57
- inputPart.isUnderline ? "underline" : ""
58
- }`}
59
- >
60
- {inputPart.isEquation ? (
61
- <span className="text-2xl">
62
- <InlineMath math={inputPart.value} />
63
- </span>
64
- ) : (
65
- inputPart.value
66
- )}
67
- </span>
68
- )
69
- )}
70
- </span>
47
+ <p
48
+ key={`${key}_${index}`}
49
+ className="my-1 text-xl whitespace-pre-wrap"
50
+ >
51
+ {constructInputWithSpecialExpressionList(value).map(
52
+ (inputPart, index) => (
53
+ <span
54
+ key={index}
55
+ className={`${inputPart.isBold ? "font-bold" : ""} ${
56
+ inputPart.isUnderline ? "underline" : ""
57
+ }`}
58
+ >
59
+ {inputPart.isEquation ? (
60
+ <span className="text-2xl">
61
+ <InlineMath math={inputPart.value} />
62
+ </span>
63
+ ) : (
64
+ inputPart.value
65
+ )}
66
+ </span>
67
+ )
68
+ )}
71
69
  </p>
72
70
  );
73
71
  })}
@@ -1498,6 +1498,7 @@ export const findBestFitActivity = (
1498
1498
  } else if (type === "TRUE_FALSE") {
1499
1499
  currentDifficulty = difficultyMap["trueFalseDifficulty"];
1500
1500
  }
1501
+ currentDifficulty = currentDifficulty.toLowerCase();
1501
1502
 
1502
1503
  const currentDifficultyScore = foundModel[currentDifficulty];
1503
1504
  const splittedTypeList = type.split("_");
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file