catchup-library-web 2.2.8 → 2.2.10
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
|
@@ -7201,23 +7201,30 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7201
7201
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
7202
7202
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
7203
7203
|
const { value } = currentItem;
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7204
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*([\s\S]*)/);
|
|
7205
|
+
let points = 0;
|
|
7206
|
+
let evaluationRubric = value;
|
|
7207
|
+
if (matchedRegex) {
|
|
7208
|
+
points = parseFloat(matchedRegex[1]);
|
|
7209
|
+
evaluationRubric = matchedRegex[2];
|
|
7210
|
+
}
|
|
7211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "my-2 flex flex-row gap-x-3", children: [
|
|
7212
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "font-bold text-xl whitespace-nowrap", children: [
|
|
7213
|
+
points,
|
|
7214
|
+
" ",
|
|
7215
|
+
i18n_default.t("points")
|
|
7216
|
+
] }),
|
|
7217
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "flex-1 text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
7218
|
+
(inputPart, inputIndex) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7219
|
+
"span",
|
|
7220
|
+
{
|
|
7221
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
7222
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_katex12.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
7223
|
+
},
|
|
7224
|
+
inputIndex
|
|
7217
7225
|
)
|
|
7218
|
-
}
|
|
7219
|
-
|
|
7220
|
-
);
|
|
7226
|
+
) })
|
|
7227
|
+
] }, `${key}_${index}`);
|
|
7221
7228
|
})
|
|
7222
7229
|
] }) });
|
|
7223
7230
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -6978,23 +6978,30 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6978
6978
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
6979
6979
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
6980
6980
|
const { value } = currentItem;
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6981
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*([\s\S]*)/);
|
|
6982
|
+
let points = 0;
|
|
6983
|
+
let evaluationRubric = value;
|
|
6984
|
+
if (matchedRegex) {
|
|
6985
|
+
points = parseFloat(matchedRegex[1]);
|
|
6986
|
+
evaluationRubric = matchedRegex[2];
|
|
6987
|
+
}
|
|
6988
|
+
return /* @__PURE__ */ jsxs34("div", { className: "my-2 flex flex-row gap-x-3", children: [
|
|
6989
|
+
/* @__PURE__ */ jsxs34("div", { className: "font-bold text-xl whitespace-nowrap", children: [
|
|
6990
|
+
points,
|
|
6991
|
+
" ",
|
|
6992
|
+
i18n_default.t("points")
|
|
6993
|
+
] }),
|
|
6994
|
+
/* @__PURE__ */ jsx45("p", { className: "flex-1 text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
6995
|
+
(inputPart, inputIndex) => /* @__PURE__ */ jsx45(
|
|
6996
|
+
"span",
|
|
6997
|
+
{
|
|
6998
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
6999
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx45("span", { className: "text-xl", children: /* @__PURE__ */ jsx45(InlineMath12, { math: inputPart.value }) }) : inputPart.value
|
|
7000
|
+
},
|
|
7001
|
+
inputIndex
|
|
6994
7002
|
)
|
|
6995
|
-
}
|
|
6996
|
-
|
|
6997
|
-
);
|
|
7003
|
+
) })
|
|
7004
|
+
] }, `${key}_${index}`);
|
|
6998
7005
|
})
|
|
6999
7006
|
] }) });
|
|
7000
7007
|
};
|
package/package.json
CHANGED
package/src/components/activities/evaluation-rubric-contents/ActivityEvaluationRubricContent.tsx
CHANGED
|
@@ -44,30 +44,41 @@ const ActivityEvaluationRubricContent = ({
|
|
|
44
44
|
{Object.keys(evaluationRubricMap).map((key, index) => {
|
|
45
45
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
46
46
|
const { value } = currentItem;
|
|
47
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*([\s\S]*)/);
|
|
48
|
+
let points = 0;
|
|
49
|
+
let evaluationRubric = value;
|
|
50
|
+
|
|
51
|
+
if (matchedRegex) {
|
|
52
|
+
points = parseFloat(matchedRegex[1]);
|
|
53
|
+
evaluationRubric = matchedRegex[2];
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
return (
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
inputPart.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
<div key={`${key}_${index}`} className="my-2 flex flex-row gap-x-3">
|
|
58
|
+
<div className="font-bold text-xl whitespace-nowrap">
|
|
59
|
+
{points} {i18n.t("points")}
|
|
60
|
+
</div>
|
|
61
|
+
<p className="flex-1 text-xl whitespace-pre-wrap">
|
|
62
|
+
{constructInputWithSpecialExpressionList(evaluationRubric).map(
|
|
63
|
+
(inputPart, inputIndex) => (
|
|
64
|
+
<span
|
|
65
|
+
key={inputIndex}
|
|
66
|
+
className={`${inputPart.isBold ? "font-bold" : ""} ${
|
|
67
|
+
inputPart.isUnderline ? "underline" : ""
|
|
68
|
+
}`}
|
|
69
|
+
>
|
|
70
|
+
{inputPart.isEquation ? (
|
|
71
|
+
<span className="text-xl">
|
|
72
|
+
<InlineMath math={inputPart.value} />
|
|
73
|
+
</span>
|
|
74
|
+
) : (
|
|
75
|
+
inputPart.value
|
|
76
|
+
)}
|
|
77
|
+
</span>
|
|
78
|
+
)
|
|
79
|
+
)}
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
71
82
|
);
|
|
72
83
|
})}
|
|
73
84
|
</div>
|