mario-core 2.9.7 → 2.9.10-beta
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/components/Scroll/ScrollToTop.d.ts +3 -0
- package/dist/index.css +39 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +56 -39
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +57 -41
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -8,7 +8,9 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
8
8
|
import { createAction, createReducer, configureStore } from '@reduxjs/toolkit';
|
|
9
9
|
import axios from 'axios';
|
|
10
10
|
import { useGoogleReCaptcha, GoogleReCaptcha, GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';
|
|
11
|
-
import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle,
|
|
11
|
+
import { CSidebar, CSidebarBrand, CSidebarNav, CCreateElement, CSidebarNavDivider, CSidebarNavDropdown, CSidebarNavItem, CSidebarNavTitle, CSidebarFooter, CHeader, CHeaderBrand, CHeaderNav, CContainer } from '@coreui/react';
|
|
12
|
+
import { CgMenuRight } from 'react-icons/cg';
|
|
13
|
+
import { RiLogoutBoxRLine } from 'react-icons/ri';
|
|
12
14
|
import Pusher from 'pusher-js/with-encryption';
|
|
13
15
|
import { FaPlus, FaTrashAlt, FaRegEdit, FaArrowLeft, FaDownload, FaTrash, FaEdit, FaFolderPlus, FaFileUpload } from 'react-icons/fa';
|
|
14
16
|
import Select from 'react-select';
|
|
@@ -43,7 +45,7 @@ function _catch(body, recover) {
|
|
|
43
45
|
return result;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
var styles = {"notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","descriptions-icon":"_3SOdX","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","checkbox-remember":"_2K9b2","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","red-background":"_jOY7o","login":"_F-hjL","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","sidebar-logo":"_1hXpy","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","hide-in-mobile":"_1INnO","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
|
|
48
|
+
var styles = {"notification-count":"_2sew7","text-introduction":"_3OgWF","btn-trans-border":"_r9cAh","contact":"_NszFe","learn-more":"_MDjzH","title-quote":"_1Swkw","descriptions-quote":"_gi8vj","descriptions-icon":"_3SOdX","box-login":"_38Lo1","block-verification":"_1OzGy","block-login":"_wWIyO","title-login":"_3nuns","title-forgot-password":"_21qb6","btn-close":"_NhW9l","btn-login":"_3IL10","return-to-login":"_Ce3Kg","recover-account":"_2t6d9","link-to-login":"_3bDsd","remember":"_11FZt","term-and-conditions":"_3LXoI","descriptions-forgot-pass":"_PMcjT","content-icon":"_2rZY6","title-icon":"_y9lM2","nav-home":"_1TT1q","box-introduction":"_32V6L","icon":"_20YJX","form-user-name":"_39BJD","checkbox-remember":"_2K9b2","block-reset-password":"_23Sua","block-forgot-pass":"_3CWP6","page-not-login":"_3Wmco","content-quote":"_13Rk0","home-page":"_o6HKW","red-background":"_jOY7o","login":"_F-hjL","img-box":"_2v-L_","img-login":"_3ncTL","img-login-rectangle":"_2kOvJ","c-main":"_39l0X","container-fluid":"_1BMwK","input-file-label":"_1XNpH","delete-avatar-button":"_1z5h9","header-logo":"_Gewcf","box-sidebar":"_2vcmv","sidebar-logo":"_1hXpy","sidebar-nav-links":"_3vb3s","c-active":"_36jSM","sidebar-nav-links-hover":"_DNrus","box-sidebar-header":"_3NEZj","box-logout":"_1wUDG","sidebar-btn-minimized":"_1S7Px","sidebar-logout":"_2P85D","nav-mobile":"_1qjbW","filter-media-file":"_1I62C","div":"_3cLcM","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","logout":"_1_9tV","content-text":"_3S4f2","hide-in-mobile":"_1INnO","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
|
|
47
49
|
|
|
48
50
|
var style = {
|
|
49
51
|
fontSize: "0.85rem"
|
|
@@ -381,7 +383,7 @@ var useLogin = function useLogin() {
|
|
|
381
383
|
history.push(HOMEPAGE_DISTRICT);
|
|
382
384
|
} else if (roles.includes("Admin")) {
|
|
383
385
|
history.push(HOMEPAGE_ADMIN);
|
|
384
|
-
} else if (roles.includes("Teacher")) {
|
|
386
|
+
} else if (roles.includes("Teacher") || roles.includes("Assistant")) {
|
|
385
387
|
history.push(HOMEPAGE_TEACHER);
|
|
386
388
|
} else if (roles.includes("Student")) {
|
|
387
389
|
history.push(HOMEPAGE_STUDENT);
|
|
@@ -1136,9 +1138,9 @@ var Dashboard = function Dashboard() {
|
|
|
1136
1138
|
var Images = {
|
|
1137
1139
|
USER_CONVERSATION_AVATAR: "images/user.png",
|
|
1138
1140
|
GROUP_CONVERSATION_AVATAR: "images/group.png",
|
|
1139
|
-
LOGO: "images/
|
|
1141
|
+
LOGO: "images/logoV1-1.png",
|
|
1140
1142
|
LOGO_HEADER: "images/logo-header.png",
|
|
1141
|
-
LOGO_MINIMIZED: "images/logo-
|
|
1143
|
+
LOGO_MINIMIZED: "images/logo-small.png",
|
|
1142
1144
|
DOCS_IMAGE: "images/docs.png",
|
|
1143
1145
|
AUDIO_IMAGE: "images/audio.png",
|
|
1144
1146
|
PHOTO_IMAGE: "images/image.png",
|
|
@@ -1150,24 +1152,46 @@ var Images = {
|
|
|
1150
1152
|
var TheSidebar = function TheSidebar(_ref) {
|
|
1151
1153
|
var navigation = _ref.navigation;
|
|
1152
1154
|
var dispatch = useDispatch();
|
|
1155
|
+
var history = useHistory();
|
|
1153
1156
|
var show = useSelector(function (state) {
|
|
1154
1157
|
return state.common.sidebarShow;
|
|
1155
1158
|
});
|
|
1159
|
+
|
|
1160
|
+
var _useState = useState(false),
|
|
1161
|
+
toggleMinimize = _useState[0],
|
|
1162
|
+
setToggleMinimize = _useState[1];
|
|
1163
|
+
|
|
1164
|
+
var signOut = useCallback(function () {
|
|
1165
|
+
localStorage.removeItem(ACCESS_TOKEN);
|
|
1166
|
+
dispatch(reset());
|
|
1167
|
+
history.push("/");
|
|
1168
|
+
}, []);
|
|
1156
1169
|
return React.createElement(CSidebar, {
|
|
1157
1170
|
show: show,
|
|
1158
1171
|
onShowChange: function onShowChange(val) {
|
|
1159
1172
|
return dispatch(setSidebar(val));
|
|
1160
|
-
}
|
|
1173
|
+
},
|
|
1174
|
+
minimize: toggleMinimize,
|
|
1175
|
+
className: "" + styles["box-sidebar"]
|
|
1161
1176
|
}, React.createElement(CSidebarBrand, {
|
|
1162
|
-
className: "d-md-down-none"
|
|
1163
|
-
|
|
1164
|
-
}, React.createElement("img", {
|
|
1177
|
+
className: styles["box-sidebar-header"] + " d-md-down-none justify-content-around"
|
|
1178
|
+
}, React.createElement("div", null, React.createElement("img", {
|
|
1165
1179
|
src: Images.LOGO,
|
|
1166
1180
|
className: styles["sidebar-logo"] + " c-sidebar-brand-full"
|
|
1167
1181
|
}), React.createElement("img", {
|
|
1168
1182
|
src: Images.LOGO_MINIMIZED,
|
|
1169
|
-
className: styles["sidebar-logo"] + " c-sidebar-brand-minimized"
|
|
1170
|
-
|
|
1183
|
+
className: styles["sidebar-logo"] + " " + styles["sidebar-btn-minimized"] + " c-sidebar-brand-minimized",
|
|
1184
|
+
onClick: function onClick() {
|
|
1185
|
+
return setToggleMinimize(false);
|
|
1186
|
+
}
|
|
1187
|
+
})), React.createElement(CgMenuRight, {
|
|
1188
|
+
className: styles["sidebar-btn-minimized"] + " c-sidebar-brand-full",
|
|
1189
|
+
onClick: function onClick() {
|
|
1190
|
+
return setToggleMinimize(true);
|
|
1191
|
+
}
|
|
1192
|
+
})), React.createElement(CSidebarNav, {
|
|
1193
|
+
className: styles["sidebar-nav-links"] + " " + (toggleMinimize && styles["sidebar-nav-links-hover"])
|
|
1194
|
+
}, React.createElement(CCreateElement, {
|
|
1171
1195
|
items: navigation,
|
|
1172
1196
|
components: {
|
|
1173
1197
|
CSidebarNavDivider: CSidebarNavDivider,
|
|
@@ -1175,10 +1199,15 @@ var TheSidebar = function TheSidebar(_ref) {
|
|
|
1175
1199
|
CSidebarNavItem: CSidebarNavItem,
|
|
1176
1200
|
CSidebarNavTitle: CSidebarNavTitle
|
|
1177
1201
|
}
|
|
1178
|
-
})), React.createElement(
|
|
1179
|
-
|
|
1180
|
-
className: "
|
|
1181
|
-
}
|
|
1202
|
+
})), React.createElement(CSidebarFooter, {
|
|
1203
|
+
onClick: signOut,
|
|
1204
|
+
className: styles["box-logout"] + " p-3 d-flex align-items-center cursor-point"
|
|
1205
|
+
}, React.createElement(RiLogoutBoxRLine, {
|
|
1206
|
+
onClick: signOut,
|
|
1207
|
+
className: "" + styles["sidebar-logout"]
|
|
1208
|
+
}), React.createElement("p", {
|
|
1209
|
+
onClick: signOut
|
|
1210
|
+
}, "Log out")));
|
|
1182
1211
|
};
|
|
1183
1212
|
|
|
1184
1213
|
var setNotification = createAction("notifications/setNotification");
|
|
@@ -1387,34 +1416,11 @@ var TheHeaderDropdown = function TheHeaderDropdown() {
|
|
|
1387
1416
|
};
|
|
1388
1417
|
|
|
1389
1418
|
var TheHeader = function TheHeader() {
|
|
1390
|
-
var dispatch = useDispatch();
|
|
1391
|
-
var sidebarShow = useSelector(function (state) {
|
|
1392
|
-
return state.common.sidebarShow;
|
|
1393
|
-
});
|
|
1394
|
-
|
|
1395
|
-
var toggleSidebar = function toggleSidebar() {
|
|
1396
|
-
var val = [true, "responsive"].includes(sidebarShow) ? false : "responsive";
|
|
1397
|
-
dispatch(setSidebar(val));
|
|
1398
|
-
};
|
|
1399
|
-
|
|
1400
|
-
var toggleSidebarMobile = function toggleSidebarMobile() {
|
|
1401
|
-
var val = [false, "responsive"].includes(sidebarShow) ? true : "responsive";
|
|
1402
|
-
dispatch(setSidebar(val));
|
|
1403
|
-
};
|
|
1404
|
-
|
|
1405
1419
|
var isDistrict = window.location.host.includes("-district");
|
|
1406
1420
|
return React.createElement(CHeader, {
|
|
1407
1421
|
withSubheader: true,
|
|
1408
|
-
className: "d-flex align-items-center justify-content-
|
|
1409
|
-
}, React.createElement(
|
|
1410
|
-
inHeader: true,
|
|
1411
|
-
className: "ml-md-3 d-lg-none",
|
|
1412
|
-
onClick: toggleSidebarMobile
|
|
1413
|
-
}), React.createElement(CToggler, {
|
|
1414
|
-
inHeader: true,
|
|
1415
|
-
className: "ml-3 d-md-down-none",
|
|
1416
|
-
onClick: toggleSidebar
|
|
1417
|
-
}), React.createElement(CHeaderBrand, {
|
|
1422
|
+
className: "d-flex align-items-center justify-content-end"
|
|
1423
|
+
}, React.createElement(CHeaderBrand, {
|
|
1418
1424
|
className: "mx-auto flex-grow-1 d-lg-none",
|
|
1419
1425
|
to: "/"
|
|
1420
1426
|
}, React.createElement("img", {
|
|
@@ -4865,6 +4871,16 @@ var UserDetail = function UserDetail() {
|
|
|
4865
4871
|
});
|
|
4866
4872
|
};
|
|
4867
4873
|
|
|
4874
|
+
var ScrollToTop = function ScrollToTop() {
|
|
4875
|
+
var _useLocation = useLocation(),
|
|
4876
|
+
pathname = _useLocation.pathname;
|
|
4877
|
+
|
|
4878
|
+
useEffect(function () {
|
|
4879
|
+
window.scrollTo(0, 0);
|
|
4880
|
+
}, [pathname]);
|
|
4881
|
+
return null;
|
|
4882
|
+
};
|
|
4883
|
+
|
|
4868
4884
|
var modalInfo = function modalInfo(type) {
|
|
4869
4885
|
switch (type) {
|
|
4870
4886
|
case "danger":
|
|
@@ -7659,5 +7675,5 @@ var generateRandomString = (function () {
|
|
|
7659
7675
|
return (Math.random() + 1).toString(36).substring(7);
|
|
7660
7676
|
});
|
|
7661
7677
|
|
|
7662
|
-
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
7678
|
+
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, ScrollToTop, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
7663
7679
|
//# sourceMappingURL=index.modern.js.map
|