touchstudy-core 0.1.134 → 0.1.135
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.
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TextbookDetailResponse } from "./types";
|
2
2
|
export declare const reduceToMathArticles: (textbook: any, isMath?: number | undefined) => any;
|
3
|
-
export declare const
|
3
|
+
export declare const resetAllCategoriesAndQuestionTypesBySubject: (textbook: any, subject?: any) => any;
|
4
4
|
export declare const convertResponseToRequest: (selectedTextbook?: TextbookDetailResponse | undefined) => import("./types").TextbookRequest;
|
package/dist/index.js
CHANGED
@@ -28030,7 +28030,8 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28030
28030
|
return React__default.createElement(material.FormGroup, {
|
28031
28031
|
sx: {
|
28032
28032
|
width: "100%",
|
28033
|
-
maxWidth: "240px"
|
28033
|
+
maxWidth: "240px",
|
28034
|
+
pl: "24px"
|
28034
28035
|
}
|
28035
28036
|
}, React__default.createElement(material.FormLabel, {
|
28036
28037
|
htmlFor: "textual_answer",
|
@@ -29158,11 +29159,14 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29158
29159
|
alignItems: "center"
|
29159
29160
|
}
|
29160
29161
|
}, React__default.createElement(material.Checkbox, {
|
29162
|
+
id: "fix",
|
29161
29163
|
inputRef: fixedRef
|
29162
29164
|
})), React__default.createElement(material.FormLabel, {
|
29165
|
+
htmlFor: "fix",
|
29163
29166
|
sx: {
|
29164
29167
|
display: "flex",
|
29165
|
-
alignItems: "center"
|
29168
|
+
alignItems: "center",
|
29169
|
+
cursor: "pointer"
|
29166
29170
|
}
|
29167
29171
|
}, t("fix_this_information_for_this_book")))));
|
29168
29172
|
};
|
@@ -30151,7 +30155,7 @@ var _reduceToMathArticles = function reduceToMathArticles(textbook, isMath) {
|
|
30151
30155
|
}
|
30152
30156
|
return values;
|
30153
30157
|
};
|
30154
|
-
var
|
30158
|
+
var _resetAllCategoriesAndQuestionTypesBySubject = function resetAllCategoriesAndQuestionTypesBySubject(textbook, subject) {
|
30155
30159
|
var values = subject ? _$5.cloneDeep(textbook) : textbook;
|
30156
30160
|
if (subject) {
|
30157
30161
|
values.subjectId = subject === null || subject === void 0 ? void 0 : subject.value;
|
@@ -30164,7 +30168,7 @@ var _resetAllCrategoriesAndQuestionTypesBySubject = function resetAllCrategories
|
|
30164
30168
|
} else if (key === "questionType" || key === "questionTypeId") {
|
30165
30169
|
values[key] = null;
|
30166
30170
|
} else if (typeof values[key] === "object" && values[key] !== null) {
|
30167
|
-
|
30171
|
+
_resetAllCategoriesAndQuestionTypesBySubject(values[key]);
|
30168
30172
|
}
|
30169
30173
|
}
|
30170
30174
|
}
|
@@ -30311,7 +30315,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
30311
30315
|
setValues(newValues);
|
30312
30316
|
};
|
30313
30317
|
var handleChangeSubject = function handleChangeSubject(val) {
|
30314
|
-
var newValues =
|
30318
|
+
var newValues = _resetAllCategoriesAndQuestionTypesBySubject(values, val);
|
30315
30319
|
setValues(newValues);
|
30316
30320
|
};
|
30317
30321
|
var inforErrors = errors.coverImage || errors.grade || errors.isbn || errors.preparedType || errors.publicationDate || errors.publisher;
|