touchstudy-core 0.1.32 → 0.1.33
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/hooks/useExamResult.d.ts +3 -5
- package/dist/index.css +5 -0
- package/dist/index.js +115 -92
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +116 -93
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/package.json +1 -1
@@ -2,7 +2,7 @@
|
|
2
2
|
import { CategoryResponse, EffectSize, ExamResult, LongTimeSpendQuestion, TimelyOrderQuestion } from "../configs/types";
|
3
3
|
declare const useExamResult: (searchParam: string, navigate: Function, examSessionId?: number, studentId?: number, code?: string) => {
|
4
4
|
series: {
|
5
|
-
name:
|
5
|
+
name: any;
|
6
6
|
data: (number | null)[];
|
7
7
|
}[];
|
8
8
|
chartOptions: {
|
@@ -19,9 +19,7 @@ declare const useExamResult: (searchParam: string, navigate: Function, examSessi
|
|
19
19
|
enabled: boolean;
|
20
20
|
hideEmptySeries: boolean;
|
21
21
|
y: {
|
22
|
-
formatter: (
|
23
|
-
dataPointIndex: number;
|
24
|
-
}) => string | null;
|
22
|
+
formatter: (val: any, { dataPointIndex }: any) => any;
|
25
23
|
};
|
26
24
|
};
|
27
25
|
legend: {
|
@@ -75,7 +73,7 @@ declare const useExamResult: (searchParam: string, navigate: Function, examSessi
|
|
75
73
|
color: string;
|
76
74
|
};
|
77
75
|
labels: {
|
78
|
-
formatter: (val: any) =>
|
76
|
+
formatter: (val: any) => any;
|
79
77
|
style: {
|
80
78
|
fontSize: string;
|
81
79
|
};
|
package/dist/index.css
CHANGED
@@ -362,6 +362,11 @@
|
|
362
362
|
border-radius: 0.375rem;
|
363
363
|
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
|
364
364
|
|
365
|
+
._3NJzN {
|
366
|
+
overflow: hidden;
|
367
|
+
text-overflow: ellipsis;
|
368
|
+
white-space: nowrap; }
|
369
|
+
|
365
370
|
._2oGcJ {
|
366
371
|
width: 48px;
|
367
372
|
height: 48px;
|
package/dist/index.js
CHANGED
@@ -138,7 +138,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
138
138
|
return target;
|
139
139
|
}
|
140
140
|
|
141
|
-
var
|
141
|
+
var styleGlobal = {"btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","dropdown-academy":"_3CMVp","image-academy":"_2ibYC","academy-btn":"_1JMRU","switch-icon":"_N4FNf","dropdown-content-academy":"_31Dr0","dropdown-academy-item":"_3bjcz","noGutters":"_31ZQk","custom-col-2":"_3yXyK","custom-col-3":"_1RsJQ","custom-col-5":"_L42CP","custom-col-10":"_2u6eL","custom-row":"_8x7OP","custom-col":"_1JmTh","custom-col-4":"_3HO1e","custom-col-8":"_Oy31M","custom-col-12":"_3aUKo","custom-container":"_39LRs","form-label":"__Ut-u","form-control":"_2k4dX","btn-outline-primary":"_2PWdX","sort-icons":"_mQvLF","active":"_3oAH-","form-select":"_3W3aw","truncate":"_3NJzN"};
|
142
142
|
|
143
143
|
var AuthenticationMessage;
|
144
144
|
(function (AuthenticationMessage) {
|
@@ -464,18 +464,18 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
464
464
|
var handleSubmit = formikProps.handleSubmit;
|
465
465
|
return React__default.createElement(material.Grid, {
|
466
466
|
container: true,
|
467
|
-
className: "" +
|
467
|
+
className: "" + styleGlobal["box-login"]
|
468
468
|
}, React__default.createElement(material.Grid, {
|
469
469
|
item: true,
|
470
470
|
className: "p-0 d-flex justify-content-center"
|
471
471
|
}, React__default.createElement("form", {
|
472
|
-
className: "" +
|
472
|
+
className: "" + styleGlobal["block-login"],
|
473
473
|
onSubmit: handleSubmit
|
474
474
|
}, React__default.createElement("div", {
|
475
|
-
className: "" +
|
475
|
+
className: "" + styleGlobal["block-form"]
|
476
476
|
}, React__default.createElement("img", {
|
477
477
|
src: "/images/logo.jpeg",
|
478
|
-
className: "" +
|
478
|
+
className: "" + styleGlobal["img-login-rectangle"]
|
479
479
|
}), React__default.createElement("div", {
|
480
480
|
className: "p-0 mt-1 mb-4"
|
481
481
|
}, React__default.createElement(GoogleLogin__default, {
|
@@ -484,7 +484,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
484
484
|
onSuccess: onSuccessGoogle,
|
485
485
|
onFailure: onFailureGoogle,
|
486
486
|
cookiePolicy: "single_host_origin",
|
487
|
-
className: "" +
|
487
|
+
className: "" + styleGlobal["btn-login-google"],
|
488
488
|
isSignedIn: true
|
489
489
|
}))))));
|
490
490
|
});
|
@@ -548,7 +548,7 @@ var Login = function Login(_ref) {
|
|
548
548
|
var _useLogin = useLogin$1(onNavigate),
|
549
549
|
defaultInfo = _useLogin.defaultInfo;
|
550
550
|
return React__default.createElement("div", {
|
551
|
-
className:
|
551
|
+
className: styleGlobal["login"] + " container-fluid font-family-lato"
|
552
552
|
}, React__default.createElement(material.Grid, {
|
553
553
|
container: true,
|
554
554
|
spacing: 3,
|
@@ -1576,6 +1576,8 @@ var my_problem_solving_order = "내 순서";
|
|
1576
1576
|
var top_rankings_problem_solving_order = "상위권 학생의 순서";
|
1577
1577
|
var comparison_of_top_rankings_and_problem_solving_order = "상위권과 문제 푸는 순서 비교";
|
1578
1578
|
var my_answers = "내 해답";
|
1579
|
+
var request_for_consultation = "상담요청";
|
1580
|
+
var ask_a_question_with_a_problem = "문제로 질문하기";
|
1579
1581
|
var lang_ko = {
|
1580
1582
|
problem_solving: problem_solving,
|
1581
1583
|
my_story: my_story,
|
@@ -1863,7 +1865,9 @@ var lang_ko = {
|
|
1863
1865
|
my_problem_solving_order: my_problem_solving_order,
|
1864
1866
|
top_rankings_problem_solving_order: top_rankings_problem_solving_order,
|
1865
1867
|
comparison_of_top_rankings_and_problem_solving_order: comparison_of_top_rankings_and_problem_solving_order,
|
1866
|
-
my_answers: my_answers
|
1868
|
+
my_answers: my_answers,
|
1869
|
+
request_for_consultation: request_for_consultation,
|
1870
|
+
ask_a_question_with_a_problem: ask_a_question_with_a_problem
|
1867
1871
|
};
|
1868
1872
|
|
1869
1873
|
var problem_solving$1 = "Problem Solving";
|
@@ -2189,6 +2193,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
2189
2193
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
2190
2194
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
2191
2195
|
var my_answers$1 = "My answers";
|
2196
|
+
var request_for_consultation$1 = "Request for consultation";
|
2197
|
+
var ask_a_question_with_a_problem$1 = "Ask a question with a problem";
|
2192
2198
|
var lang_en = {
|
2193
2199
|
problem_solving: problem_solving$1,
|
2194
2200
|
my_story: my_story$1,
|
@@ -2511,7 +2517,9 @@ var lang_en = {
|
|
2511
2517
|
my_problem_solving_order: my_problem_solving_order$1,
|
2512
2518
|
top_rankings_problem_solving_order: top_rankings_problem_solving_order$1,
|
2513
2519
|
comparison_of_top_rankings_and_problem_solving_order: comparison_of_top_rankings_and_problem_solving_order$1,
|
2514
|
-
my_answers: my_answers$1
|
2520
|
+
my_answers: my_answers$1,
|
2521
|
+
request_for_consultation: request_for_consultation$1,
|
2522
|
+
ask_a_question_with_a_problem: ask_a_question_with_a_problem$1
|
2515
2523
|
};
|
2516
2524
|
|
2517
2525
|
i18n.use(reactI18next.initReactI18next).init({
|
@@ -2826,10 +2834,10 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2826
2834
|
};
|
2827
2835
|
return React__default.createElement(React.Fragment, null, React__default.createElement(material.Button, {
|
2828
2836
|
onClick: handleOpen,
|
2829
|
-
className: "" +
|
2837
|
+
className: "" + styleGlobal["academy-btn"],
|
2830
2838
|
sx: _extends({}, popoverStyle)
|
2831
2839
|
}, React__default.createElement("div", {
|
2832
|
-
className: "" +
|
2840
|
+
className: "" + styleGlobal["image-academy"]
|
2833
2841
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
2834
2842
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
2835
2843
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
@@ -2842,7 +2850,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2842
2850
|
minWidth: 150
|
2843
2851
|
}
|
2844
2852
|
}, (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name) || t(role === exports.Role.Admin ? "switch_academy_admin" : "switch_academy")), React__default.createElement("div", {
|
2845
|
-
className: "" +
|
2853
|
+
className: "" + styleGlobal["switch-icon"]
|
2846
2854
|
}, React__default.createElement(go.GoArrowSwitch, {
|
2847
2855
|
size: 14
|
2848
2856
|
}))), (isSuperAdmin || !isAdmin) && React__default.createElement(Popover, {
|
@@ -2884,7 +2892,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
2884
2892
|
fontWeight: 600
|
2885
2893
|
}
|
2886
2894
|
}, React__default.createElement("div", {
|
2887
|
-
className: "" +
|
2895
|
+
className: "" + styleGlobal["image-academy"]
|
2888
2896
|
}, option.image ? React__default.createElement(Box, {
|
2889
2897
|
component: "img",
|
2890
2898
|
alt: option.name,
|
@@ -3928,6 +3936,36 @@ var iconChecked = function iconChecked(_ref) {
|
|
3928
3936
|
}));
|
3929
3937
|
};
|
3930
3938
|
|
3939
|
+
var ellipsisText = function ellipsisText(text, maxLength) {
|
3940
|
+
return text.length > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
3941
|
+
};
|
3942
|
+
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
3943
|
+
var uniqueCategories = new Set();
|
3944
|
+
var filterCategories = categories.filter(function (category) {
|
3945
|
+
if (!uniqueCategories.has(category.name)) {
|
3946
|
+
uniqueCategories.add(category.name);
|
3947
|
+
return true;
|
3948
|
+
}
|
3949
|
+
return false;
|
3950
|
+
});
|
3951
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
3952
|
+
return {
|
3953
|
+
category: category,
|
3954
|
+
questions: inputData.questions.filter(function (question) {
|
3955
|
+
return question.category.name === category.name;
|
3956
|
+
})
|
3957
|
+
};
|
3958
|
+
});
|
3959
|
+
return questionsByCategory;
|
3960
|
+
};
|
3961
|
+
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
3962
|
+
duration = Math.round(duration);
|
3963
|
+
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
3964
|
+
mins: Math.floor(duration / 60),
|
3965
|
+
seconds: duration % 60
|
3966
|
+
}));
|
3967
|
+
};
|
3968
|
+
|
3931
3969
|
var ChatHeader = function ChatHeader(_ref) {
|
3932
3970
|
var fullName = _ref.fullName,
|
3933
3971
|
examTitle = _ref.examTitle,
|
@@ -3948,6 +3986,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3948
3986
|
handleConfirm = _useDialog.handleConfirm;
|
3949
3987
|
var _useTranslation = reactI18next.useTranslation(),
|
3950
3988
|
t = _useTranslation.t;
|
3989
|
+
var isTabletUp = material.useMediaQuery('(min-width:900px)');
|
3951
3990
|
var isStudent = roles === null || roles === void 0 ? void 0 : roles.includes(Roles$1.Student);
|
3952
3991
|
var filterDurationExam = React.useMemo(function () {
|
3953
3992
|
if (!durationExam) return;
|
@@ -3976,7 +4015,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3976
4015
|
alignItems: "center",
|
3977
4016
|
flexDirection: "row",
|
3978
4017
|
gap: "8px"
|
3979
|
-
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(material.Typography, {
|
4018
|
+
}, React__default.createElement(iconPersonNoActive, null), isTabletUp && React__default.createElement(material.Typography, {
|
3980
4019
|
fontWeight: 500,
|
3981
4020
|
fontSize: "14px",
|
3982
4021
|
lineHeight: "16.71px",
|
@@ -3986,7 +4025,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3986
4025
|
fontSize: "14px",
|
3987
4026
|
lineHeight: "16.71px",
|
3988
4027
|
color: "#5458D5"
|
3989
|
-
}, teacherName)), !!examTitle && React__default.createElement(material.Box, {
|
4028
|
+
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(material.Box, {
|
3990
4029
|
display: "flex",
|
3991
4030
|
alignItems: "start",
|
3992
4031
|
color: "#5458D5",
|
@@ -3996,7 +4035,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
3996
4035
|
fontWeight: 600,
|
3997
4036
|
fontSize: "12px",
|
3998
4037
|
lineHeight: "14.32px"
|
3999
|
-
}, examTitle), React__default.createElement(material.Box, {
|
4038
|
+
}, ellipsisText(examTitle, 15)), React__default.createElement(material.Box, {
|
4000
4039
|
display: "flex",
|
4001
4040
|
flexDirection: "row",
|
4002
4041
|
gap: "4px"
|
@@ -6575,9 +6614,9 @@ var SubjectSelector = function SubjectSelector(_ref) {
|
|
6575
6614
|
!minimumTextSearchLength && defaultValueAtFirst && options.length && onChange(options[0], subjects[0]);
|
6576
6615
|
}, [JSON.stringify(options), JSON.stringify(subjects), defaultValueAtFirst, minimumTextSearchLength]);
|
6577
6616
|
return React__default.createElement(material.FormGroup, {
|
6578
|
-
className: "" +
|
6617
|
+
className: "" + styleGlobal["filter-item"]
|
6579
6618
|
}, !!title && React__default.createElement("label", {
|
6580
|
-
className: "" +
|
6619
|
+
className: "" + styleGlobal["title-form"]
|
6581
6620
|
}, title), React__default.createElement(CustomSelectOption, {
|
6582
6621
|
options: options,
|
6583
6622
|
inputValue: searchString,
|
@@ -7046,12 +7085,12 @@ var SortIcon = function SortIcon(_ref) {
|
|
7046
7085
|
var isAscending = _ref.isAscending,
|
7047
7086
|
onClick = _ref.onClick;
|
7048
7087
|
return React__default.createElement("div", {
|
7049
|
-
className: "d-flex flex-column " +
|
7088
|
+
className: "d-flex flex-column " + styleGlobal["sort-icons"],
|
7050
7089
|
onClick: onClick
|
7051
7090
|
}, React__default.createElement(fa.FaSortUp, {
|
7052
|
-
className: isAscending === true ?
|
7091
|
+
className: isAscending === true ? styleGlobal["active"] : ""
|
7053
7092
|
}), React__default.createElement(fa.FaSortDown, {
|
7054
|
-
className: isAscending === false ?
|
7093
|
+
className: isAscending === false ? styleGlobal["active"] : ""
|
7055
7094
|
}));
|
7056
7095
|
};
|
7057
7096
|
|
@@ -7554,17 +7593,17 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7554
7593
|
return React__default.createElement(material.Grid, {
|
7555
7594
|
container: true,
|
7556
7595
|
spacing: 3,
|
7557
|
-
className: className + " " +
|
7596
|
+
className: className + " " + styleGlobal["custom-row"]
|
7558
7597
|
}, React__default.createElement(material.Grid, {
|
7559
7598
|
item: true,
|
7560
7599
|
xs: 5,
|
7561
7600
|
className: 'mb-2'
|
7562
7601
|
}, React__default.createElement("label", {
|
7563
|
-
className:
|
7602
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7564
7603
|
htmlFor: "title"
|
7565
7604
|
}, t("title")), React__default.createElement("input", {
|
7566
7605
|
disabled: isDisabled,
|
7567
|
-
className: "" +
|
7606
|
+
className: "" + styleGlobal["form-control"],
|
7568
7607
|
value: exam.title,
|
7569
7608
|
id: "title",
|
7570
7609
|
placeholder: t("enter_title"),
|
@@ -7574,7 +7613,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7574
7613
|
xs: 3,
|
7575
7614
|
className: 'mb-2'
|
7576
7615
|
}, React__default.createElement("label", {
|
7577
|
-
className:
|
7616
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7578
7617
|
htmlFor: "duration"
|
7579
7618
|
}, t("duration")), React__default.createElement(CustomSelect, {
|
7580
7619
|
inputId: "duration",
|
@@ -7587,7 +7626,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7587
7626
|
xs: 3,
|
7588
7627
|
className: 'mb-2'
|
7589
7628
|
}, React__default.createElement("label", {
|
7590
|
-
className:
|
7629
|
+
className: styleGlobal["form-label"] + " " + styles$1["question-label"],
|
7591
7630
|
htmlFor: "duration"
|
7592
7631
|
}, t("subject"), " ", selectedSubject === null || selectedSubject === void 0 ? void 0 : selectedSubject.name), React__default.createElement(CustomSelect, {
|
7593
7632
|
inputId: "subject",
|
@@ -7618,7 +7657,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
7618
7657
|
xs: 12
|
7619
7658
|
}, React__default.createElement("button", {
|
7620
7659
|
disabled: isDisabled,
|
7621
|
-
className:
|
7660
|
+
className: styleGlobal["btn-outline-primary"] + " w-100 d-flex justify-content-center align-items-center " + styles$1["question-btn"] + " mt-3",
|
7622
7661
|
onClick: handleAddArticle
|
7623
7662
|
}, React__default.createElement(fa.FaPlusCircle, {
|
7624
7663
|
className: "me-2"
|
@@ -8544,10 +8583,15 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8544
8583
|
enabled: true,
|
8545
8584
|
hideEmptySeries: true,
|
8546
8585
|
y: {
|
8547
|
-
formatter: function formatter(
|
8586
|
+
formatter: function formatter(val, _ref) {
|
8548
8587
|
var dataPointIndex = _ref.dataPointIndex;
|
8549
8588
|
if (dataPointIndex > 0) {
|
8550
|
-
|
8589
|
+
var _timelyOrderQuestion$, _questions$length, _questions;
|
8590
|
+
var questions = ((_timelyOrderQuestion$ = timelyOrderQuestion[dataChartIndex]) === null || _timelyOrderQuestion$ === void 0 ? void 0 : _timelyOrderQuestion$.questions) || null;
|
8591
|
+
var questionLength = (_questions$length = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length : 0;
|
8592
|
+
return val != null ? t("problem_number_question", {
|
8593
|
+
number: questions !== null ? ((_questions = questions[questionLength - val]) === null || _questions === void 0 ? void 0 : _questions.questionOrder) + 1 : val
|
8594
|
+
}) : t("no_data");
|
8551
8595
|
}
|
8552
8596
|
return null;
|
8553
8597
|
}
|
@@ -8555,7 +8599,7 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8555
8599
|
},
|
8556
8600
|
legend: {
|
8557
8601
|
show: true,
|
8558
|
-
fontSize:
|
8602
|
+
fontSize: "12px",
|
8559
8603
|
fontWeight: 600,
|
8560
8604
|
markers: {
|
8561
8605
|
width: 16,
|
@@ -8579,11 +8623,11 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8579
8623
|
}), ["."]),
|
8580
8624
|
axisBorder: {
|
8581
8625
|
show: true,
|
8582
|
-
color:
|
8626
|
+
color: "#E4E7EC"
|
8583
8627
|
},
|
8584
8628
|
labels: {
|
8585
8629
|
style: {
|
8586
|
-
fontSize:
|
8630
|
+
fontSize: "10px"
|
8587
8631
|
}
|
8588
8632
|
}
|
8589
8633
|
},
|
@@ -8605,25 +8649,30 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8605
8649
|
max: timelyOrderQuestion[dataChartIndex] ? timelyOrderQuestion[dataChartIndex].questions.length + 1 : 1,
|
8606
8650
|
axisBorder: {
|
8607
8651
|
show: true,
|
8608
|
-
color:
|
8652
|
+
color: "#E4E7EC"
|
8609
8653
|
},
|
8610
8654
|
labels: {
|
8611
8655
|
formatter: function formatter(val) {
|
8612
|
-
|
8656
|
+
var _timelyOrderQuestion$2, _questions$length2, _questions2;
|
8657
|
+
var questions = ((_timelyOrderQuestion$2 = timelyOrderQuestion[dataChartIndex]) === null || _timelyOrderQuestion$2 === void 0 ? void 0 : _timelyOrderQuestion$2.questions) || null;
|
8658
|
+
var questionLength = (_questions$length2 = questions === null || questions === void 0 ? void 0 : questions.length) != null ? _questions$length2 : 0;
|
8659
|
+
return val != null ? t("problem_number_question", {
|
8660
|
+
number: questions !== null ? ((_questions2 = questions[questionLength - val]) === null || _questions2 === void 0 ? void 0 : _questions2.questionOrder) + 1 : val
|
8661
|
+
}) : t("no_data");
|
8613
8662
|
},
|
8614
8663
|
style: {
|
8615
|
-
fontSize:
|
8664
|
+
fontSize: "10px"
|
8616
8665
|
}
|
8617
8666
|
}
|
8618
8667
|
}
|
8619
8668
|
};
|
8620
|
-
}, [JSON.stringify(timelyOrderQuestion
|
8669
|
+
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
8621
8670
|
var series = React.useMemo(function () {
|
8622
8671
|
if (!timelyOrderQuestion.length || timelyOrderQuestion.length < dataChartIndex + 1 || dataChartIndex < 0) return [{
|
8623
|
-
name: "
|
8672
|
+
name: t("my_problem_solving_order"),
|
8624
8673
|
data: []
|
8625
8674
|
}, {
|
8626
|
-
name: "
|
8675
|
+
name: t("top_rankings_problem_solving_order"),
|
8627
8676
|
data: []
|
8628
8677
|
}];
|
8629
8678
|
var data = timelyOrderQuestion[dataChartIndex];
|
@@ -8637,23 +8686,23 @@ var useExamResult = function useExamResult(searchParam, navigate, examSessionId,
|
|
8637
8686
|
});
|
8638
8687
|
});
|
8639
8688
|
var mySeriesData = [null].concat(questionsData.sort(function (a, b) {
|
8640
|
-
return a.answerOrder > b.answerOrder ? 1 : b.answerOrder > a.answerOrder ? -1 : 0;
|
8689
|
+
return b.answerOrder === 0 ? -1 : a.answerOrder > b.answerOrder ? 1 : b.answerOrder > a.answerOrder ? -1 : 0;
|
8641
8690
|
}).map(function (item) {
|
8642
|
-
return data.questions.length - item.questionOrder;
|
8691
|
+
return item.answerOrder === 0 ? null : data.questions.length - item.questionOrder;
|
8643
8692
|
}), [null]);
|
8644
8693
|
var topSeriesData = [null].concat(questionsData.sort(function (a, b) {
|
8645
|
-
return a.topAnswerOrder > b.topAnswerOrder ? 1 : b.topAnswerOrder > a.topAnswerOrder ? -1 : 0;
|
8694
|
+
return b.topAnswerOrder === 0 ? -1 : a.topAnswerOrder > b.topAnswerOrder ? 1 : b.topAnswerOrder > a.topAnswerOrder ? -1 : 0;
|
8646
8695
|
}).map(function (item) {
|
8647
|
-
return item.topAnswerOrder
|
8696
|
+
return item.topAnswerOrder === 0 ? null : data.questions.length - item.questionOrder;
|
8648
8697
|
}), [null]);
|
8649
8698
|
return [{
|
8650
|
-
name: "
|
8699
|
+
name: t("my_problem_solving_order"),
|
8651
8700
|
data: mySeriesData
|
8652
8701
|
}, {
|
8653
|
-
name: "
|
8702
|
+
name: t("top_rankings_problem_solving_order"),
|
8654
8703
|
data: topSeriesData
|
8655
8704
|
}];
|
8656
|
-
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex]);
|
8705
|
+
}, [JSON.stringify(timelyOrderQuestion), dataChartIndex, language]);
|
8657
8706
|
var handleExportPdf = function handleExportPdf() {
|
8658
8707
|
try {
|
8659
8708
|
var canvas = document.querySelector("#canvas");
|
@@ -9812,33 +9861,6 @@ var ReactApexChart = unwrapExports(reactApexcharts_min);
|
|
9812
9861
|
|
9813
9862
|
var styles$2 = {"titleBox":"_1dveO","title":"_mxRxf","point":"_2fD-F","buttonGroup":"_2DGl3","btnFeedback":"_xGW1x","btnTerminate":"_3mLu2","myanswer":"_eDBpS","titleMyAnswer1":"_2fMq3","titleMyAnswer2":"_3gEYh","contentMyAnswer":"_2K_sx","myAnswerItem":"_2qiLh","time":"_6TCOK","timeCol":"_hmseC","answer-response":"_3GfJt","answer-response-0":"_3ut64","answer-response-1":"_2VtpD","answer-response-2":"_58lQU","answer-response-3":"_1ucMY","answer-response-4":"_1qkxy","answerCorrect":"_2jIeT","answerIncorrect":"_to2v0","answerNograss":"_1JSte","answerEasy":"_2_uTU","answerDiscrimination":"_1DBoA","answerTrap":"_1q3tD","answerNoTime":"_3iItu","questionOrder":"_1fNkS","myTimeLabel":"_1Z_F3","myPoolTime":"_4KwG0","topTimeLabel":"_245H-","topTime":"_3tZqw","meanTimeLabel":"_PlPLY","meanTime":"_12a7R","compareChart":"_3MW16","prevChart":"_1fNkb","chart":"_3K4oY","nextChart":"_3YKBp","titleChart":"_13BVP","compareGrass":"_1_fJu","titleCompareGrass":"_o1txm","tableCompareGrass":"_bT5nf","thcolumn1":"_3Umg0","tdcolumn1":"_3dRMF","tdcolumn3":"_2tcBP","classification":"_1AFeb","wrapperProblem":"_oTqG7","titleProblem":"_35eIx","titleProblemClose":"_3t4HO","titleTrickyProblem":"_1-oxK","wrongQuestions":"_2dpMR","question":"_1lSOX","assignedQuestions":"_1ONUt","wrapperContent":"_nPoR0","content":"_2zmZn","contentColumn1":"_334SY","span1":"_3Lf-U","span2":"_ZpMot","contentColumn2":"_16P3l","duration":"_1kT28","topDuration":"_1fVRi","overallCorrectRate":"_3jLGe","answer":"_VsZ0K","contentVulnerable":"_QxKMy","wrappContentProblem":"_nnqpW","contentProblem":"_3Z1nV","labelProblem":"_36Xpx","name":"_3ZJQW","percent":"_2J3MK","slider":"_1MPdO","track":"_3CV_y","noData":"__g-ff","loading":"_3j485","table-responsive":"_2O6RX","form-label":"_1RYOQ","form-control":"_3VRVT","form-label-dialog":"_3oCSh","btn-cancel":"_3USKq","btn-register":"_3y_iD","pdfBtnBox":"_3xZHo","pdfBtn":"_1DtWq","form-select":"_1a_vw"};
|
9814
9863
|
|
9815
|
-
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
9816
|
-
var uniqueCategories = new Set();
|
9817
|
-
var filterCategories = categories.filter(function (category) {
|
9818
|
-
if (!uniqueCategories.has(category.name)) {
|
9819
|
-
uniqueCategories.add(category.name);
|
9820
|
-
return true;
|
9821
|
-
}
|
9822
|
-
return false;
|
9823
|
-
});
|
9824
|
-
var questionsByCategory = filterCategories.map(function (category) {
|
9825
|
-
return {
|
9826
|
-
category: category,
|
9827
|
-
questions: inputData.questions.filter(function (question) {
|
9828
|
-
return question.category.name === category.name;
|
9829
|
-
})
|
9830
|
-
};
|
9831
|
-
});
|
9832
|
-
return questionsByCategory;
|
9833
|
-
};
|
9834
|
-
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
9835
|
-
duration = Math.round(duration);
|
9836
|
-
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
9837
|
-
mins: Math.floor(duration / 60),
|
9838
|
-
seconds: duration % 60
|
9839
|
-
}));
|
9840
|
-
};
|
9841
|
-
|
9842
9864
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
9843
9865
|
var _ref$width = _ref.width,
|
9844
9866
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -10128,7 +10150,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10128
10150
|
padding: "24px 24px 40px 24px"
|
10129
10151
|
}, React__default.createElement(material.Stack, null, React__default.createElement("label", {
|
10130
10152
|
htmlFor: "questions",
|
10131
|
-
className:
|
10153
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10132
10154
|
}, "\uC9C8\uBB38\uD560 \uBB38\uC81C"), React__default.createElement(formik.Field, {
|
10133
10155
|
as: "select",
|
10134
10156
|
id: "questions",
|
@@ -10136,7 +10158,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10136
10158
|
style: {
|
10137
10159
|
width: "100%"
|
10138
10160
|
},
|
10139
|
-
className: "" +
|
10161
|
+
className: "" + styleGlobal['form-select']
|
10140
10162
|
}, questions === null || questions === void 0 ? void 0 : questions.map(function (question) {
|
10141
10163
|
return React__default.createElement("option", {
|
10142
10164
|
value: question === null || question === void 0 ? void 0 : question.id
|
@@ -10145,7 +10167,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10145
10167
|
}));
|
10146
10168
|
}))), React__default.createElement(material.Stack, null, React__default.createElement("label", {
|
10147
10169
|
htmlFor: "content-question",
|
10148
|
-
className:
|
10170
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10149
10171
|
}, "\uC9C8\uBB38 \uB0B4\uC6A9"), React__default.createElement(material.Box, {
|
10150
10172
|
position: 'relative',
|
10151
10173
|
display: 'flex',
|
@@ -10158,7 +10180,7 @@ function CreateNewQuestionDialog(_ref) {
|
|
10158
10180
|
},
|
10159
10181
|
name: "content",
|
10160
10182
|
placeholder: "\uBB38\uC81C\uAC00 \uC5B4\uB824\uC6CC\uC694",
|
10161
|
-
className:
|
10183
|
+
className: styleGlobal['form-control']
|
10162
10184
|
}), (errors === null || errors === void 0 ? void 0 : errors.content) && React__default.createElement(material.Box, {
|
10163
10185
|
position: 'absolute',
|
10164
10186
|
right: 0,
|
@@ -10228,9 +10250,9 @@ function MyAnswer(_ref) {
|
|
10228
10250
|
bgcolor: "#F9FAFB",
|
10229
10251
|
flexDirection: "row",
|
10230
10252
|
padding: "12px",
|
10231
|
-
className: styles$2["myAnswerItem"] + " " +
|
10253
|
+
className: styles$2["myAnswerItem"] + " " + styleGlobal["noGutters"]
|
10232
10254
|
}, React__default.createElement("div", {
|
10233
|
-
className:
|
10255
|
+
className: styleGlobal["custom-col-2"],
|
10234
10256
|
style: {
|
10235
10257
|
display: "flex",
|
10236
10258
|
gap: "4px"
|
@@ -10242,7 +10264,7 @@ function MyAnswer(_ref) {
|
|
10242
10264
|
color: "#97A1AF"
|
10243
10265
|
}
|
10244
10266
|
}, "\uBB38\uC81C \uBC88\uD638")), React__default.createElement("div", {
|
10245
|
-
className:
|
10267
|
+
className: styleGlobal["custom-col-2"],
|
10246
10268
|
style: {
|
10247
10269
|
display: "flex",
|
10248
10270
|
gap: "4px"
|
@@ -10254,7 +10276,7 @@ function MyAnswer(_ref) {
|
|
10254
10276
|
color: "#97A1AF"
|
10255
10277
|
}
|
10256
10278
|
}, "\uC815\uB2F5")), React__default.createElement("div", {
|
10257
|
-
className:
|
10279
|
+
className: styleGlobal["custom-col-2"],
|
10258
10280
|
style: {
|
10259
10281
|
display: "flex",
|
10260
10282
|
gap: "4px"
|
@@ -10266,7 +10288,7 @@ function MyAnswer(_ref) {
|
|
10266
10288
|
color: "#97A1AF"
|
10267
10289
|
}
|
10268
10290
|
}, "\uD480\uC774 \uC2DC\uAC04")), React__default.createElement("div", {
|
10269
|
-
className:
|
10291
|
+
className: styleGlobal["custom-col-2"],
|
10270
10292
|
style: {
|
10271
10293
|
display: "flex",
|
10272
10294
|
alignItems: "center",
|
@@ -10279,7 +10301,7 @@ function MyAnswer(_ref) {
|
|
10279
10301
|
color: "#97A1AF"
|
10280
10302
|
}
|
10281
10303
|
}, "\uC0C1\uC704\uAD8C \uBE44\uAD50")), React__default.createElement("div", {
|
10282
|
-
className:
|
10304
|
+
className: styleGlobal["custom-col-2"],
|
10283
10305
|
style: {
|
10284
10306
|
display: "flex",
|
10285
10307
|
alignItems: "center",
|
@@ -10314,9 +10336,9 @@ function MyAnswer(_ref) {
|
|
10314
10336
|
} : {},
|
10315
10337
|
key: question.id
|
10316
10338
|
}, React__default.createElement("div", {
|
10317
|
-
className: styles$2["myAnswerItem"] + " " +
|
10339
|
+
className: styles$2["myAnswerItem"] + " " + styleGlobal["noGutters"]
|
10318
10340
|
}, React__default.createElement("div", {
|
10319
|
-
className:
|
10341
|
+
className: styleGlobal["custom-col-2"],
|
10320
10342
|
style: {
|
10321
10343
|
display: "flex",
|
10322
10344
|
alignItems: "center",
|
@@ -10326,7 +10348,7 @@ function MyAnswer(_ref) {
|
|
10326
10348
|
}, question.isStar ? React__default.createElement(iconStarQuestion, null) : React__default.createElement(iconNoStarQuestion, null), React__default.createElement("span", {
|
10327
10349
|
className: styles$2["questionOrder"]
|
10328
10350
|
}, question.questionOrder + 1, "\uBC88")), React__default.createElement("div", {
|
10329
|
-
className:
|
10351
|
+
className: styleGlobal["custom-col-2"],
|
10330
10352
|
style: {
|
10331
10353
|
display: "flex",
|
10332
10354
|
alignItems: "center",
|
@@ -10339,7 +10361,7 @@ function MyAnswer(_ref) {
|
|
10339
10361
|
}, "\uC624\uB2F5")), question.selectedAnswers === "" && React__default.createElement(React.Fragment, null, React__default.createElement(iconNoGrass, null), React__default.createElement("span", {
|
10340
10362
|
className: styles$2["answerNograss"]
|
10341
10363
|
}, "\uD480\uC774 \uC5C6\uC74C"))), React__default.createElement("div", {
|
10342
|
-
className:
|
10364
|
+
className: styleGlobal["custom-col-2"],
|
10343
10365
|
style: {
|
10344
10366
|
display: "flex",
|
10345
10367
|
alignItems: "center"
|
@@ -10355,7 +10377,7 @@ function MyAnswer(_ref) {
|
|
10355
10377
|
},
|
10356
10378
|
className: styles$2["answerNoTime"]
|
10357
10379
|
}, "\uC2DC\uAC04 \uC5C6\uC74C")), React__default.createElement("div", {
|
10358
|
-
className:
|
10380
|
+
className: styleGlobal["custom-col-2"],
|
10359
10381
|
style: {
|
10360
10382
|
display: "flex",
|
10361
10383
|
alignItems: "center"
|
@@ -10372,7 +10394,7 @@ function MyAnswer(_ref) {
|
|
10372
10394
|
},
|
10373
10395
|
className: styles$2["answerNoTime"]
|
10374
10396
|
}, "-")), React__default.createElement("div", {
|
10375
|
-
className:
|
10397
|
+
className: styleGlobal["custom-col-2"],
|
10376
10398
|
style: {
|
10377
10399
|
display: "flex",
|
10378
10400
|
alignItems: "center"
|
@@ -10388,7 +10410,7 @@ function MyAnswer(_ref) {
|
|
10388
10410
|
},
|
10389
10411
|
className: styles$2["answerNoTime"]
|
10390
10412
|
}, "\uC2DC\uAC04 \uC5C6\uC74C")), isStudent && React__default.createElement("div", {
|
10391
|
-
className:
|
10413
|
+
className: styleGlobal["custom-col-2"],
|
10392
10414
|
style: {
|
10393
10415
|
display: "flex",
|
10394
10416
|
alignItems: "center",
|
@@ -10912,7 +10934,7 @@ function CreateNewQuestionDialog$1(_ref) {
|
|
10912
10934
|
var errors = _ref2.errors;
|
10913
10935
|
return React__default.createElement(formik.Form, null, React__default.createElement("label", {
|
10914
10936
|
htmlFor: "content-question",
|
10915
|
-
className:
|
10937
|
+
className: styleGlobal['form-label'] + " " + styles$2['form-label-dialog']
|
10916
10938
|
}, "\uC9C8\uBB38 \uB0B4\uC6A9"), React__default.createElement(material.Box, {
|
10917
10939
|
position: 'relative',
|
10918
10940
|
display: 'flex',
|
@@ -10925,7 +10947,7 @@ function CreateNewQuestionDialog$1(_ref) {
|
|
10925
10947
|
},
|
10926
10948
|
name: "content",
|
10927
10949
|
placeholder: "\uBB38\uC81C\uAC00 \uC5B4\uB824\uC6CC\uC694",
|
10928
|
-
className:
|
10950
|
+
className: styleGlobal['form-control']
|
10929
10951
|
}), (errors === null || errors === void 0 ? void 0 : errors.content) && React__default.createElement(material.Box, {
|
10930
10952
|
position: 'absolute',
|
10931
10953
|
right: 0,
|
@@ -11160,6 +11182,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11160
11182
|
var label = _ref2.label,
|
11161
11183
|
value = _ref2.value;
|
11162
11184
|
return React__default.createElement(material.Button, {
|
11185
|
+
className: styleGlobal["truncate"],
|
11163
11186
|
disableTouchRipple: true,
|
11164
11187
|
sx: {
|
11165
11188
|
fontSize: "14px",
|
@@ -11179,7 +11202,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
11179
11202
|
}, React__default.createElement("div", {
|
11180
11203
|
className: styles$2["pdfBtnBox"]
|
11181
11204
|
}, React__default.createElement("button", {
|
11182
|
-
className: styles$2["pdfBtn"],
|
11205
|
+
className: styles$2["pdfBtn"] + " " + styleGlobal["truncate"],
|
11183
11206
|
onClick: handleExportPdf
|
11184
11207
|
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print"))))))), React__default.createElement(material.Grid, {
|
11185
11208
|
item: true,
|