touchstudy-core 0.1.149 → 0.1.151
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/containers/ExamResult/configs/types.d.ts +4 -2
- package/dist/containers/PreparedTextbook/components/QuestionShortInput.d.ts +3 -0
- package/dist/containers/PreparedTextbook/configs/types.d.ts +2 -2
- package/dist/index.js +166 -133
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +166 -133
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -23,7 +23,7 @@ import { useSelector, useDispatch } from 'react-redux';
|
|
23
23
|
import Select, { components } from 'react-select';
|
24
24
|
import CreatableSelect from 'react-select/creatable';
|
25
25
|
import axios from 'axios';
|
26
|
-
import _$
|
26
|
+
import _$8 from 'lodash';
|
27
27
|
import { useGoogleLogout, GoogleLogin } from '@leecheuk/react-google-login';
|
28
28
|
import 'moment/locale/ko.js';
|
29
29
|
import 'moment/locale/en-au.js';
|
@@ -1477,6 +1477,7 @@ var order_matters = "순서 상관 있음";
|
|
1477
1477
|
var order_does_not_matter = "순서 상관 없음";
|
1478
1478
|
var synonym_processing = "답 이음동의어 처리";
|
1479
1479
|
var compare_type = "비교 유형";
|
1480
|
+
var answer_cannot_be_empty = "답변은 비워둘 수 없습니다";
|
1480
1481
|
var lang_ko = {
|
1481
1482
|
problem_solving: problem_solving,
|
1482
1483
|
my_story: my_story,
|
@@ -2587,7 +2588,8 @@ var lang_ko = {
|
|
2587
2588
|
order_matters: order_matters,
|
2588
2589
|
order_does_not_matter: order_does_not_matter,
|
2589
2590
|
synonym_processing: synonym_processing,
|
2590
|
-
compare_type: compare_type
|
2591
|
+
compare_type: compare_type,
|
2592
|
+
answer_cannot_be_empty: answer_cannot_be_empty
|
2591
2593
|
};
|
2592
2594
|
|
2593
2595
|
var problem_solving$1 = "Problem Solving";
|
@@ -3721,6 +3723,7 @@ var order_matters$1 = "Order matters";
|
|
3721
3723
|
var order_does_not_matter$1 = "Order doesn't matter";
|
3722
3724
|
var synonym_processing$1 = "Answer Synonym processing";
|
3723
3725
|
var compare_type$1 = "Compare Type";
|
3726
|
+
var answer_cannot_be_empty$1 = "Answer cannot be empty";
|
3724
3727
|
var lang_en = {
|
3725
3728
|
problem_solving: problem_solving$1,
|
3726
3729
|
my_story: my_story$1,
|
@@ -4833,7 +4836,8 @@ var lang_en = {
|
|
4833
4836
|
order_matters: order_matters$1,
|
4834
4837
|
order_does_not_matter: order_does_not_matter$1,
|
4835
4838
|
synonym_processing: synonym_processing$1,
|
4836
|
-
compare_type: compare_type$1
|
4839
|
+
compare_type: compare_type$1,
|
4840
|
+
answer_cannot_be_empty: answer_cannot_be_empty$1
|
4837
4841
|
};
|
4838
4842
|
|
4839
4843
|
i18n.use(initReactI18next).init({
|
@@ -6442,7 +6446,7 @@ var getLocalDayOfWeek = function getLocalDayOfWeek(utcDateTime, dayOfWeek) {
|
|
6442
6446
|
return moment.utc(utcDateTime).add(diff, "days").local().weekday();
|
6443
6447
|
};
|
6444
6448
|
var getUtcDayOfWeek = function getUtcDayOfWeek(localDateTime, dayOfWeek) {
|
6445
|
-
var currentDayOfWeek = _$
|
6449
|
+
var currentDayOfWeek = _$8.cloneDeep(localDateTime).local().weekday();
|
6446
6450
|
var diff = dayOfWeek - currentDayOfWeek;
|
6447
6451
|
if (diff < 0) diff += 7;
|
6448
6452
|
return localDateTime.add(diff, "days").utc().weekday();
|
@@ -6943,7 +6947,7 @@ var useList = function useList(fetchData, defaultQuery) {
|
|
6943
6947
|
var _paging$page, _paging$limit;
|
6944
6948
|
return (((_paging$page = paging.page) != null ? _paging$page : 0) - 1) * ((_paging$limit = paging.limit) != null ? _paging$limit : 0) + index + 1;
|
6945
6949
|
};
|
6946
|
-
var debounceSearch = _$
|
6950
|
+
var debounceSearch = _$8.debounce(function () {
|
6947
6951
|
var _textSearchRef$curren;
|
6948
6952
|
setFilter(_extends({}, filter, {
|
6949
6953
|
currentPage: 1,
|
@@ -12782,7 +12786,7 @@ var ClassForm = function ClassForm(_ref) {
|
|
12782
12786
|
};
|
12783
12787
|
var handleDeleteWeeklyDays = function handleDeleteWeeklyDays(currentValue) {
|
12784
12788
|
if (formikProp.values.courseWeeklyDays.length <= 1) return;
|
12785
|
-
var courseWeeklyDays = _$
|
12789
|
+
var courseWeeklyDays = _$8.cloneDeep(formikProp.values.courseWeeklyDays);
|
12786
12790
|
var newValues = courseWeeklyDays.filter(function (i) {
|
12787
12791
|
var _i$startTime, _currentValue$startTi, _i$endTime, _currentValue$endTime;
|
12788
12792
|
return i.dayOfWeek !== currentValue.dayOfWeek || ((_i$startTime = i.startTime) === null || _i$startTime === void 0 ? void 0 : _i$startTime.format("HH:mm:ss")) !== ((_currentValue$startTi = currentValue.startTime) === null || _currentValue$startTi === void 0 ? void 0 : _currentValue$startTi.format("HH:mm:ss")) || ((_i$endTime = i.endTime) === null || _i$endTime === void 0 ? void 0 : _i$endTime.format("HH:mm:ss")) !== ((_currentValue$endTime = currentValue.endTime) === null || _currentValue$endTime === void 0 ? void 0 : _currentValue$endTime.format("HH:mm:ss"));
|
@@ -12818,7 +12822,7 @@ var ClassForm = function ClassForm(_ref) {
|
|
12818
12822
|
var handleChangeWeeklyDayTime = function handleChangeWeeklyDayTime(key, newValue, currentValue) {
|
12819
12823
|
var _extends2;
|
12820
12824
|
var time = newValue === null || newValue === void 0 ? void 0 : newValue.local();
|
12821
|
-
var courseWeeklyDays = _$
|
12825
|
+
var courseWeeklyDays = _$8.cloneDeep(formikProp.values.courseWeeklyDays);
|
12822
12826
|
var currentIndex = courseWeeklyDays.findIndex(function (i) {
|
12823
12827
|
var _i$startTime2, _currentValue$startTi2, _i$endTime2, _currentValue$endTime2;
|
12824
12828
|
return i.dayOfWeek === currentValue.dayOfWeek && ((_i$startTime2 = i.startTime) === null || _i$startTime2 === void 0 ? void 0 : _i$startTime2.format("HH:mm:ss")) === ((_currentValue$startTi2 = currentValue.startTime) === null || _currentValue$startTi2 === void 0 ? void 0 : _currentValue$startTi2.format("HH:mm:ss")) && ((_i$endTime2 = i.endTime) === null || _i$endTime2 === void 0 ? void 0 : _i$endTime2.format("HH:mm:ss")) === ((_currentValue$endTime2 = currentValue.endTime) === null || _currentValue$endTime2 === void 0 ? void 0 : _currentValue$endTime2.format("HH:mm:ss"));
|
@@ -12853,11 +12857,11 @@ var ClassForm = function ClassForm(_ref) {
|
|
12853
12857
|
}, [JSON.stringify(data)]);
|
12854
12858
|
var minDate = useMemo(function () {
|
12855
12859
|
if (!formikProp.values.startDate) return undefined;
|
12856
|
-
return _$
|
12860
|
+
return _$8.cloneDeep(formikProp.values.startDate).add(1, "days");
|
12857
12861
|
}, [formikProp.values.startDate]);
|
12858
12862
|
var maxDate = useMemo(function () {
|
12859
12863
|
if (!formikProp.values.endDate) return undefined;
|
12860
|
-
return _$
|
12864
|
+
return _$8.cloneDeep(formikProp.values.endDate).add(1, "days");
|
12861
12865
|
}, [formikProp.values.endDate]);
|
12862
12866
|
var WeeklyDayErrors = formikProp.touched.courseWeeklyDays && formikProp.errors.courseWeeklyDays && React__default.createElement("div", {
|
12863
12867
|
className: "mt-1"
|
@@ -12874,7 +12878,7 @@ var ClassForm = function ClassForm(_ref) {
|
|
12874
12878
|
});
|
12875
12879
|
}, [JSON.stringify(formikProp.values.courseWeeklyDays)]);
|
12876
12880
|
var courseWeeklyDays = useMemo(function () {
|
12877
|
-
return _$
|
12881
|
+
return _$8.sortBy(formikProp.values.courseWeeklyDays, ["dayOfWeek"]);
|
12878
12882
|
}, [JSON.stringify(formikProp.values.courseWeeklyDays)]);
|
12879
12883
|
return React__default.createElement("div", {
|
12880
12884
|
className: "d-flex flex-column"
|
@@ -13025,7 +13029,7 @@ var ClassForm = function ClassForm(_ref) {
|
|
13025
13029
|
value: v.startTime,
|
13026
13030
|
format: "HH:mm",
|
13027
13031
|
open: open === index + "-startTime",
|
13028
|
-
maxTime: v.endTime ? _$
|
13032
|
+
maxTime: v.endTime ? _$8.cloneDeep(v.endTime).add(-1, "minutes") : undefined,
|
13029
13033
|
onAccept: function onAccept(newValue) {
|
13030
13034
|
return handleChangeWeeklyDayTime("startTime", newValue, v);
|
13031
13035
|
},
|
@@ -13055,7 +13059,7 @@ var ClassForm = function ClassForm(_ref) {
|
|
13055
13059
|
components: ["TimePicker"]
|
13056
13060
|
}, React__default.createElement(TimePicker, {
|
13057
13061
|
value: v.endTime,
|
13058
|
-
minTime: v.startTime ? (_$cloneDeep = _$
|
13062
|
+
minTime: v.startTime ? (_$cloneDeep = _$8.cloneDeep(v.startTime)) === null || _$cloneDeep === void 0 ? void 0 : _$cloneDeep.add(1, "minutes") : undefined,
|
13059
13063
|
format: "HH:mm",
|
13060
13064
|
open: open === index + "-endTime",
|
13061
13065
|
onAccept: function onAccept(newValue) {
|
@@ -13188,7 +13192,7 @@ var useStudentInfoDrawer = function useStudentInfoDrawer(props) {
|
|
13188
13192
|
return _extends({}, state, (_extends2 = {}, _extends2[newValue] = true, _extends2));
|
13189
13193
|
});
|
13190
13194
|
};
|
13191
|
-
var debounceChangeTab = _$
|
13195
|
+
var debounceChangeTab = _$8.debounce(handleChangeTab, 300);
|
13192
13196
|
useEffect(function () {
|
13193
13197
|
var getStudent = function getStudent() {
|
13194
13198
|
try {
|
@@ -14747,7 +14751,7 @@ var useNotes = function useNotes(setFilter, filter) {
|
|
14747
14751
|
var items = (data === null || data === void 0 ? void 0 : data.items) || [];
|
14748
14752
|
var newNotes = items;
|
14749
14753
|
if (filter !== null && filter !== void 0 && filter.currentPage && (filter === null || filter === void 0 ? void 0 : filter.currentPage) > 1) {
|
14750
|
-
newNotes = [].concat(_$
|
14754
|
+
newNotes = [].concat(_$8.uniqBy([].concat(notes, items), "id"));
|
14751
14755
|
}
|
14752
14756
|
setNotes(newNotes);
|
14753
14757
|
});
|
@@ -14770,7 +14774,7 @@ var useNotes = function useNotes(setFilter, filter) {
|
|
14770
14774
|
});
|
14771
14775
|
}, [filter === null || filter === void 0 ? void 0 : filter.currentPage, totalPages]);
|
14772
14776
|
var handleNoteAdded = function handleNoteAdded(note) {
|
14773
|
-
var newNotes = [].concat(_$
|
14777
|
+
var newNotes = [].concat(_$8.uniqBy([note].concat(notes), "id"));
|
14774
14778
|
setNotes(newNotes);
|
14775
14779
|
};
|
14776
14780
|
var handleNoteUpdated = function handleNoteUpdated(note) {
|
@@ -15155,7 +15159,7 @@ var useVirtualList = function useVirtualList(studentId, defaultFilter, getItemsA
|
|
15155
15159
|
var responseItems = (responseData === null || responseData === void 0 ? void 0 : responseData.items) || [];
|
15156
15160
|
var results = responseItems;
|
15157
15161
|
if (filter !== null && filter !== void 0 && filter.currentPage && filter.currentPage > 1) {
|
15158
|
-
results = [].concat(_$
|
15162
|
+
results = [].concat(_$8.uniqBy([].concat(items, responseItems), "id"));
|
15159
15163
|
}
|
15160
15164
|
setItems(results);
|
15161
15165
|
});
|
@@ -15178,7 +15182,7 @@ var useVirtualList = function useVirtualList(studentId, defaultFilter, getItemsA
|
|
15178
15182
|
});
|
15179
15183
|
}, [filter === null || filter === void 0 ? void 0 : filter.currentPage, totalPages]);
|
15180
15184
|
var handleItemAdded = function handleItemAdded(item) {
|
15181
|
-
var results = [].concat(_$
|
15185
|
+
var results = [].concat(_$8.uniqBy([item].concat(items), "id"));
|
15182
15186
|
setItems(results);
|
15183
15187
|
};
|
15184
15188
|
var handleItemUpdated = function handleItemUpdated(item) {
|
@@ -18507,6 +18511,7 @@ var TimeOrderChart = function TimeOrderChart(_ref) {
|
|
18507
18511
|
};
|
18508
18512
|
|
18509
18513
|
var TextbookAnswerItem = function TextbookAnswerItem(_ref) {
|
18514
|
+
var _data$selectedAnswers, _data$textualAnswers, _data$selectedAnswers2, _data$textualAnswers2, _data$selectedAnswers3, _data$textualAnswers3;
|
18510
18515
|
var data = _ref.data,
|
18511
18516
|
nextData = _ref.nextData,
|
18512
18517
|
isFirst = _ref.isFirst,
|
@@ -18560,11 +18565,11 @@ var TextbookAnswerItem = function TextbookAnswerItem(_ref) {
|
|
18560
18565
|
alignItems: "center",
|
18561
18566
|
gap: "4px"
|
18562
18567
|
}
|
18563
|
-
}, data.isCorrect && data.selectedAnswers !==
|
18568
|
+
}, data.isCorrect && (!!((_data$selectedAnswers = data.selectedAnswers) !== null && _data$selectedAnswers !== void 0 && _data$selectedAnswers.length) || !!((_data$textualAnswers = data.textualAnswers) !== null && _data$textualAnswers !== void 0 && _data$textualAnswers.length)) && React__default.createElement(Fragment$1, null, React__default.createElement(iconCorrectAnswer, null), React__default.createElement("span", {
|
18564
18569
|
className: styles$4["answerCorrect"]
|
18565
|
-
}, t("correct"))), !data.isCorrect && data.selectedAnswers !==
|
18570
|
+
}, t("correct"))), !data.isCorrect && (!!((_data$selectedAnswers2 = data.selectedAnswers) !== null && _data$selectedAnswers2 !== void 0 && _data$selectedAnswers2.length) || !!((_data$textualAnswers2 = data.textualAnswers) !== null && _data$textualAnswers2 !== void 0 && _data$textualAnswers2.length)) && React__default.createElement(Fragment$1, null, React__default.createElement(iconCorrectAnswer$1, null), React__default.createElement("span", {
|
18566
18571
|
className: styles$4["answerIncorrect"]
|
18567
|
-
}, t("incorrect"))), data.selectedAnswers
|
18572
|
+
}, t("incorrect"))), !((_data$selectedAnswers3 = data.selectedAnswers) !== null && _data$selectedAnswers3 !== void 0 && _data$selectedAnswers3.length) && !((_data$textualAnswers3 = data.textualAnswers) !== null && _data$textualAnswers3 !== void 0 && _data$textualAnswers3.length) && React__default.createElement(Fragment$1, null, React__default.createElement(iconNoGrass, null), React__default.createElement("span", {
|
18568
18573
|
className: styles$4["answerNograss"]
|
18569
18574
|
}, t("no_solution")))), React__default.createElement("div", {
|
18570
18575
|
className: styles["custom-col-2"],
|
@@ -18948,11 +18953,30 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
|
|
18948
18953
|
var isOpen = openProblem === keyOpen;
|
18949
18954
|
var incorrectQuestions = useMemo(function () {
|
18950
18955
|
return data === null || data === void 0 ? void 0 : data.studentQuestionResults.filter(function (i) {
|
18951
|
-
|
18956
|
+
var _i$selectedAnswers, _i$textualAnswers;
|
18957
|
+
return (((_i$selectedAnswers = i.selectedAnswers) === null || _i$selectedAnswers === void 0 ? void 0 : _i$selectedAnswers.length) || ((_i$textualAnswers = i.textualAnswers) === null || _i$textualAnswers === void 0 ? void 0 : _i$textualAnswers.length)) && i.isCorrect === false && i.isStar === false && i.overallCorrectRate >= correctRateThreshHold$1;
|
18952
18958
|
}).sort(function (q1, q2) {
|
18953
18959
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
18954
18960
|
}).slice(0, limitQuestions$1);
|
18955
18961
|
}, [JSON.stringify(data === null || data === void 0 ? void 0 : data.studentQuestionResults)]);
|
18962
|
+
var renderTextbookAnswer = function renderTextbookAnswer(type, answers, textualAnswers, isCorrect) {
|
18963
|
+
var _textualAnswers$;
|
18964
|
+
switch (type) {
|
18965
|
+
case QuestionAnswerType.ShortAnswer:
|
18966
|
+
case QuestionAnswerType.SynonymProcessing:
|
18967
|
+
return isCorrect ? textualAnswers === null || textualAnswers === void 0 ? void 0 : textualAnswers.join(" | ") : (_textualAnswers$ = textualAnswers === null || textualAnswers === void 0 ? void 0 : textualAnswers[0]) != null ? _textualAnswers$ : "";
|
18968
|
+
case QuestionAnswerType.SingleChoice:
|
18969
|
+
case QuestionAnswerType.MultipleChoice:
|
18970
|
+
if (!(answers !== null && answers !== void 0 && answers.length)) return "";
|
18971
|
+
return answers.map(function (i) {
|
18972
|
+
return t("number_question", {
|
18973
|
+
number: i
|
18974
|
+
});
|
18975
|
+
}).join(",");
|
18976
|
+
default:
|
18977
|
+
return textualAnswers === null || textualAnswers === void 0 ? void 0 : textualAnswers.join(", ");
|
18978
|
+
}
|
18979
|
+
};
|
18956
18980
|
var renderAnswer = function renderAnswer(type, content) {
|
18957
18981
|
var _content$split, _content$split$map;
|
18958
18982
|
if (!content) return "";
|
@@ -19009,12 +19033,12 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
|
|
19009
19033
|
fontSize: "13px",
|
19010
19034
|
fontWeight: 500
|
19011
19035
|
}
|
19012
|
-
},
|
19036
|
+
}, typeof item.selectedAnswers === "string" ? renderAnswer(item.questionAnswerType, item.selectedAnswers) : renderTextbookAnswer(item.questionAnswerType, item.selectedAnswers, item.textualAnswers)), React__default.createElement("td", {
|
19013
19037
|
style: {
|
19014
19038
|
textAlign: "center",
|
19015
19039
|
color: styles$4.gray_700
|
19016
19040
|
}
|
19017
|
-
},
|
19041
|
+
}, typeof item.correctAnswers === "string" ? renderAnswer(item.questionAnswerType, item.correctAnswers) : renderTextbookAnswer(item.questionAnswerType, item.correctAnswers, item.correctTextualAnswers, true)), React__default.createElement("td", {
|
19018
19042
|
style: {
|
19019
19043
|
textAlign: "center",
|
19020
19044
|
color: styles$4.gray_700
|
@@ -19026,7 +19050,6 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
|
|
19026
19050
|
};
|
19027
19051
|
var renderQuestions = function renderQuestions(questions) {
|
19028
19052
|
return questions.map(function (question) {
|
19029
|
-
var _question$selectedAns, _question$selectedAns2, _question$selectedAns3, _question$correctAnsw, _question$correctAnsw2, _question$correctAnsw3;
|
19030
19053
|
return React__default.createElement(Grid, {
|
19031
19054
|
container: true,
|
19032
19055
|
flexWrap: "nowrap",
|
@@ -19053,29 +19076,9 @@ var TextbookVulnerable = function TextbookVulnerable(_ref) {
|
|
19053
19076
|
className: styles$4["span2"]
|
19054
19077
|
}, t("my_wrong_answer"))), React__default.createElement("div", null, React__default.createElement("span", {
|
19055
19078
|
className: styles$4["overallCorrectRate"]
|
19056
|
-
}, question.overallCorrectRate.toFixed(2), "%"),
|
19057
|
-
className: styles$4["answer"]
|
19058
|
-
}, React__default.createElement(MathJaxContainer, {
|
19059
|
-
content: question === null || question === void 0 ? void 0 : question.selectedAnswers
|
19060
|
-
}), " ", React__default.createElement(MathJaxContainer, {
|
19061
|
-
content: question === null || question === void 0 ? void 0 : question.correctAnswers
|
19062
|
-
})) : QuestionAnswerType.MultipleChoice ? React__default.createElement("span", {
|
19063
|
-
className: styles$4["answer"]
|
19064
|
-
}, (_question$selectedAns = question.selectedAnswers) === null || _question$selectedAns === void 0 ? void 0 : (_question$selectedAns2 = _question$selectedAns.split("|")) === null || _question$selectedAns2 === void 0 ? void 0 : (_question$selectedAns3 = _question$selectedAns2.map(function (i) {
|
19065
|
-
return t("number_question", {
|
19066
|
-
number: i
|
19067
|
-
});
|
19068
|
-
})) === null || _question$selectedAns3 === void 0 ? void 0 : _question$selectedAns3.join(","), " ", "(", t("answer"), " ", (_question$correctAnsw = question.correctAnswers) === null || _question$correctAnsw === void 0 ? void 0 : (_question$correctAnsw2 = _question$correctAnsw.split("|")) === null || _question$correctAnsw2 === void 0 ? void 0 : (_question$correctAnsw3 = _question$correctAnsw2.map(function (i) {
|
19069
|
-
return t("number_question", {
|
19070
|
-
number: i
|
19071
|
-
});
|
19072
|
-
})) === null || _question$correctAnsw3 === void 0 ? void 0 : _question$correctAnsw3.join(","), ")", " ") : React__default.createElement("span", {
|
19079
|
+
}, question.overallCorrectRate.toFixed(2), "%"), React__default.createElement("span", {
|
19073
19080
|
className: styles$4["answer"]
|
19074
|
-
}, t("
|
19075
|
-
number: question.selectedAnswers
|
19076
|
-
}), " ", "(", t("answer"), " ", t("number_question", {
|
19077
|
-
number: question.correctAnswers
|
19078
|
-
}), ")"))));
|
19081
|
+
}, typeof question.selectedAnswers === "string" ? renderAnswer(question.questionAnswerType, question.selectedAnswers) : renderTextbookAnswer(question.questionAnswerType, question.selectedAnswers, question.textualAnswers), " ", t("answer"), " ", typeof question.correctAnswers === "string" ? renderAnswer(question.questionAnswerType, question.correctAnswers) : renderTextbookAnswer(question.questionAnswerType, question.correctAnswers, question.correctTextualAnswers, true)))));
|
19079
19082
|
});
|
19080
19083
|
};
|
19081
19084
|
var handleToggle = function handleToggle() {
|
@@ -19877,7 +19880,7 @@ var useExamResultData = function useExamResultData(props) {
|
|
19877
19880
|
topAnswerOrder: i.topAnswerOrder == null ? 0 : i.topAnswerOrder
|
19878
19881
|
});
|
19879
19882
|
});
|
19880
|
-
var sortedMySeriesQuestionData = _$
|
19883
|
+
var sortedMySeriesQuestionData = _$8.sortBy(questionsData.filter(function (i) {
|
19881
19884
|
return i.answerOrder !== 0;
|
19882
19885
|
}), ["answerOrder", "questionOrder"]);
|
19883
19886
|
var mySeriesData = [null].concat(sortedMySeriesQuestionData.map(function (item) {
|
@@ -19887,7 +19890,7 @@ var useExamResultData = function useExamResultData(props) {
|
|
19887
19890
|
}).map(function () {
|
19888
19891
|
return null;
|
19889
19892
|
}), [null]);
|
19890
|
-
var sortedTopSeriesQuestionData = _$
|
19893
|
+
var sortedTopSeriesQuestionData = _$8.sortBy(questionsData.filter(function (i) {
|
19891
19894
|
return i.topAnswerOrder !== 0;
|
19892
19895
|
}), ["topAnswerOrder", "questionOrder"]);
|
19893
19896
|
var topSeriesData = [null].concat(sortedTopSeriesQuestionData.map(function (item) {
|
@@ -21856,7 +21859,7 @@ var usePreparedExam = function usePreparedExam(_ref) {
|
|
21856
21859
|
return Promise.reject(e);
|
21857
21860
|
}
|
21858
21861
|
};
|
21859
|
-
var debounceSearch = _$
|
21862
|
+
var debounceSearch = _$8.debounce(function () {
|
21860
21863
|
setTextbookFilter(_extends({}, textbookFilter, {
|
21861
21864
|
currentPage: 1
|
21862
21865
|
}));
|
@@ -23613,7 +23616,7 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
23613
23616
|
});
|
23614
23617
|
return React__default.createElement(Form, {
|
23615
23618
|
style: {
|
23616
|
-
height: !_$
|
23619
|
+
height: !_$8.isEmpty(values) && !textbookList.length ? "100%" : "unset"
|
23617
23620
|
}
|
23618
23621
|
}, React__default.createElement(Stack, null, React__default.createElement(Accordion, {
|
23619
23622
|
sx: {
|
@@ -24019,7 +24022,7 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24019
24022
|
open: openConfirmDialog,
|
24020
24023
|
onClose: handleCloseConfirmDialog,
|
24021
24024
|
onSubmit: handleResetFilter
|
24022
|
-
}), !_$
|
24025
|
+
}), !_$8.isEmpty(values) && !textbookList.length && React__default.createElement(Stack, {
|
24023
24026
|
height: 1,
|
24024
24027
|
justifyContent: "center",
|
24025
24028
|
alignItems: "center"
|
@@ -25389,7 +25392,7 @@ var useStudentClassList = function useStudentClassList(courseId) {
|
|
25389
25392
|
currentPage: 1
|
25390
25393
|
}));
|
25391
25394
|
};
|
25392
|
-
var debounceSearch = _$
|
25395
|
+
var debounceSearch = _$8.debounce(function () {
|
25393
25396
|
setFilter(_extends({}, filter, {
|
25394
25397
|
currentPage: 1
|
25395
25398
|
}));
|
@@ -25525,7 +25528,7 @@ var useTeacherClassList = function useTeacherClassList(courseId) {
|
|
25525
25528
|
currentPage: 1
|
25526
25529
|
}));
|
25527
25530
|
};
|
25528
|
-
var debounceSearch = _$
|
25531
|
+
var debounceSearch = _$8.debounce(function () {
|
25529
25532
|
setFilter(_extends({}, filter, {
|
25530
25533
|
currentPage: 1
|
25531
25534
|
}));
|
@@ -25838,7 +25841,7 @@ var useClassDetail = function useClassDetail(_ref) {
|
|
25838
25841
|
});
|
25839
25842
|
}, [JSON.stringify(course)]);
|
25840
25843
|
var convertToRequestBody = function convertToRequestBody(request) {
|
25841
|
-
var localStartDate = _$
|
25844
|
+
var localStartDate = _$8.cloneDeep(request.startDate);
|
25842
25845
|
return _extends({}, request, {
|
25843
25846
|
startDate: request.startDate.utc().format(DATE_TIME_FORMAT),
|
25844
25847
|
endDate: request.endDate.utc().format(DATE_TIME_FORMAT),
|
@@ -26087,13 +26090,13 @@ var useClassDetail = function useClassDetail(_ref) {
|
|
26087
26090
|
});
|
26088
26091
|
if (event.target.checked) {
|
26089
26092
|
setSelected(function (prev) {
|
26090
|
-
return _$
|
26093
|
+
return _$8.uniq([].concat(prev, newSelected));
|
26091
26094
|
});
|
26092
26095
|
return;
|
26093
26096
|
}
|
26094
|
-
setSelected(_$
|
26097
|
+
setSelected(_$8.difference(selected, newSelected));
|
26095
26098
|
};
|
26096
|
-
var debounceSearch = _$
|
26099
|
+
var debounceSearch = _$8.debounce(function () {
|
26097
26100
|
setFilter(_extends({}, filter, {
|
26098
26101
|
currentPage: 1
|
26099
26102
|
}));
|
@@ -26111,7 +26114,7 @@ var useClassDetail = function useClassDetail(_ref) {
|
|
26111
26114
|
}) : userList.map(function (n) {
|
26112
26115
|
return n.teacherId;
|
26113
26116
|
});
|
26114
|
-
var checkLength = _$
|
26117
|
+
var checkLength = _$8.intersection(selected, newSelected).length;
|
26115
26118
|
return checkLength === userLength;
|
26116
26119
|
};
|
26117
26120
|
var handleClear = function handleClear() {
|
@@ -26146,7 +26149,7 @@ var useClassDetail = function useClassDetail(_ref) {
|
|
26146
26149
|
}));
|
26147
26150
|
setSelected([]);
|
26148
26151
|
};
|
26149
|
-
var debounceSort = _$
|
26152
|
+
var debounceSort = _$8.debounce(handleSort, 300);
|
26150
26153
|
var handleChangePage = function handleChangePage(_, page) {
|
26151
26154
|
setFilter(_extends({}, filter, {
|
26152
26155
|
currentPage: page
|
@@ -26230,8 +26233,8 @@ var LessonFormBody = function LessonFormBody(_ref) {
|
|
26230
26233
|
useEffect(function () {
|
26231
26234
|
if (open && data) formikProp.setValues(data);else formikProp.setValues(DEFAULT_LESSON_REQUEST);
|
26232
26235
|
}, [open, JSON.stringify(data)]);
|
26233
|
-
var maxTime = formikProp.values.endTime ? _$
|
26234
|
-
var minTime = formikProp.values.startTime ? _$
|
26236
|
+
var maxTime = formikProp.values.endTime ? _$8.cloneDeep(formikProp.values.endTime).add(-1, "minutes") : undefined;
|
26237
|
+
var minTime = formikProp.values.startTime ? _$8.cloneDeep(formikProp.values.startTime).add(1, "minutes") : undefined;
|
26235
26238
|
return React__default.createElement(Fragment$1, null, React__default.createElement(DialogContent, {
|
26236
26239
|
sx: {
|
26237
26240
|
overflowY: "unset"
|
@@ -26798,7 +26801,7 @@ var useClassList = function useClassList(history, classCreateUrl, classUpdateUrl
|
|
26798
26801
|
currentPage: 1
|
26799
26802
|
}));
|
26800
26803
|
};
|
26801
|
-
var debounceSearch = _$
|
26804
|
+
var debounceSearch = _$8.debounce(function () {
|
26802
26805
|
setClassFilter(_extends({}, classFilter, {
|
26803
26806
|
currentPage: 1
|
26804
26807
|
}));
|
@@ -27922,7 +27925,7 @@ var useUserList = function useUserList(role) {
|
|
27922
27925
|
currentPage: 1
|
27923
27926
|
}));
|
27924
27927
|
};
|
27925
|
-
var debounceSort = _$
|
27928
|
+
var debounceSort = _$8.debounce(handleSort, 300);
|
27926
27929
|
var getUserById = function getUserById(id) {
|
27927
27930
|
try {
|
27928
27931
|
var _temp8 = function _temp8() {
|
@@ -28080,7 +28083,7 @@ var useUserList = function useUserList(role) {
|
|
28080
28083
|
return Promise.reject(e);
|
28081
28084
|
}
|
28082
28085
|
};
|
28083
|
-
var debounceSearch = _$
|
28086
|
+
var debounceSearch = _$8.debounce(function () {
|
28084
28087
|
setFilter(_extends({}, filter, {
|
28085
28088
|
currentPage: 1
|
28086
28089
|
}));
|
@@ -29393,8 +29396,8 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
29393
29396
|
var handleAddArticle = function handleAddArticle() {
|
29394
29397
|
var _$maxBy, _$maxBy2;
|
29395
29398
|
if (!exam) return;
|
29396
|
-
var maxArticle = ((_$maxBy = _$
|
29397
|
-
var maxOrder = ((_$maxBy2 = _$
|
29399
|
+
var maxArticle = ((_$maxBy = _$8.maxBy(exam.questions, "article")) === null || _$maxBy === void 0 ? void 0 : _$maxBy.article) || 0;
|
29400
|
+
var maxOrder = ((_$maxBy2 = _$8.maxBy(exam.questions, "questionOrder")) === null || _$maxBy2 === void 0 ? void 0 : _$maxBy2.questionOrder) || 0;
|
29398
29401
|
onChangeExam(_extends({}, exam, {
|
29399
29402
|
questions: [].concat(exam.questions, [{
|
29400
29403
|
questionAnswerType: QuestionAnswerType.SingleChoice,
|
@@ -29442,7 +29445,7 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
29442
29445
|
var examGroupByArticle = useMemo(function () {
|
29443
29446
|
if (!exam) return [];
|
29444
29447
|
var articles = [];
|
29445
|
-
var groupedArticle = _$
|
29448
|
+
var groupedArticle = _$8.groupBy(exam.questions, "article");
|
29446
29449
|
for (var key in groupedArticle) {
|
29447
29450
|
if (Object.prototype.hasOwnProperty.call(groupedArticle, key)) {
|
29448
29451
|
var _questions$find, _$maxBy3;
|
@@ -29452,13 +29455,13 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
29452
29455
|
categoryId: (_questions$find = questions.find(function (i) {
|
29453
29456
|
return !!i.categoryId;
|
29454
29457
|
})) === null || _questions$find === void 0 ? void 0 : _questions$find.categoryId,
|
29455
|
-
answerCount: ((_$maxBy3 = _$
|
29458
|
+
answerCount: ((_$maxBy3 = _$8.maxBy(questions, "numberOfAnswers")) === null || _$maxBy3 === void 0 ? void 0 : _$maxBy3.numberOfAnswers) || DEFAULT_ANSWER_COUNT,
|
29456
29459
|
questionCount: questions.length,
|
29457
29460
|
questions: questions
|
29458
29461
|
});
|
29459
29462
|
}
|
29460
29463
|
}
|
29461
|
-
return _$
|
29464
|
+
return _$8.sortBy(articles, "article");
|
29462
29465
|
}, [JSON.stringify(exam)]);
|
29463
29466
|
var durationOptions = useMemo(function () {
|
29464
29467
|
var options = DURATION_OPTIONS.map(function (i) {
|
@@ -31879,11 +31882,11 @@ var useTextbookShare = function useTextbookShare(props) {
|
|
31879
31882
|
});
|
31880
31883
|
if (event.target.checked) {
|
31881
31884
|
setSelectedShare(function (prev) {
|
31882
|
-
return _$
|
31885
|
+
return _$8.uniq([].concat(prev, newSelected));
|
31883
31886
|
});
|
31884
31887
|
return;
|
31885
31888
|
}
|
31886
|
-
setSelectedShare(_$
|
31889
|
+
setSelectedShare(_$8.difference(selectedShare, newSelected));
|
31887
31890
|
};
|
31888
31891
|
var isCheckAllShare = function isCheckAllShare(userLength) {
|
31889
31892
|
var newSelected = isUpdate ? shared.map(function (n) {
|
@@ -31891,7 +31894,7 @@ var useTextbookShare = function useTextbookShare(props) {
|
|
31891
31894
|
}) : notShared.map(function (n) {
|
31892
31895
|
return n.id;
|
31893
31896
|
});
|
31894
|
-
var checkLength = _$
|
31897
|
+
var checkLength = _$8.intersection(selectedShare, newSelected).length;
|
31895
31898
|
return checkLength === userLength;
|
31896
31899
|
};
|
31897
31900
|
var handleClickCheckboxShare = function handleClickCheckboxShare(id) {
|
@@ -32150,7 +32153,7 @@ var TextbookList = function TextbookList(props) {
|
|
32150
32153
|
handleUpdateSharedTextbook = _useTextbookShare.handleUpdateSharedTextbook,
|
32151
32154
|
currentModel = _useTextbookShare.currentModel;
|
32152
32155
|
var textbookHeaders = useMemo(function () {
|
32153
|
-
var headers = _$
|
32156
|
+
var headers = _$8.clone(TEXTBOOK_HEADERS);
|
32154
32157
|
if (isTeacher && isTeacherSite) headers.splice(5, 0, {
|
32155
32158
|
title: "teacher_personal_textbook"
|
32156
32159
|
});
|
@@ -32745,7 +32748,7 @@ var useNotificationList = function useNotificationList(_ref) {
|
|
32745
32748
|
currentPage: 1
|
32746
32749
|
}));
|
32747
32750
|
};
|
32748
|
-
var debounceSearch = _$
|
32751
|
+
var debounceSearch = _$8.debounce(function () {
|
32749
32752
|
setNotificationFilter(_extends({}, notificationFilter, {
|
32750
32753
|
currentPage: 1
|
32751
32754
|
}));
|
@@ -33308,7 +33311,7 @@ var preparedTextbookSchema = function preparedTextbookSchema(t) {
|
|
33308
33311
|
return !isTextType(answerType);
|
33309
33312
|
},
|
33310
33313
|
then: function then(schema) {
|
33311
|
-
return schema.min(
|
33314
|
+
return schema.min(1, t("answer_cannot_be_empty"));
|
33312
33315
|
},
|
33313
33316
|
otherwise: function otherwise(schema) {
|
33314
33317
|
return schema.notRequired();
|
@@ -33317,12 +33320,12 @@ var preparedTextbookSchema = function preparedTextbookSchema(t) {
|
|
33317
33320
|
score: number().required(),
|
33318
33321
|
questionOrder: number().required(),
|
33319
33322
|
questionTypeId: number().notRequired(),
|
33320
|
-
correctTextualAnswers: array().
|
33323
|
+
correctTextualAnswers: array().when("questionAnswerType", {
|
33321
33324
|
is: function is(answerType) {
|
33322
33325
|
return isTextType(answerType);
|
33323
33326
|
},
|
33324
33327
|
then: function then(schema) {
|
33325
|
-
return schema.min(1, t("
|
33328
|
+
return schema.of(string().trim().required(t("answer_cannot_be_empty"))).min(1, t("answer_cannot_be_empty"));
|
33326
33329
|
},
|
33327
33330
|
otherwise: function otherwise(schema) {
|
33328
33331
|
return schema.notRequired();
|
@@ -33332,7 +33335,7 @@ var preparedTextbookSchema = function preparedTextbookSchema(t) {
|
|
33332
33335
|
return isTextType(answerType) && answerType !== QuestionAnswerType.ShortAnswer;
|
33333
33336
|
},
|
33334
33337
|
then: function then(schema) {
|
33335
|
-
return schema.min(2, t("
|
33338
|
+
return schema.of(string().trim().required(t("answer_cannot_be_empty"))).min(2, t("answer_cannot_be_empty"));
|
33336
33339
|
}
|
33337
33340
|
})
|
33338
33341
|
});
|
@@ -33472,7 +33475,7 @@ var CustomTextbookTab = function CustomTextbookTab(props) {
|
|
33472
33475
|
};
|
33473
33476
|
|
33474
33477
|
var _reduceToMathArticles = function reduceToMathArticles(textbook, isMath) {
|
33475
|
-
var values = isMath !== undefined ? _$
|
33478
|
+
var values = isMath !== undefined ? _$8.cloneDeep(textbook) : textbook;
|
33476
33479
|
if (isMath !== undefined) values.type = isMath;
|
33477
33480
|
for (var key in values) {
|
33478
33481
|
if (values.hasOwnProperty(key)) {
|
@@ -33487,7 +33490,7 @@ var _reduceToMathArticles = function reduceToMathArticles(textbook, isMath) {
|
|
33487
33490
|
return values;
|
33488
33491
|
};
|
33489
33492
|
var _resetAllCategoriesAndQuestionTypesBySubject = function resetAllCategoriesAndQuestionTypesBySubject(textbook, subject) {
|
33490
|
-
var values = subject ? _$
|
33493
|
+
var values = subject ? _$8.cloneDeep(textbook) : textbook;
|
33491
33494
|
if (subject) {
|
33492
33495
|
values.subjectId = subject === null || subject === void 0 ? void 0 : subject.value;
|
33493
33496
|
values.subject = subject;
|
@@ -33650,7 +33653,7 @@ var isSequentialQuestionGroups = function isSequentialQuestionGroups(questionGro
|
|
33650
33653
|
return true;
|
33651
33654
|
};
|
33652
33655
|
|
33653
|
-
var _ = _$
|
33656
|
+
var _ = _$8;
|
33654
33657
|
var ArticleBlock = function ArticleBlock(_ref) {
|
33655
33658
|
var errors = _ref.errors,
|
33656
33659
|
expandedIndex = _ref.expandedIndex,
|
@@ -33995,13 +33998,18 @@ var QuestionOrderName = function QuestionOrderName(_ref) {
|
|
33995
33998
|
}));
|
33996
33999
|
};
|
33997
34000
|
|
34001
|
+
var _$1 = _$8;
|
33998
34002
|
var QuestionShortInput = function QuestionShortInput(_ref) {
|
33999
34003
|
var name = _ref.name,
|
34000
34004
|
deletable = _ref.deletable,
|
34005
|
+
errors = _ref.errors,
|
34001
34006
|
onDelete = _ref.onDelete;
|
34002
34007
|
var _useTranslation = useTranslation(),
|
34003
34008
|
t = _useTranslation.t;
|
34004
|
-
|
34009
|
+
var error = _$1.get(errors, name);
|
34010
|
+
return React__default.createElement(Stack, {
|
34011
|
+
direction: "column"
|
34012
|
+
}, React__default.createElement(Field, {
|
34005
34013
|
name: name,
|
34006
34014
|
render: function render(_ref2) {
|
34007
34015
|
var field = _ref2.field;
|
@@ -34018,7 +34026,8 @@ var QuestionShortInput = function QuestionShortInput(_ref) {
|
|
34018
34026
|
"& input": {
|
34019
34027
|
paddingRight: deletable ? "40px" : undefined
|
34020
34028
|
}
|
34021
|
-
}
|
34029
|
+
},
|
34030
|
+
error: !!error
|
34022
34031
|
})), deletable && React__default.createElement(Stack, {
|
34023
34032
|
justifyContent: "center",
|
34024
34033
|
alignItems: "center",
|
@@ -34040,14 +34049,23 @@ var QuestionShortInput = function QuestionShortInput(_ref) {
|
|
34040
34049
|
size: 12
|
34041
34050
|
})))));
|
34042
34051
|
}
|
34043
|
-
})
|
34052
|
+
}), !!error && React__default.createElement(Typography, {
|
34053
|
+
fontWeight: 500,
|
34054
|
+
fontSize: "10px",
|
34055
|
+
lineHeight: "11.93px",
|
34056
|
+
mt: 1,
|
34057
|
+
color: !error ? "#97A1AF" : "#F34B4B"
|
34058
|
+
}, error));
|
34044
34059
|
};
|
34045
34060
|
var isEqual$1 = function isEqual(prev, next) {
|
34046
|
-
|
34061
|
+
var prevError = _$1.get(prev.errors, prev.name);
|
34062
|
+
var nextError = _$1.get(next.errors, next.name);
|
34063
|
+
return JSON.stringify(prevError) === JSON.stringify(nextError) && prev.value === next.value && prev.name == next.name && prev.deletable == next.deletable;
|
34047
34064
|
};
|
34048
34065
|
var QuestionShortInput$1 = memo(QuestionShortInput, isEqual$1);
|
34049
34066
|
|
34050
34067
|
var _excluded$h = ["onChange"];
|
34068
|
+
var _$2 = _$8;
|
34051
34069
|
var BpIcon$1 = styled("span")(function (_ref) {
|
34052
34070
|
var theme = _ref.theme;
|
34053
34071
|
return {
|
@@ -34078,6 +34096,7 @@ var BpCheckedIcon$1 = styled(BpIcon$1)({
|
|
34078
34096
|
}
|
34079
34097
|
});
|
34080
34098
|
var QuestionBlock = function QuestionBlock(_ref2) {
|
34099
|
+
var _data$correctTextualA4;
|
34081
34100
|
var answerCount = _ref2.answerCount,
|
34082
34101
|
isMath = _ref2.isMath,
|
34083
34102
|
disabled = _ref2.disabled,
|
@@ -34087,6 +34106,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34087
34106
|
isLoadingQuestionTypes = _ref2.isLoadingQuestionTypes,
|
34088
34107
|
optionKey = _ref2.optionKey,
|
34089
34108
|
questionTypes = _ref2.questionTypes,
|
34109
|
+
errors = _ref2.errors,
|
34090
34110
|
setFieldValue = _ref2.setFieldValue,
|
34091
34111
|
onCloseQuestionTypeMenu = _ref2.onCloseQuestionTypeMenu,
|
34092
34112
|
onOpenQuestionTypeMenu = _ref2.onOpenQuestionTypeMenu;
|
@@ -34095,7 +34115,8 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34095
34115
|
var theme = useTheme();
|
34096
34116
|
var isTabletUp = useMediaQuery(theme.breakpoints.up("lg"));
|
34097
34117
|
var handleCheckMultiChoice = function handleCheckMultiChoice(choice) {
|
34098
|
-
var
|
34118
|
+
var _data$correctAnswers;
|
34119
|
+
var updatedAnswers = (_data$correctAnswers = data.correctAnswers) != null ? _data$correctAnswers : [];
|
34099
34120
|
if (updatedAnswers.includes(choice)) {
|
34100
34121
|
updatedAnswers = updatedAnswers.filter(function (item) {
|
34101
34122
|
return item !== choice;
|
@@ -34106,36 +34127,41 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34106
34127
|
setFieldValue(path + ".correctAnswers", updatedAnswers);
|
34107
34128
|
};
|
34108
34129
|
var handleAddTextualAnswer = function handleAddTextualAnswer() {
|
34109
|
-
|
34110
|
-
setFieldValue(path + ".
|
34130
|
+
var _data$correctTextualA, _data$correctTextualA2;
|
34131
|
+
((_data$correctTextualA = data.correctTextualAnswers) === null || _data$correctTextualA === void 0 ? void 0 : _data$correctTextualA.length) === 1 && setFieldValue(path + ".questionAnswerType", QuestionAnswerType.OrderMatters);
|
34132
|
+
setFieldValue(path + ".correctTextualAnswers", [].concat((_data$correctTextualA2 = data.correctTextualAnswers) != null ? _data$correctTextualA2 : [], [""]));
|
34111
34133
|
};
|
34112
34134
|
var handleRemoveTextualAnswer = function handleRemoveTextualAnswer(remove, index) {
|
34113
|
-
|
34135
|
+
var _data$correctTextualA3;
|
34136
|
+
((_data$correctTextualA3 = data.correctTextualAnswers) === null || _data$correctTextualA3 === void 0 ? void 0 : _data$correctTextualA3.length) === 2 && setFieldValue(path + ".questionAnswerType", QuestionAnswerType.ShortAnswer);
|
34114
34137
|
remove(index);
|
34115
34138
|
};
|
34116
34139
|
var handleChangeQuestionAnswerType = function handleChangeQuestionAnswerType(value) {
|
34117
34140
|
switch (value === null || value === void 0 ? void 0 : value.value) {
|
34118
34141
|
case QuestionAnswerType.SingleChoice:
|
34119
34142
|
case QuestionAnswerType.MultipleChoice:
|
34120
|
-
setFieldValue(path + ".correctTextualAnswers",
|
34143
|
+
setFieldValue(path + ".correctTextualAnswers", null);
|
34144
|
+
if (!data.correctAnswers || data.correctAnswers.length === 0) setFieldValue(path + ".correctAnswers", [1]);
|
34121
34145
|
break;
|
34122
34146
|
default:
|
34123
|
-
if (data.correctTextualAnswers.length === 0) setFieldValue(path + ".correctTextualAnswers", [""]);
|
34147
|
+
if (!data.correctTextualAnswers || data.correctTextualAnswers.length === 0) setFieldValue(path + ".correctTextualAnswers", [""]);
|
34148
|
+
setFieldValue(path + ".correctAnswers", null);
|
34124
34149
|
break;
|
34125
34150
|
}
|
34126
|
-
setFieldValue(path + ".questionAnswerType", (value === null || value === void 0 ? void 0 : value.value) ||
|
34151
|
+
setFieldValue(path + ".questionAnswerType", (value === null || value === void 0 ? void 0 : value.value) || QuestionAnswerType.SingleChoice);
|
34127
34152
|
};
|
34128
34153
|
var handleChangeCompareType = function handleChangeCompareType(_, value) {
|
34129
|
-
setFieldValue(path + ".questionAnswerType", Number(value) ||
|
34154
|
+
setFieldValue(path + ".questionAnswerType", Number(value) || QuestionAnswerType.OrderMatters);
|
34130
34155
|
};
|
34131
34156
|
var handleOpenQuestionTypeMenu = function handleOpenQuestionTypeMenu() {
|
34132
34157
|
onOpenQuestionTypeMenu(path + ".questionTypeId");
|
34133
34158
|
};
|
34134
|
-
var isIncomplatedTextualAnswers = data.correctTextualAnswers.some(function (i) {
|
34135
|
-
return !i.trim();
|
34136
|
-
});
|
34137
34159
|
var isTextAnswerType = isTextType(data.questionAnswerType);
|
34160
|
+
var isIncomplatedTextualAnswers = isTextAnswerType && ((_data$correctTextualA4 = data.correctTextualAnswers) === null || _data$correctTextualA4 === void 0 ? void 0 : _data$correctTextualA4.some(function (i) {
|
34161
|
+
return !i.trim();
|
34162
|
+
}));
|
34138
34163
|
var renderAnswer = function renderAnswer() {
|
34164
|
+
var _data$correctAnswers3;
|
34139
34165
|
switch (data.questionAnswerType) {
|
34140
34166
|
case QuestionAnswerType.ShortAnswer:
|
34141
34167
|
case QuestionAnswerType.SynonymProcessing:
|
@@ -34144,6 +34170,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34144
34170
|
return React__default.createElement(FieldArray, {
|
34145
34171
|
name: path + ".correctTextualAnswers"
|
34146
34172
|
}, function (_ref3) {
|
34173
|
+
var _data$correctTextualA5;
|
34147
34174
|
var remove = _ref3.remove;
|
34148
34175
|
return React__default.createElement(Stack, {
|
34149
34176
|
sx: {
|
@@ -34157,18 +34184,19 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34157
34184
|
gap: "12px",
|
34158
34185
|
flexWrap: "wrap"
|
34159
34186
|
}, React__default.createElement(ListView, {
|
34160
|
-
data: data.correctTextualAnswers,
|
34187
|
+
data: (_data$correctTextualA5 = data.correctTextualAnswers) != null ? _data$correctTextualA5 : [],
|
34161
34188
|
render: function render(_, index) {
|
34162
34189
|
return React__default.createElement(Box, {
|
34163
34190
|
key: index,
|
34164
34191
|
minWidth: "200px"
|
34165
34192
|
}, React__default.createElement(QuestionShortInput$1, {
|
34193
|
+
errors: errors,
|
34166
34194
|
value: data.correctTextualAnswers[index],
|
34167
34195
|
name: path + ".correctTextualAnswers[" + index + "]",
|
34168
34196
|
onDelete: function onDelete() {
|
34169
34197
|
return handleRemoveTextualAnswer(remove, index);
|
34170
34198
|
},
|
34171
|
-
deletable: data.correctTextualAnswers.length > 1
|
34199
|
+
deletable: data.correctTextualAnswers && data.correctTextualAnswers.length > 1
|
34172
34200
|
}));
|
34173
34201
|
}
|
34174
34202
|
})));
|
@@ -34183,6 +34211,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34183
34211
|
}, function (_, i) {
|
34184
34212
|
return i + 1;
|
34185
34213
|
}).map(function (i) {
|
34214
|
+
var _data$correctAnswers2;
|
34186
34215
|
return React__default.createElement(FormControlLabel, {
|
34187
34216
|
key: i,
|
34188
34217
|
className: styles$a["question-label"] + " w-fit",
|
@@ -34190,7 +34219,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34190
34219
|
value: i,
|
34191
34220
|
disabled: disabled,
|
34192
34221
|
control: React__default.createElement(Checkbox, {
|
34193
|
-
checked: data.correctAnswers.includes(i),
|
34222
|
+
checked: (_data$correctAnswers2 = data.correctAnswers) === null || _data$correctAnswers2 === void 0 ? void 0 : _data$correctAnswers2.includes(i),
|
34194
34223
|
onChange: function onChange(e) {
|
34195
34224
|
return handleCheckMultiChoice(+e.target.value);
|
34196
34225
|
}
|
@@ -34208,7 +34237,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34208
34237
|
}, React__default.createElement(FormControl, {
|
34209
34238
|
className: "flex-grow-1 w-100"
|
34210
34239
|
}, React__default.createElement(RadioGroup, {
|
34211
|
-
value: data.correctAnswers[0],
|
34240
|
+
value: (_data$correctAnswers3 = data.correctAnswers) === null || _data$correctAnswers3 === void 0 ? void 0 : _data$correctAnswers3[0],
|
34212
34241
|
name: "answers",
|
34213
34242
|
className: "flex-row w-100"
|
34214
34243
|
}, Array.from({
|
@@ -34216,6 +34245,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34216
34245
|
}, function (_, i) {
|
34217
34246
|
return i + 1;
|
34218
34247
|
}).map(function (i) {
|
34248
|
+
var _data$correctAnswers4;
|
34219
34249
|
return React__default.createElement(FormControlLabel, {
|
34220
34250
|
key: i,
|
34221
34251
|
className: styles$a["question-label"] + " w-fit",
|
@@ -34227,7 +34257,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34227
34257
|
disabled: disabled,
|
34228
34258
|
control: React__default.createElement(Radio, {
|
34229
34259
|
size: "small",
|
34230
|
-
checked: +i === data.correctAnswers[0],
|
34260
|
+
checked: +i === ((_data$correctAnswers4 = data.correctAnswers) === null || _data$correctAnswers4 === void 0 ? void 0 : _data$correctAnswers4[0]),
|
34231
34261
|
checkedIcon: React__default.createElement(BpCheckedIcon$1, null),
|
34232
34262
|
icon: React__default.createElement(BpIcon$1, null)
|
34233
34263
|
}),
|
@@ -34275,7 +34305,7 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34275
34305
|
questionTitleStyle: questionTitleStyle
|
34276
34306
|
})), React__default.createElement(Box, {
|
34277
34307
|
flexGrow: 1
|
34278
|
-
}, data.correctTextualAnswers.length > 1 && React__default.createElement(Box, null, React__default.createElement(QuestionCompareType, {
|
34308
|
+
}, data.correctTextualAnswers && data.correctTextualAnswers.length > 1 && React__default.createElement(Box, null, React__default.createElement(QuestionCompareType, {
|
34279
34309
|
value: data.questionAnswerType,
|
34280
34310
|
onChange: handleChangeCompareType
|
34281
34311
|
})), renderAnswer())), React__default.createElement(Stack, {
|
@@ -34380,6 +34410,8 @@ var QuestionBlock = function QuestionBlock(_ref2) {
|
|
34380
34410
|
})))));
|
34381
34411
|
};
|
34382
34412
|
var isEqual$2 = function isEqual(prev, next) {
|
34413
|
+
var prevError = _$2.get(prev.errors, prev.path);
|
34414
|
+
var nextError = _$2.get(next.errors, next.path);
|
34383
34415
|
var isPrevMatched = prev.optionKey === prev.path + ".questionTypeId";
|
34384
34416
|
var isNextMatched = next.optionKey === next.path + ".questionTypeId";
|
34385
34417
|
var prevOptionKey = isPrevMatched ? prev.optionKey : undefined;
|
@@ -34388,12 +34420,12 @@ var isEqual$2 = function isEqual(prev, next) {
|
|
34388
34420
|
var nextIsLoadingQuestionTypes = isNextMatched ? next.isLoadingQuestionTypes : undefined;
|
34389
34421
|
var prevQuestionTypes = isPrevMatched ? prev.questionTypes : undefined;
|
34390
34422
|
var nextQuestionTypes = isNextMatched ? next.questionTypes : undefined;
|
34391
|
-
return prevOptionKey === nextOptionKey && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath == next.isMath && prev.answerCount == next.answerCount && prev.disabled == next.disabled && JSON.stringify(prev.questionTitleStyle) === JSON.stringify(next.questionTitleStyle) && prev.onOpenQuestionTypeMenu == next.onOpenQuestionTypeMenu;
|
34423
|
+
return JSON.stringify(prevError) === JSON.stringify(nextError) && prevOptionKey === nextOptionKey && prevIsLoadingQuestionTypes === nextIsLoadingQuestionTypes && JSON.stringify(prev.data) === JSON.stringify(next.data) && JSON.stringify(prevQuestionTypes) === JSON.stringify(nextQuestionTypes) && prev.path === next.path && prev.isMath == next.isMath && prev.answerCount == next.answerCount && prev.disabled == next.disabled && JSON.stringify(prev.questionTitleStyle) === JSON.stringify(next.questionTitleStyle) && prev.onOpenQuestionTypeMenu == next.onOpenQuestionTypeMenu;
|
34392
34424
|
};
|
34393
34425
|
var QuestionBlock$1 = memo(QuestionBlock, isEqual$2);
|
34394
34426
|
|
34395
34427
|
var _excluded$i = ["data", "path", "isMath", "open", "isLoadingCategories", "isLoadingQuestionTypes", "optionKey", "categories", "questionTypes", "disabled", "onQuestioStartOrderChange", "onDelete", "onOpenSubCategoryMenu", "onOpenCategoryMenu", "onCloseCategoryMenu", "onCloseQuestionTypeMenu", "onOpenQuestionTypeMenu"];
|
34396
|
-
var _$
|
34428
|
+
var _$3 = _$8;
|
34397
34429
|
var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
34398
34430
|
var _data$articles$3, _data$articles$3$cate, _data$articles$4, _data$articles$4$cate, _questions$2;
|
34399
34431
|
var data = _ref.data,
|
@@ -34418,13 +34450,12 @@ var QuestionGroupBlockBody = function QuestionGroupBlockBody(_ref) {
|
|
34418
34450
|
var startOrderRef = useRef(null);
|
34419
34451
|
var articles = data.articles,
|
34420
34452
|
questions = data.questions;
|
34421
|
-
var blockErrors = _$
|
34422
|
-
console.log(path + ": ", blockErrors);
|
34453
|
+
var blockErrors = _$3.get(errors, path);
|
34423
34454
|
var handleOpenQuestionTypeMenu = useCallback(function (key) {
|
34424
34455
|
var _data$articles$, _data$articles$$categ, _data$articles$2, _data$articles$2$cate;
|
34425
34456
|
onOpenQuestionTypeMenu(key, (_data$articles$ = data.articles[0]) === null || _data$articles$ === void 0 ? void 0 : (_data$articles$$categ = _data$articles$.categories) === null || _data$articles$$categ === void 0 ? void 0 : _data$articles$$categ[0], (_data$articles$2 = data.articles[0]) === null || _data$articles$2 === void 0 ? void 0 : (_data$articles$2$cate = _data$articles$2.categories) === null || _data$articles$2$cate === void 0 ? void 0 : _data$articles$2$cate[1]);
|
34426
34457
|
}, [(_data$articles$3 = data.articles[0]) === null || _data$articles$3 === void 0 ? void 0 : (_data$articles$3$cate = _data$articles$3.categories) === null || _data$articles$3$cate === void 0 ? void 0 : _data$articles$3$cate[0], (_data$articles$4 = data.articles[0]) === null || _data$articles$4 === void 0 ? void 0 : (_data$articles$4$cate = _data$articles$4.categories) === null || _data$articles$4$cate === void 0 ? void 0 : _data$articles$4$cate[1]]);
|
34427
|
-
var debounceQuestionStartOrderChange = _$
|
34458
|
+
var debounceQuestionStartOrderChange = _$3.debounce(onQuestioStartOrderChange, 300);
|
34428
34459
|
var handleChangeStartQuestionOrder = function handleChangeStartQuestionOrder(e) {
|
34429
34460
|
var value = e.target.value.replace(/\D/g, '');
|
34430
34461
|
var order = +value;
|
@@ -34536,8 +34567,8 @@ var isEqual$3 = function isEqual(prev, next) {
|
|
34536
34567
|
var isNextMatched = next.optionKey.startsWith(next.path);
|
34537
34568
|
var prevOptionKey = isPrevMatched ? prev.optionKey : undefined;
|
34538
34569
|
var nextOptionKey = isNextMatched ? next.optionKey : undefined;
|
34539
|
-
var prevBlockErrors = _$
|
34540
|
-
var nextBlockErrors = _$
|
34570
|
+
var prevBlockErrors = _$3.get(prev.errors, prev.path);
|
34571
|
+
var nextBlockErrors = _$3.get(next.errors, next.path);
|
34541
34572
|
var prevIsLoadingCategories = isPrevMatched ? prev.isLoadingCategories : undefined;
|
34542
34573
|
var nextIsLoadingCategories = isNextMatched ? next.isLoadingCategories : undefined;
|
34543
34574
|
var prevCategories = isPrevMatched ? prev.categories : undefined;
|
@@ -34557,7 +34588,7 @@ var isEqual$3 = function isEqual(prev, next) {
|
|
34557
34588
|
var QuestionGroupBlockBody$1 = memo(QuestionGroupBlockBody, isEqual$3);
|
34558
34589
|
|
34559
34590
|
var _excluded$j = ["expandedIndex", "open", "paths", "path", "isMath", "data", "categories", "isLoadingCategories", "isLoadingQuestionTypes", "questionTypes", "optionKey", "disabled", "onToggle", "onQuestionCountChange", "onDelete", "onOpenSubCategoryMenu", "onOpenCategoryMenu", "onCloseCategoryMenu", "onCopiedPrevQuestionGroup", "onCloseQuestionTypeMenu", "onOpenQuestionTypeMenu"];
|
34560
|
-
var _$
|
34591
|
+
var _$4 = _$8;
|
34561
34592
|
var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
34562
34593
|
var _data$articles$3, _data$articles$3$cate, _data$articles$3$cate2, _data$articles$4, _data$articles$4$cate, _data$articles$4$cate2;
|
34563
34594
|
var expandedIndex = _ref.expandedIndex,
|
@@ -34630,9 +34661,11 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
34630
34661
|
}));
|
34631
34662
|
} else {
|
34632
34663
|
setFieldValue(path + ".questions", questions.map(function (q) {
|
34633
|
-
var correctAnswers
|
34664
|
+
var _q$correctAnswers$fil, _q$correctAnswers;
|
34665
|
+
if (isTextType(q.questionAnswerType)) return _extends({}, q);
|
34666
|
+
var correctAnswers = (_q$correctAnswers$fil = (_q$correctAnswers = q.correctAnswers) === null || _q$correctAnswers === void 0 ? void 0 : _q$correctAnswers.filter(function (i) {
|
34634
34667
|
return i <= newAnswerCount;
|
34635
|
-
});
|
34668
|
+
})) != null ? _q$correctAnswers$fil : [1];
|
34636
34669
|
if (correctAnswers.length === 0) correctAnswers = [1];
|
34637
34670
|
return _extends({}, q, {
|
34638
34671
|
numberOfAnswers: newAnswerCount,
|
@@ -34682,10 +34715,10 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
|
|
34682
34715
|
}).join(",") : ""].filter(function (i) {
|
34683
34716
|
return !!i;
|
34684
34717
|
}).join(" / ");
|
34685
|
-
var pageFromError = _$
|
34686
|
-
var pageToError = _$
|
34687
|
-
var categoryError = _$
|
34688
|
-
var blockErrors = _$
|
34718
|
+
var pageFromError = _$4.get(errors, path + ".pageFrom");
|
34719
|
+
var pageToError = _$4.get(errors, path + ".pageTo");
|
34720
|
+
var categoryError = _$4.get(errors, path + ".articles[0].categories");
|
34721
|
+
var blockErrors = _$4.get(errors, path);
|
34689
34722
|
return React__default.createElement(Accordion, {
|
34690
34723
|
expanded: open,
|
34691
34724
|
onChange: handleToggle,
|
@@ -35242,7 +35275,7 @@ var ChapterBlockBody = function ChapterBlockBody(_ref) {
|
|
35242
35275
|
};
|
35243
35276
|
|
35244
35277
|
var _excluded$l = ["data", "expandedIndex", "open", "path", "paths", "isMath", "isLoadingCategories", "isLoadingQuestionTypes", "categories", "questionTypes", "optionKey", "disabled", "onToggle", "onDelete", "onCopiedPrevQuestionGroup", "onCloseCategoryMenu", "onOpenCategoryMenu", "onOpenSubCategoryMenu", "onOpenQuestionTypeMenu", "onCloseQuestionTypeMenu"];
|
35245
|
-
var _$
|
35278
|
+
var _$5 = _$8;
|
35246
35279
|
var ChapterBlock = function ChapterBlock(_ref) {
|
35247
35280
|
var data = _ref.data,
|
35248
35281
|
expandedIndex = _ref.expandedIndex,
|
@@ -35282,10 +35315,10 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
35282
35315
|
chapter: title
|
35283
35316
|
}), title, path.replace(/\[(\d+)\]$/, ""), expandedIndex);
|
35284
35317
|
};
|
35285
|
-
var pageNameError = _$
|
35286
|
-
var pageFromError = _$
|
35287
|
-
var pageToError = _$
|
35288
|
-
var blockErrors = _$
|
35318
|
+
var pageNameError = _$5.get(errors, path + ".name");
|
35319
|
+
var pageFromError = _$5.get(errors, path + ".pageFrom");
|
35320
|
+
var pageToError = _$5.get(errors, path + ".pageTo");
|
35321
|
+
var blockErrors = _$5.get(errors, path);
|
35289
35322
|
return React__default.createElement(Accordion, {
|
35290
35323
|
expanded: open,
|
35291
35324
|
onChange: handleToggle,
|
@@ -35633,7 +35666,7 @@ var useTextbookOptions = function useTextbookOptions(subjectId, isMath, filter,
|
|
35633
35666
|
return state === null || state === void 0 ? void 0 : (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : (_state$common2$user = _state$common2.user) === null || _state$common2$user === void 0 ? void 0 : _state$common2$user.academyDomain;
|
35634
35667
|
});
|
35635
35668
|
var getOptionFilter = function getOptionFilter() {
|
35636
|
-
var cloneFilter = _$
|
35669
|
+
var cloneFilter = _$8.clone(filter);
|
35637
35670
|
for (var key in cloneFilter) {
|
35638
35671
|
if (Object.prototype.hasOwnProperty.call(cloneFilter, key)) {
|
35639
35672
|
var element = cloneFilter[key];
|
@@ -35783,7 +35816,7 @@ var useTextbookOptions = function useTextbookOptions(subjectId, isMath, filter,
|
|
35783
35816
|
};
|
35784
35817
|
};
|
35785
35818
|
|
35786
|
-
var _$
|
35819
|
+
var _$6 = _$8;
|
35787
35820
|
var TextbookContentsTab = function TextbookContentsTab(props) {
|
35788
35821
|
var disabled = props.disabled,
|
35789
35822
|
values = props.values,
|
@@ -35826,7 +35859,7 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
35826
35859
|
};
|
35827
35860
|
var handleConfirmDeleteBlock = function handleConfirmDeleteBlock() {
|
35828
35861
|
if (!(openConfirmDelete !== null && openConfirmDelete !== void 0 && openConfirmDelete.path)) return;
|
35829
|
-
var items = _$
|
35862
|
+
var items = _$6.get(values, openConfirmDelete.path, []);
|
35830
35863
|
setFieldValue(openConfirmDelete.path, items.filter(function (_, i) {
|
35831
35864
|
return i !== openConfirmDelete.itemIndex;
|
35832
35865
|
}));
|
@@ -35866,12 +35899,12 @@ var TextbookContentsTab = function TextbookContentsTab(props) {
|
|
35866
35899
|
if (!newParts.length) return;
|
35867
35900
|
if (newParts.length < parts.length) {
|
35868
35901
|
var _$get, _$get2, _$get3;
|
35869
|
-
var subChapters = (_$get = _$
|
35902
|
+
var subChapters = (_$get = _$6.get(values, newPath + ".subChapters")) != null ? _$get : [];
|
35870
35903
|
var questionGroups = [];
|
35871
|
-
if (!subChapters.length) questionGroups = (_$get2 = _$
|
35872
|
-
return _$
|
35904
|
+
if (!subChapters.length) questionGroups = (_$get2 = _$6.get(values, newPath + ".questionGroups")) != null ? _$get2 : [];else questionGroups = (_$get3 = _$6.get(values, newPath + ".subChapters[" + (subChapters.length - 1) + "].questionGroups")) != null ? _$get3 : [];
|
35905
|
+
return _$6.last(questionGroups);
|
35873
35906
|
}
|
35874
|
-
return _$
|
35907
|
+
return _$6.get(values, newPath);
|
35875
35908
|
};
|
35876
35909
|
var handleOpenSubCategoryMenu = useCallback(function (key, categoryId) {
|
35877
35910
|
setOptionKey(key);
|
@@ -36363,7 +36396,7 @@ var useSelect = function useSelect(_ref) {
|
|
36363
36396
|
setLoading = _useState2[1];
|
36364
36397
|
useEffect(function () {
|
36365
36398
|
if (!email || !academy) return;
|
36366
|
-
var fetchData = _$
|
36399
|
+
var fetchData = _$8.debounce(function () {
|
36367
36400
|
try {
|
36368
36401
|
var _temp2 = function _temp2() {
|
36369
36402
|
setLoading(false);
|
@@ -36477,7 +36510,7 @@ var OwnerSelector = function OwnerSelector(_ref) {
|
|
36477
36510
|
}, errors === null || errors === void 0 ? void 0 : errors.textbookOwners[index].courseId)));
|
36478
36511
|
};
|
36479
36512
|
|
36480
|
-
var _$
|
36513
|
+
var _$7 = _$8;
|
36481
36514
|
var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
36482
36515
|
var errors = _ref.errors,
|
36483
36516
|
values = _ref.values,
|
@@ -36550,12 +36583,12 @@ var TextbookOwnersTab = function TextbookOwnersTab(_ref) {
|
|
36550
36583
|
disabled: disabled || !!val.academyId && val.academyId !== (academy === null || academy === void 0 ? void 0 : academy.id)
|
36551
36584
|
}));
|
36552
36585
|
}
|
36553
|
-
}), _$
|
36586
|
+
}), _$7.get(errors, "textbookOwners[" + index + "].email") && React__default.createElement(Typography, {
|
36554
36587
|
fontWeight: 500,
|
36555
36588
|
fontSize: "10px",
|
36556
36589
|
lineHeight: "11.93px",
|
36557
36590
|
color: "#F34B4B"
|
36558
|
-
}, _$
|
36591
|
+
}, _$7.get(errors, "textbookOwners[" + index + "].email"))), !!(values !== null && values !== void 0 && (_values$textbookOwner = values.textbookOwners) !== null && _values$textbookOwner !== void 0 && _values$textbookOwner[index].email) && React__default.createElement(OwnerSelector, {
|
36559
36592
|
values: values,
|
36560
36593
|
errors: errors,
|
36561
36594
|
index: index,
|
@@ -36733,7 +36766,7 @@ var PreparedTextbookForm = function PreparedTextbookForm(_ref) {
|
|
36733
36766
|
variant: "contained",
|
36734
36767
|
disabled: disabled,
|
36735
36768
|
onClick: function onClick() {
|
36736
|
-
if (!_$
|
36769
|
+
if (!_$8.isEmpty(errors)) {
|
36737
36770
|
toast.error(t$1("please_fill_in_the_blank_fields"));
|
36738
36771
|
}
|
36739
36772
|
},
|