catchup-library-web 2.2.7 → 2.2.9
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
|
@@ -4188,7 +4188,9 @@ var InputGroup = ({
|
|
|
4188
4188
|
value,
|
|
4189
4189
|
onChange: handleTextOnChange,
|
|
4190
4190
|
onFocus,
|
|
4191
|
-
onKeyDown
|
|
4191
|
+
onKeyDown,
|
|
4192
|
+
min: minValue,
|
|
4193
|
+
max: maxValue
|
|
4192
4194
|
}
|
|
4193
4195
|
)
|
|
4194
4196
|
}
|
|
@@ -7199,23 +7201,30 @@ var ActivityEvaluationRubricContent = ({
|
|
|
7199
7201
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
7200
7202
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
7201
7203
|
const { value } = currentItem;
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7204
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*(.*)/);
|
|
7205
|
+
let score = 0;
|
|
7206
|
+
let evaluationRubric = value;
|
|
7207
|
+
if (matchedRegex) {
|
|
7208
|
+
score = 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
|
+
score,
|
|
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
|
|
7215
7225
|
)
|
|
7216
|
-
}
|
|
7217
|
-
|
|
7218
|
-
);
|
|
7226
|
+
) })
|
|
7227
|
+
] }, `${key}_${index}`);
|
|
7219
7228
|
})
|
|
7220
7229
|
] }) });
|
|
7221
7230
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -3965,7 +3965,9 @@ var InputGroup = ({
|
|
|
3965
3965
|
value,
|
|
3966
3966
|
onChange: handleTextOnChange,
|
|
3967
3967
|
onFocus,
|
|
3968
|
-
onKeyDown
|
|
3968
|
+
onKeyDown,
|
|
3969
|
+
min: minValue,
|
|
3970
|
+
max: maxValue
|
|
3969
3971
|
}
|
|
3970
3972
|
)
|
|
3971
3973
|
}
|
|
@@ -6976,23 +6978,30 @@ var ActivityEvaluationRubricContent = ({
|
|
|
6976
6978
|
Object.keys(evaluationRubricMap).map((key, index) => {
|
|
6977
6979
|
const currentItem = JSON.parse(evaluationRubricMap[key]);
|
|
6978
6980
|
const { value } = currentItem;
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6981
|
+
const matchedRegex = value.match(/\[(\d+)\]\s*(.*)/);
|
|
6982
|
+
let score = 0;
|
|
6983
|
+
let evaluationRubric = value;
|
|
6984
|
+
if (matchedRegex) {
|
|
6985
|
+
score = 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
|
+
score,
|
|
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
|
|
6992
7002
|
)
|
|
6993
|
-
}
|
|
6994
|
-
|
|
6995
|
-
);
|
|
7003
|
+
) })
|
|
7004
|
+
] }, `${key}_${index}`);
|
|
6996
7005
|
})
|
|
6997
7006
|
] }) });
|
|
6998
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*(.*)/);
|
|
48
|
+
let score = 0;
|
|
49
|
+
let evaluationRubric = value;
|
|
50
|
+
|
|
51
|
+
if (matchedRegex) {
|
|
52
|
+
score = 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
|
+
{score} {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>
|