mario-education 2.4.46-admin → 2.4.49-admin
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/MarioFramework.Education/ClientApp/src/components/Select/SelectFilter.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +1 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/configs/questionDetailSchema.d.ts +4 -4
- package/dist/index.css +1 -1
- package/dist/index.js +60 -101
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -101
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PROPS_FILTERS_COMPONENT } from "../../utils/type";
|
|
3
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
3
4
|
declare const SelectFilter: ({ studentUserId, studentId, studentDefault, handleChangeFilters, name, icon, option, onChangeFilters, btnStyle, filter, teacherUserId, changeCurrentTeacherUserId }: PROPS_FILTERS_COMPONENT) => JSX.Element;
|
|
4
5
|
export default SelectFilter;
|
|
@@ -97,7 +97,7 @@ export declare const studentByGradeConvert: (newData: IStudentByGrade[]) => {
|
|
|
97
97
|
}[];
|
|
98
98
|
export declare const findTotalStudentByGrade: (data: IStudentByGrade[]) => number;
|
|
99
99
|
export declare const getConvertMinuteToHour: (timeSecond: any) => string;
|
|
100
|
-
export declare const readinesToLearnoptions: (seriesName: string[]) => ApexOptions;
|
|
100
|
+
export declare const readinesToLearnoptions: (seriesName: string[], data: any) => ApexOptions;
|
|
101
101
|
export declare const convertDataToSeriesBullderChart: (data: IReadinessToLearning[]) => {
|
|
102
102
|
name: string;
|
|
103
103
|
data: import("react").ReactText[][];
|
|
@@ -4,8 +4,8 @@ declare const schema: import("yup/lib/object").OptionalObjectSchema<{
|
|
|
4
4
|
type: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
5
5
|
categoryId: import("yup/lib/number").RequiredNumberSchema<number | undefined, Record<string, any>>;
|
|
6
6
|
explainAnswer: yup.StringSchema<string | undefined, Record<string, any>, string | undefined>;
|
|
7
|
-
fromLabel: yup.StringSchema<string
|
|
8
|
-
toLabel: yup.StringSchema<string
|
|
7
|
+
fromLabel: yup.StringSchema<import("yup/lib/types").Maybe<string>, Record<string, any>, import("yup/lib/types").Maybe<string>>;
|
|
8
|
+
toLabel: yup.StringSchema<import("yup/lib/types").Maybe<string>, Record<string, any>, import("yup/lib/types").Maybe<string>>;
|
|
9
9
|
numberOfStars: yup.NumberSchema<number | null | undefined, Record<string, any>, number | null | undefined>;
|
|
10
10
|
answers: import("yup/lib/array").OptionalArraySchema<yup.AnySchema<any, any, any>, any, any[] | undefined>;
|
|
11
11
|
isDefaultQuestion: yup.BooleanSchema<boolean | undefined, Record<string, any>, boolean | undefined>;
|
|
@@ -17,8 +17,8 @@ declare const schema: import("yup/lib/object").OptionalObjectSchema<{
|
|
|
17
17
|
type: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
|
|
18
18
|
categoryId: import("yup/lib/number").RequiredNumberSchema<number | undefined, Record<string, any>>;
|
|
19
19
|
explainAnswer: yup.StringSchema<string | undefined, Record<string, any>, string | undefined>;
|
|
20
|
-
fromLabel: yup.StringSchema<string
|
|
21
|
-
toLabel: yup.StringSchema<string
|
|
20
|
+
fromLabel: yup.StringSchema<import("yup/lib/types").Maybe<string>, Record<string, any>, import("yup/lib/types").Maybe<string>>;
|
|
21
|
+
toLabel: yup.StringSchema<import("yup/lib/types").Maybe<string>, Record<string, any>, import("yup/lib/types").Maybe<string>>;
|
|
22
22
|
numberOfStars: yup.NumberSchema<number | null | undefined, Record<string, any>, number | null | undefined>;
|
|
23
23
|
answers: import("yup/lib/array").OptionalArraySchema<yup.AnySchema<any, any, any>, any, any[] | undefined>;
|
|
24
24
|
isDefaultQuestion: yup.BooleanSchema<boolean | undefined, Record<string, any>, boolean | undefined>;
|
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -21,8 +21,7 @@ var fa = require('react-icons/fa');
|
|
|
21
21
|
var tinymceReact = require('@tinymce/tinymce-react');
|
|
22
22
|
var Chart = _interopDefault(require('react-apexcharts'));
|
|
23
23
|
var fi = require('react-icons/fi');
|
|
24
|
-
|
|
25
|
-
var MomentUtils = _interopDefault(require('@date-io/moment'));
|
|
24
|
+
require('react-datepicker/dist/react-datepicker.css');
|
|
26
25
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
27
26
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
28
27
|
|
|
@@ -26118,12 +26117,38 @@ var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
|
|
|
26118
26117
|
|
|
26119
26118
|
return hTime;
|
|
26120
26119
|
};
|
|
26121
|
-
var readinesToLearnoptions = function readinesToLearnoptions(seriesName) {
|
|
26120
|
+
var readinesToLearnoptions = function readinesToLearnoptions(seriesName, data) {
|
|
26121
|
+
var history = reactRouterDom.useHistory();
|
|
26122
|
+
var listStudentWithId = [];
|
|
26123
|
+
data === null || data === void 0 ? void 0 : data.forEach(function (element) {
|
|
26124
|
+
var _element$studentPerce;
|
|
26125
|
+
|
|
26126
|
+
element === null || element === void 0 ? void 0 : (_element$studentPerce = element.studentPercentQuestion) === null || _element$studentPerce === void 0 ? void 0 : _element$studentPerce.forEach(function (item) {
|
|
26127
|
+
if (!(listStudentWithId !== null && listStudentWithId !== void 0 && listStudentWithId.map(function (i) {
|
|
26128
|
+
return i === null || i === void 0 ? void 0 : i.studentId;
|
|
26129
|
+
}).includes(item.studentId))) listStudentWithId.push({
|
|
26130
|
+
studentName: item.studentName,
|
|
26131
|
+
studentId: item.studentId
|
|
26132
|
+
});
|
|
26133
|
+
});
|
|
26134
|
+
});
|
|
26122
26135
|
return {
|
|
26123
26136
|
chart: {
|
|
26124
26137
|
height: 450,
|
|
26125
26138
|
toolbar: {
|
|
26126
26139
|
show: false
|
|
26140
|
+
},
|
|
26141
|
+
events: {
|
|
26142
|
+
markerClick: function markerClick(_e, _chart, options) {
|
|
26143
|
+
var _listStudentWithId$fi;
|
|
26144
|
+
|
|
26145
|
+
var currentStudentId = (_listStudentWithId$fi = listStudentWithId.find(function (i) {
|
|
26146
|
+
var _options$w, _options$w$globals;
|
|
26147
|
+
|
|
26148
|
+
return i.studentName.toLowerCase().trim() == (options === null || options === void 0 ? void 0 : (_options$w = options.w) === null || _options$w === void 0 ? void 0 : (_options$w$globals = _options$w.globals) === null || _options$w$globals === void 0 ? void 0 : _options$w$globals.seriesZ[options === null || options === void 0 ? void 0 : options.dataPointIndex][options === null || options === void 0 ? void 0 : options.dataPointIndex].toLowerCase().trim());
|
|
26149
|
+
})) === null || _listStudentWithId$fi === void 0 ? void 0 : _listStudentWithId$fi.studentId;
|
|
26150
|
+
history.push("/student-detail/overview/" + currentStudentId);
|
|
26151
|
+
}
|
|
26127
26152
|
}
|
|
26128
26153
|
},
|
|
26129
26154
|
dataLabels: {
|
|
@@ -26198,7 +26223,7 @@ var convertDataToSeriesBullderChart = function convertDataToSeriesBullderChart(d
|
|
|
26198
26223
|
return {
|
|
26199
26224
|
name: i.questionText.replace("<p>", "").replace("</p>", ""),
|
|
26200
26225
|
data: ((_i$studentPercentQues = i.studentPercentQuestion) === null || _i$studentPercentQues === void 0 ? void 0 : _i$studentPercentQues.map(function (question) {
|
|
26201
|
-
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName];
|
|
26226
|
+
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName, question.studentId];
|
|
26202
26227
|
})) || []
|
|
26203
26228
|
};
|
|
26204
26229
|
});
|
|
@@ -26393,7 +26418,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26393
26418
|
},
|
|
26394
26419
|
fill: {
|
|
26395
26420
|
opacity: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26396
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26421
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26397
26422
|
return 0.2;
|
|
26398
26423
|
}
|
|
26399
26424
|
|
|
@@ -26410,7 +26435,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26410
26435
|
return activeData[index];
|
|
26411
26436
|
}),
|
|
26412
26437
|
width: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26413
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26438
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26414
26439
|
return 2;
|
|
26415
26440
|
}
|
|
26416
26441
|
|
|
@@ -26583,7 +26608,7 @@ var BubbleChartCustom = function BubbleChartCustom(_ref) {
|
|
|
26583
26608
|
})), React__default.createElement("div", {
|
|
26584
26609
|
className: styles$1["chart-buddle"]
|
|
26585
26610
|
}, React__default.createElement("div", null, React__default.createElement(Chart, {
|
|
26586
|
-
options: readinesToLearnoptions(seriesName),
|
|
26611
|
+
options: readinesToLearnoptions(seriesName, data),
|
|
26587
26612
|
type: "scatter",
|
|
26588
26613
|
series: convertDataToSeriesBullderChart(data),
|
|
26589
26614
|
width: "100%",
|
|
@@ -28036,29 +28061,18 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28036
28061
|
setIsOpenCollapse(!isOpenCollapse);
|
|
28037
28062
|
};
|
|
28038
28063
|
|
|
28039
|
-
var onChangeYear = function onChangeYear(item) {
|
|
28040
|
-
!!onChangeFilters && onChangeFilters({
|
|
28041
|
-
startDate: item.startDate,
|
|
28042
|
-
endDate: item.endDate
|
|
28043
|
-
});
|
|
28044
|
-
setLabelBox(_extends({}, labelBox, {
|
|
28045
|
-
calendar: {
|
|
28046
|
-
value: item.value,
|
|
28047
|
-
label: item.label
|
|
28048
|
-
}
|
|
28049
|
-
}));
|
|
28050
|
-
};
|
|
28051
|
-
|
|
28052
28064
|
var handleChangeStartDate = function handleChangeStartDate(date) {
|
|
28053
28065
|
!!onChangeFilters && onChangeFilters({
|
|
28054
28066
|
startDate: moment(date).startOf("day").valueOf()
|
|
28055
28067
|
});
|
|
28068
|
+
setIsOpenCollapse(false);
|
|
28056
28069
|
};
|
|
28057
28070
|
|
|
28058
28071
|
var handleChangeEndDate = function handleChangeEndDate(date) {
|
|
28059
28072
|
!!onChangeFilters && onChangeFilters({
|
|
28060
28073
|
endDate: moment(date).endOf("day").valueOf()
|
|
28061
28074
|
});
|
|
28075
|
+
setIsOpenCollapse(false);
|
|
28062
28076
|
};
|
|
28063
28077
|
|
|
28064
28078
|
var onChangeGender = function onChangeGender(item) {
|
|
@@ -28078,15 +28092,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28078
28092
|
grade: grade.value
|
|
28079
28093
|
}));
|
|
28080
28094
|
|
|
28081
|
-
if (grade.value
|
|
28095
|
+
if (grade.value == -1) {
|
|
28082
28096
|
!!onChangeFilters && onChangeFilters({
|
|
28083
28097
|
grade: []
|
|
28084
28098
|
});
|
|
28099
|
+
} else {
|
|
28100
|
+
!!onChangeFilters && onChangeFilters({
|
|
28101
|
+
grade: [grade.label]
|
|
28102
|
+
});
|
|
28085
28103
|
}
|
|
28086
|
-
|
|
28087
|
-
!!onChangeFilters && onChangeFilters({
|
|
28088
|
-
grade: [grade.label]
|
|
28089
|
-
});
|
|
28090
28104
|
};
|
|
28091
28105
|
|
|
28092
28106
|
var onChangeBandScore = function onChangeBandScore(score) {
|
|
@@ -28098,11 +28112,11 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28098
28112
|
!!onChangeFilters && onChangeFilters({
|
|
28099
28113
|
bandScore: ""
|
|
28100
28114
|
});
|
|
28115
|
+
} else {
|
|
28116
|
+
!!onChangeFilters && onChangeFilters({
|
|
28117
|
+
bandScore: score.label
|
|
28118
|
+
});
|
|
28101
28119
|
}
|
|
28102
|
-
|
|
28103
|
-
!!onChangeFilters && onChangeFilters({
|
|
28104
|
-
bandScore: score.label
|
|
28105
|
-
});
|
|
28106
28120
|
};
|
|
28107
28121
|
|
|
28108
28122
|
var handleClickOutSide = function handleClickOutSide(event) {
|
|
@@ -28116,45 +28130,6 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28116
28130
|
}, []);
|
|
28117
28131
|
|
|
28118
28132
|
var renderSelectFilter = function renderSelectFilter() {
|
|
28119
|
-
if (name === FILTER_NAME.Calendar) {
|
|
28120
|
-
return React__default.createElement("div", {
|
|
28121
|
-
key: "" + name,
|
|
28122
|
-
className: styles["block-filter-component"] + " ",
|
|
28123
|
-
ref: ref
|
|
28124
|
-
}, React__default.createElement("button", {
|
|
28125
|
-
onClick: handleToggleCollapse,
|
|
28126
|
-
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
28127
|
-
}, React__default.createElement("img", {
|
|
28128
|
-
src: "" + icon,
|
|
28129
|
-
alt: labelBox.calendar.label
|
|
28130
|
-
}), React__default.createElement("p", {
|
|
28131
|
-
className: styles["color-filter"] + " my-0 mx-2"
|
|
28132
|
-
}, labelBox.calendar.label), !isOpenCollapse ? React__default.createElement(fi.FiChevronDown, null) : React__default.createElement(fi.FiChevronUp, null)), React__default.createElement("div", {
|
|
28133
|
-
className: styles["select-filter-component"] + " " + (!isOpenCollapse && "" + styles["hidden"])
|
|
28134
|
-
}, React__default.createElement(reactstrap.Form, {
|
|
28135
|
-
className: "" + styles["box-select"]
|
|
28136
|
-
}, filterYearData.map(function (item) {
|
|
28137
|
-
return React__default.createElement(reactstrap.FormGroup, {
|
|
28138
|
-
check: true,
|
|
28139
|
-
className: "my-2 px-3"
|
|
28140
|
-
}, React__default.createElement(reactstrap.Input, {
|
|
28141
|
-
id: item.label + "filterYear",
|
|
28142
|
-
name: "filterYear",
|
|
28143
|
-
value: item.value,
|
|
28144
|
-
type: "radio",
|
|
28145
|
-
className: "" + styles["radio-btn"],
|
|
28146
|
-
checked: labelBox.calendar.value === item.value,
|
|
28147
|
-
onChange: function onChange() {
|
|
28148
|
-
return onChangeYear(item);
|
|
28149
|
-
}
|
|
28150
|
-
}), React__default.createElement(reactstrap.Label, {
|
|
28151
|
-
check: true,
|
|
28152
|
-
"for": item.label + "filterYear",
|
|
28153
|
-
className: "" + styles["box-select-label"]
|
|
28154
|
-
}, React__default.createElement("p", null, item.label)));
|
|
28155
|
-
}))));
|
|
28156
|
-
}
|
|
28157
|
-
|
|
28158
28133
|
if (name === FILTER_NAME.StartDate) {
|
|
28159
28134
|
return React__default.createElement("div", {
|
|
28160
28135
|
key: "" + name,
|
|
@@ -28168,23 +28143,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28168
28143
|
alt: labelBox.calendar.label
|
|
28169
28144
|
}), React__default.createElement("p", {
|
|
28170
28145
|
className: styles["color-filter"] + " my-0 mx-2"
|
|
28171
|
-
}, "Start Date", !!(filter !== null && filter !== void 0 && filter.startDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.startDate).format("DD/MM/YYYY"))), React__default.createElement("div", {
|
|
28146
|
+
}, "Start Date", !!(filter !== null && filter !== void 0 && filter.startDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.startDate).format("DD/MM/YYYY"))), isOpenCollapse && React__default.createElement("div", {
|
|
28172
28147
|
className: "" + styles["date-picker"]
|
|
28173
|
-
}, React__default.createElement(
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
id: "date-picker-dialog",
|
|
28181
|
-
format: "MM/dd/yyyy",
|
|
28182
|
-
onChange: handleChangeStartDate,
|
|
28183
|
-
value: filter === null || filter === void 0 ? void 0 : filter.startDate,
|
|
28184
|
-
KeyboardButtonProps: {
|
|
28185
|
-
"aria-label": "change date"
|
|
28186
|
-
}
|
|
28187
|
-
}))));
|
|
28148
|
+
}, React__default.createElement(DatePicker, {
|
|
28149
|
+
selected: moment(filter === null || filter === void 0 ? void 0 : filter.startDate).toDate(),
|
|
28150
|
+
onChange: function onChange(date) {
|
|
28151
|
+
return handleChangeStartDate(date);
|
|
28152
|
+
},
|
|
28153
|
+
inline: true
|
|
28154
|
+
})));
|
|
28188
28155
|
}
|
|
28189
28156
|
|
|
28190
28157
|
if (name === FILTER_NAME.EndDate) {
|
|
@@ -28200,23 +28167,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28200
28167
|
alt: labelBox.calendar.label
|
|
28201
28168
|
}), React__default.createElement("p", {
|
|
28202
28169
|
className: styles["color-filter"] + " my-0 mx-2"
|
|
28203
|
-
}, "End Date", !!(filter !== null && filter !== void 0 && filter.endDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.endDate).format("DD/MM/YYYY"))), React__default.createElement("div", {
|
|
28170
|
+
}, "End Date", !!(filter !== null && filter !== void 0 && filter.endDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.endDate).format("DD/MM/YYYY"))), isOpenCollapse && React__default.createElement("div", {
|
|
28204
28171
|
className: "" + styles["date-picker"]
|
|
28205
|
-
}, React__default.createElement(
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
|
|
28209
|
-
|
|
28210
|
-
|
|
28211
|
-
|
|
28212
|
-
id: "date-picker-dialog",
|
|
28213
|
-
format: "MM/dd/yyyy",
|
|
28214
|
-
onChange: handleChangeEndDate,
|
|
28215
|
-
value: filter === null || filter === void 0 ? void 0 : filter.endDate,
|
|
28216
|
-
KeyboardButtonProps: {
|
|
28217
|
-
"aria-label": "change date"
|
|
28218
|
-
}
|
|
28219
|
-
}))));
|
|
28172
|
+
}, React__default.createElement(DatePicker, {
|
|
28173
|
+
selected: moment(filter === null || filter === void 0 ? void 0 : filter.endDate).toDate(),
|
|
28174
|
+
onChange: function onChange(date) {
|
|
28175
|
+
return handleChangeEndDate(date);
|
|
28176
|
+
},
|
|
28177
|
+
inline: true
|
|
28178
|
+
})));
|
|
28220
28179
|
}
|
|
28221
28180
|
|
|
28222
28181
|
if (name === FILTER_NAME.Gender) {
|
|
@@ -28365,7 +28324,7 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28365
28324
|
}, React__default.createElement(TeacherItemSelector, {
|
|
28366
28325
|
onChange: function onChange(e) {
|
|
28367
28326
|
handleChangeFilters(e);
|
|
28368
|
-
!!changeCurrentTeacherUserId && changeCurrentTeacherUserId(e.teacherUserId || "");
|
|
28327
|
+
!!changeCurrentTeacherUserId && changeCurrentTeacherUserId((e === null || e === void 0 ? void 0 : e.teacherUserId) || "");
|
|
28369
28328
|
|
|
28370
28329
|
if (!(e !== null && e !== void 0 && e.label)) {
|
|
28371
28330
|
setTeacherName("");
|