catchup-library-web 1.9.3 → 1.9.5
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.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +9 -8
- package/dist/index.mjs +9 -8
- package/package.json +1 -1
- package/src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx +2 -0
- package/src/utilization/CatchtivityUtilization.ts +6 -7
package/dist/index.d.mts
CHANGED
|
@@ -411,7 +411,6 @@ declare const constructInputWithSpecialExpressionList: (inputText: string) => {
|
|
|
411
411
|
isEquation: boolean;
|
|
412
412
|
isUnderline: boolean;
|
|
413
413
|
isBold: boolean;
|
|
414
|
-
isCode: boolean;
|
|
415
414
|
}[];
|
|
416
415
|
declare const retrieveStandardExamTypeOptionList: () => {
|
|
417
416
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -411,7 +411,6 @@ declare const constructInputWithSpecialExpressionList: (inputText: string) => {
|
|
|
411
411
|
isEquation: boolean;
|
|
412
412
|
isUnderline: boolean;
|
|
413
413
|
isBold: boolean;
|
|
414
|
-
isCode: boolean;
|
|
415
414
|
}[];
|
|
416
415
|
declare const retrieveStandardExamTypeOptionList: () => {
|
|
417
416
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -1193,17 +1193,16 @@ var constructInputWithSpecialExpressionList = (inputText) => {
|
|
|
1193
1193
|
let isEquation = false;
|
|
1194
1194
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
1195
1195
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
1196
|
-
let
|
|
1197
|
-
const
|
|
1198
|
-
for (let l = 0; l <
|
|
1196
|
+
let isBacktickEquation = false;
|
|
1197
|
+
const splittedBacktick = splittedEquation[k].split("`");
|
|
1198
|
+
for (let l = 0; l < splittedBacktick.length; l++) {
|
|
1199
1199
|
inputPartList.push({
|
|
1200
|
-
value:
|
|
1201
|
-
isEquation,
|
|
1200
|
+
value: splittedBacktick[l],
|
|
1201
|
+
isEquation: isEquation || isBacktickEquation,
|
|
1202
1202
|
isUnderline,
|
|
1203
|
-
isBold
|
|
1204
|
-
isCode
|
|
1203
|
+
isBold
|
|
1205
1204
|
});
|
|
1206
|
-
|
|
1205
|
+
isBacktickEquation = !isBacktickEquation;
|
|
1207
1206
|
}
|
|
1208
1207
|
isEquation = !isEquation;
|
|
1209
1208
|
}
|
|
@@ -4456,7 +4455,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4456
4455
|
const foundAnswer = answer.data.find(
|
|
4457
4456
|
(answerData) => answerData.type === "FILL_IN_THE_BLANKS"
|
|
4458
4457
|
);
|
|
4458
|
+
console.log("found answer: ", foundAnswer);
|
|
4459
4459
|
if (foundAnswer.answerMap.length === 0) return;
|
|
4460
|
+
if (Object.keys(materialMap).length === 0) return;
|
|
4460
4461
|
foundAnswer.answerMap = Object.keys(materialMap).map(
|
|
4461
4462
|
(materialMapKey, index) => JSON.parse(materialMap[materialMapKey])[0]
|
|
4462
4463
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -994,17 +994,16 @@ var constructInputWithSpecialExpressionList = (inputText) => {
|
|
|
994
994
|
let isEquation = false;
|
|
995
995
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
996
996
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
997
|
-
let
|
|
998
|
-
const
|
|
999
|
-
for (let l = 0; l <
|
|
997
|
+
let isBacktickEquation = false;
|
|
998
|
+
const splittedBacktick = splittedEquation[k].split("`");
|
|
999
|
+
for (let l = 0; l < splittedBacktick.length; l++) {
|
|
1000
1000
|
inputPartList.push({
|
|
1001
|
-
value:
|
|
1002
|
-
isEquation,
|
|
1001
|
+
value: splittedBacktick[l],
|
|
1002
|
+
isEquation: isEquation || isBacktickEquation,
|
|
1003
1003
|
isUnderline,
|
|
1004
|
-
isBold
|
|
1005
|
-
isCode
|
|
1004
|
+
isBold
|
|
1006
1005
|
});
|
|
1007
|
-
|
|
1006
|
+
isBacktickEquation = !isBacktickEquation;
|
|
1008
1007
|
}
|
|
1009
1008
|
isEquation = !isEquation;
|
|
1010
1009
|
}
|
|
@@ -4257,7 +4256,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4257
4256
|
const foundAnswer = answer.data.find(
|
|
4258
4257
|
(answerData) => answerData.type === "FILL_IN_THE_BLANKS"
|
|
4259
4258
|
);
|
|
4259
|
+
console.log("found answer: ", foundAnswer);
|
|
4260
4260
|
if (foundAnswer.answerMap.length === 0) return;
|
|
4261
|
+
if (Object.keys(materialMap).length === 0) return;
|
|
4261
4262
|
foundAnswer.answerMap = Object.keys(materialMap).map(
|
|
4262
4263
|
(materialMapKey, index) => JSON.parse(materialMap[materialMapKey])[0]
|
|
4263
4264
|
);
|
package/package.json
CHANGED
package/src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
CHANGED
|
@@ -45,7 +45,9 @@ const FillInTheBlanksActivityMaterialContent = ({
|
|
|
45
45
|
const foundAnswer = answer.data.find(
|
|
46
46
|
(answerData: any) => answerData.type === "FILL_IN_THE_BLANKS"
|
|
47
47
|
);
|
|
48
|
+
console.log("found answer: ", foundAnswer);
|
|
48
49
|
if (foundAnswer.answerMap.length === 0) return;
|
|
50
|
+
if (Object.keys(materialMap).length === 0) return;
|
|
49
51
|
foundAnswer.answerMap = Object.keys(materialMap).map(
|
|
50
52
|
(materialMapKey, index) => JSON.parse(materialMap[materialMapKey])[0]
|
|
51
53
|
);
|
|
@@ -212,18 +212,17 @@ export const constructInputWithSpecialExpressionList = (inputText: string) => {
|
|
|
212
212
|
const splittedEquation = splittedUnderline[j].split("$$");
|
|
213
213
|
|
|
214
214
|
for (let k = 0; k < splittedEquation.length; k++) {
|
|
215
|
-
let
|
|
216
|
-
const
|
|
215
|
+
let isBacktickEquation = false;
|
|
216
|
+
const splittedBacktick = splittedEquation[k].split("`");
|
|
217
217
|
|
|
218
|
-
for (let l = 0; l <
|
|
218
|
+
for (let l = 0; l < splittedBacktick.length; l++) {
|
|
219
219
|
inputPartList.push({
|
|
220
|
-
value:
|
|
221
|
-
isEquation,
|
|
220
|
+
value: splittedBacktick[l],
|
|
221
|
+
isEquation: isEquation || isBacktickEquation,
|
|
222
222
|
isUnderline,
|
|
223
223
|
isBold,
|
|
224
|
-
isCode,
|
|
225
224
|
});
|
|
226
|
-
|
|
225
|
+
isBacktickEquation = !isBacktickEquation;
|
|
227
226
|
}
|
|
228
227
|
isEquation = !isEquation;
|
|
229
228
|
}
|