catchup-library-web 1.20.11 → 1.20.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.20.11",
3
+ "version": "1.20.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -25,6 +25,7 @@ const ActivityEvaluationRubricContent = ({
25
25
  if (!evaluationRubricMapKey) return null;
26
26
  const evaluationRubricMapString = data[evaluationRubricMapKey];
27
27
  let evaluationRubricMap;
28
+ if (!evaluationRubricMapString) return;
28
29
  try {
29
30
  evaluationRubricMap = JSON.parse(evaluationRubricMapString);
30
31
  } catch (error) {
@@ -12,6 +12,7 @@ import DroppableItem from "../../dnds/DroppableItem";
12
12
  import ShowMaterialMediaByContentType from "./ShowMaterialMediaByContentType";
13
13
  import DividerLine from "../../dividers/DividerLine";
14
14
  import { IFillInTheBlanksActivityMaterialProps } from "../../../properties/ActivityProperties";
15
+ import InputWithSpecialExpression from "../../texts/InputWithSpecialExpression";
15
16
 
16
17
  const FillInTheBlanksActivityMaterialContent = ({
17
18
  uniqueValue,
@@ -117,7 +118,12 @@ const FillInTheBlanksActivityMaterialContent = ({
117
118
  setPasteOptionIndex(null);
118
119
  }}
119
120
  >
120
- <p className="italic whitespace-pre-wrap">{option}</p>
121
+ <p className="italic whitespace-pre-wrap">
122
+ <InputWithSpecialExpression
123
+ value={option}
124
+ showSpecialOnly={true}
125
+ />
126
+ </p>
121
127
  </div>
122
128
  ) : (
123
129
  <div
@@ -171,7 +177,7 @@ const FillInTheBlanksActivityMaterialContent = ({
171
177
  contentMap.type === "TEXT" ? (
172
178
  <div className="relative">
173
179
  <div className="flex-1">
174
- <InputGroup
180
+ {/* <InputGroup
175
181
  type="textarea"
176
182
  value={answerMap[materialKey]}
177
183
  useMinHeight={false}
@@ -182,8 +188,30 @@ const FillInTheBlanksActivityMaterialContent = ({
182
188
  e.target.value
183
189
  );
184
190
  }}
185
- />
191
+ /> */}
192
+ <div
193
+ className={`w-full min-h-[44px] p-3 border rounded-lg ${
194
+ answerMap[materialKey]
195
+ ? "bg-white border-gray-300"
196
+ : "bg-gray-50 border-gray-200 border-dashed"
197
+ }`}
198
+ onClick={() => {
199
+ if (answerMap[materialKey]) {
200
+ onChange(answer, materialKey, "");
201
+ }
202
+ }}
203
+ >
204
+ {answerMap[materialKey] ? (
205
+ <InputWithSpecialExpression
206
+ value={answerMap[materialKey]}
207
+ showSpecialOnly={true}
208
+ />
209
+ ) : (
210
+ <p className="text-gray-400 italic"></p>
211
+ )}
212
+ </div>
186
213
  </div>
214
+
187
215
  {learnerAnswerState === "CORRECT" ? (
188
216
  <div className="absolute -top-[10px] right-4 bg-catchup-white">
189
217
  <BaseImage
@@ -32,7 +32,7 @@ const OrderingActivityMaterialContent = ({
32
32
 
33
33
  useEffect(() => {
34
34
  if (!screenSize) return;
35
- if (screenSize.width <= 768) {
35
+ if (screenSize.width <= 1024) {
36
36
  setView("TABLET");
37
37
  } else {
38
38
  setView("PC");
@@ -7,8 +7,6 @@ import { IOptionProps } from "../../properties/CommonProperties";
7
7
  import { MathfieldElement } from "mathlive";
8
8
  import BaseModal from "../modals/BaseModal";
9
9
  import FullCard from "../cards/FullCard";
10
- import SecondaryButton from "../buttons/SecondaryButton";
11
- import PrimaryButton from "../buttons/PrimaryButton";
12
10
 
13
11
  declare global {
14
12
  namespace JSX {