touchstudy-core 0.1.134 → 0.1.136
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.modern.js
CHANGED
@@ -28044,7 +28044,8 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
28044
28044
|
return React__default.createElement(FormGroup, {
|
28045
28045
|
sx: {
|
28046
28046
|
width: "100%",
|
28047
|
-
maxWidth: "240px"
|
28047
|
+
maxWidth: "240px",
|
28048
|
+
pl: "24px"
|
28048
28049
|
}
|
28049
28050
|
}, React__default.createElement(FormLabel, {
|
28050
28051
|
htmlFor: "textual_answer",
|
@@ -29172,11 +29173,14 @@ var QuestionTypeFilter = function QuestionTypeFilter(_ref) {
|
|
29172
29173
|
alignItems: "center"
|
29173
29174
|
}
|
29174
29175
|
}, React__default.createElement(Checkbox, {
|
29176
|
+
id: "fix",
|
29175
29177
|
inputRef: fixedRef
|
29176
29178
|
})), React__default.createElement(FormLabel, {
|
29179
|
+
htmlFor: "fix",
|
29177
29180
|
sx: {
|
29178
29181
|
display: "flex",
|
29179
|
-
alignItems: "center"
|
29182
|
+
alignItems: "center",
|
29183
|
+
cursor: "pointer"
|
29180
29184
|
}
|
29181
29185
|
}, t("fix_this_information_for_this_book")))));
|
29182
29186
|
};
|
@@ -29961,7 +29965,7 @@ var useSelect = function useSelect(_ref) {
|
|
29961
29965
|
};
|
29962
29966
|
|
29963
29967
|
var OwnerSelector = function OwnerSelector(_ref) {
|
29964
|
-
var
|
29968
|
+
var _values$textbookOwner, _errors$textbookOwner, _errors$textbookOwner2, _values$textbookOwner2, _errors$textbookOwner3, _errors$textbookOwner4;
|
29965
29969
|
var values = _ref.values,
|
29966
29970
|
errors = _ref.errors,
|
29967
29971
|
index = _ref.index,
|
@@ -29975,30 +29979,10 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
29975
29979
|
handleChangeEmail: handleChangeEmail
|
29976
29980
|
}),
|
29977
29981
|
t = _useSelect.t,
|
29978
|
-
loadData = _useSelect.loadData,
|
29979
29982
|
isLoading = _useSelect.isLoading,
|
29980
29983
|
academyOptions = _useSelect.academyOptions,
|
29981
29984
|
courseOptions = _useSelect.courseOptions;
|
29982
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Stack, {
|
29983
|
-
flexDirection: "column",
|
29984
|
-
gap: 1,
|
29985
|
-
width: 1
|
29986
|
-
}, React__default.createElement("label", {
|
29987
|
-
htmlFor: "email"
|
29988
|
-
}, t("email")), React__default.createElement(Field, {
|
29989
|
-
name: "textbookOwners[" + index + "].email",
|
29990
|
-
render: function render() {
|
29991
|
-
return React__default.createElement(TextField, {
|
29992
|
-
fullWidth: true,
|
29993
|
-
onChange: loadData
|
29994
|
-
});
|
29995
|
-
}
|
29996
|
-
}), !!(errors !== null && errors !== void 0 && (_errors$textbookOwner = errors.textbookOwners) !== null && _errors$textbookOwner !== void 0 && (_errors$textbookOwner2 = _errors$textbookOwner[index]) !== null && _errors$textbookOwner2 !== void 0 && _errors$textbookOwner2.email) && React__default.createElement(Typography, {
|
29997
|
-
fontWeight: 500,
|
29998
|
-
fontSize: "10px",
|
29999
|
-
lineHeight: "11.93px",
|
30000
|
-
color: !(errors !== null && errors !== void 0 && (_errors$textbookOwner3 = errors.textbookOwners) !== null && _errors$textbookOwner3 !== void 0 && (_errors$textbookOwner4 = _errors$textbookOwner3[index]) !== null && _errors$textbookOwner4 !== void 0 && _errors$textbookOwner4.email) ? "#97A1AF" : "#F34B4B"
|
30001
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$textbookOwner5 = errors.textbookOwners) === null || _errors$textbookOwner5 === void 0 ? void 0 : (_errors$textbookOwner6 = _errors$textbookOwner5[index]) === null || _errors$textbookOwner6 === void 0 ? void 0 : _errors$textbookOwner6.email)), (values === null || values === void 0 ? void 0 : (_values$textbookOwner = values.textbookOwners) === null || _values$textbookOwner === void 0 ? void 0 : _values$textbookOwner[index].email) && React__default.createElement(Stack, {
|
29985
|
+
return React__default.createElement(React__default.Fragment, null, (values === null || values === void 0 ? void 0 : (_values$textbookOwner = values.textbookOwners) === null || _values$textbookOwner === void 0 ? void 0 : _values$textbookOwner[index].email) && React__default.createElement(Stack, {
|
30002
29986
|
flexDirection: "column",
|
30003
29987
|
gap: 1,
|
30004
29988
|
width: 1
|
@@ -30017,7 +30001,7 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
30017
30001
|
}
|
30018
30002
|
}));
|
30019
30003
|
}
|
30020
|
-
}), !!(errors !== null && errors !== void 0 && (_errors$
|
30004
|
+
}), !!(errors !== null && errors !== void 0 && (_errors$textbookOwner = errors.textbookOwners) !== null && _errors$textbookOwner !== void 0 && (_errors$textbookOwner2 = _errors$textbookOwner[index]) !== null && _errors$textbookOwner2 !== void 0 && _errors$textbookOwner2.academyId) && React__default.createElement(Typography, {
|
30021
30005
|
fontWeight: 500,
|
30022
30006
|
fontSize: "10px",
|
30023
30007
|
lineHeight: "11.93px",
|
@@ -30041,7 +30025,7 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
30041
30025
|
}
|
30042
30026
|
}));
|
30043
30027
|
}
|
30044
|
-
}), !!(errors !== null && errors !== void 0 && (_errors$
|
30028
|
+
}), !!(errors !== null && errors !== void 0 && (_errors$textbookOwner3 = errors.textbookOwners) !== null && _errors$textbookOwner3 !== void 0 && (_errors$textbookOwner4 = _errors$textbookOwner3[index]) !== null && _errors$textbookOwner4 !== void 0 && _errors$textbookOwner4.courseId) && React__default.createElement(Typography, {
|
30045
30029
|
fontWeight: 500,
|
30046
30030
|
fontSize: "10px",
|
30047
30031
|
lineHeight: "11.93px",
|
@@ -30165,7 +30149,7 @@ var _reduceToMathArticles = function reduceToMathArticles(textbook, isMath) {
|
|
30165
30149
|
}
|
30166
30150
|
return values;
|
30167
30151
|
};
|
30168
|
-
var
|
30152
|
+
var _resetAllCategoriesAndQuestionTypesBySubject = function resetAllCategoriesAndQuestionTypesBySubject(textbook, subject) {
|
30169
30153
|
var values = subject ? _$5.cloneDeep(textbook) : textbook;
|
30170
30154
|
if (subject) {
|
30171
30155
|
values.subjectId = subject === null || subject === void 0 ? void 0 : subject.value;
|
@@ -30178,7 +30162,7 @@ var _resetAllCrategoriesAndQuestionTypesBySubject = function resetAllCrategories
|
|
30178
30162
|
} else if (key === "questionType" || key === "questionTypeId") {
|
30179
30163
|
values[key] = null;
|
30180
30164
|
} else if (typeof values[key] === "object" && values[key] !== null) {
|
30181
|
-
|
30165
|
+
_resetAllCategoriesAndQuestionTypesBySubject(values[key]);
|
30182
30166
|
}
|
30183
30167
|
}
|
30184
30168
|
}
|
@@ -30219,7 +30203,7 @@ var convertResponseToRequest = function convertResponseToRequest(selectedTextboo
|
|
30219
30203
|
questions: g.questions.map(function (q) {
|
30220
30204
|
var _q$questionType;
|
30221
30205
|
return _extends({}, q, {
|
30222
|
-
questionTypeId: q.questionTypeId,
|
30206
|
+
questionTypeId: q.questionTypeId || q.questionType.id,
|
30223
30207
|
questionType: (_q$questionType = q.questionType) !== null && _q$questionType !== void 0 && _q$questionType.id ? {
|
30224
30208
|
label: q.questionType.name,
|
30225
30209
|
value: q.questionType.id
|
@@ -30325,7 +30309,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
30325
30309
|
setValues(newValues);
|
30326
30310
|
};
|
30327
30311
|
var handleChangeSubject = function handleChangeSubject(val) {
|
30328
|
-
var newValues =
|
30312
|
+
var newValues = _resetAllCategoriesAndQuestionTypesBySubject(values, val);
|
30329
30313
|
setValues(newValues);
|
30330
30314
|
};
|
30331
30315
|
var inforErrors = errors.coverImage || errors.grade || errors.isbn || errors.preparedType || errors.publicationDate || errors.publisher;
|