mario-core 2.6.7 → 2.7.1

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.
@@ -43,7 +43,7 @@ function _catch(body, recover) {
43
43
  return result;
44
44
  }
45
45
 
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","block-form":"_2e7fZ","hide-in-desktop":"_2LIqK","control-input":"_2Zz97","custom-control":"_3-yp5"};
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"};
47
47
 
48
48
  var style = {
49
49
  fontSize: "0.85rem"
@@ -226,6 +226,7 @@ var setUser = createAction("common/setUser");
226
226
  var setSidebar = createAction("common/setSidebar");
227
227
  var setAlert = createAction("common/setAlert");
228
228
  var reset = createAction("common/reset");
229
+ var showMenuBar = createAction("common/showMenuBar");
229
230
  var setCurrentStudentId = createAction("common/setCurrentStudentId");
230
231
  var setCurrentStudentUserId = createAction("common/setCurrentStudentUserId");
231
232
  var setCurrentStudentName = createAction("common/setCurrentStudentName");
@@ -533,16 +534,20 @@ var BlockLogin = function BlockLogin(_ref) {
533
534
  className: "" + styles["btn-login"],
534
535
  type: "submit"
535
536
  }, "LOGIN")), React.createElement("div", {
536
- className: "d-flex justify-content-end"
537
+ className: "d-flex justify-content-between"
537
538
  }, React.createElement(Link, {
538
539
  to: "/forgot-password",
539
540
  className: "" + styles["link-to-login"]
540
- }, "Forgot password ?"))))), React.createElement(Col, {
541
+ }, "Forgot password?"), React.createElement("a", {
542
+ href: "https://marioframework.com/privacy-policy/",
543
+ target: "blank",
544
+ className: "" + styles["link-to-login"]
545
+ }, "Privacy Policy"))))), React.createElement(Col, {
541
546
  lg: 4,
542
547
  md: 4,
543
548
  className: "" + styles["img-box"]
544
549
  }, React.createElement("img", {
545
- src: "/images/img-login.png",
550
+ src: "/images/img-login.jpg",
546
551
  className: "" + styles["img-login"]
547
552
  })));
548
553
  });
@@ -770,16 +775,20 @@ var BlockForgetPassword = function BlockForgetPassword() {
770
775
  return handleSubmit();
771
776
  }
772
777
  }, "Continue")), React.createElement("p", {
773
- className: "d-flex justify-content-end"
778
+ className: "d-flex justify-content-between"
774
779
  }, React.createElement(Link, {
775
780
  to: "/login",
776
781
  className: "" + styles["link-to-login"]
777
- }, "Return to login"))))), React.createElement(Col, {
782
+ }, "Return to login"), React.createElement("a", {
783
+ href: "https://marioframework.com/privacy-policy/",
784
+ target: "blank",
785
+ className: "" + styles["link-to-login"]
786
+ }, "Privacy Policy"))))), React.createElement(Col, {
778
787
  lg: 4,
779
788
  md: 4,
780
789
  className: "" + styles["img-box"]
781
790
  }, React.createElement("img", {
782
- src: "/images/img-login.png",
791
+ src: "/images/img-login.jpg",
783
792
  className: "" + styles["img-login"]
784
793
  })));
785
794
  });
@@ -876,16 +885,20 @@ var BlockResetPassword = function BlockResetPassword() {
876
885
  return handleSubmit();
877
886
  }
878
887
  }, "Confirm")), React.createElement("p", {
879
- className: "d-flex justify-content-end"
888
+ className: "d-flex justify-content-between"
880
889
  }, React.createElement(Link, {
881
890
  to: "/login",
882
891
  className: "" + styles["link-to-login"]
883
- }, "Return to login"))))), React.createElement(Col, {
892
+ }, "Return to login"), React.createElement("a", {
893
+ href: "https://marioframework.com/privacy-policy/",
894
+ target: "blank",
895
+ className: "" + styles["link-to-login"]
896
+ }, "Privacy Policy"))))), React.createElement(Col, {
884
897
  lg: 4,
885
898
  md: 4,
886
899
  className: "" + styles["img-box"]
887
900
  }, React.createElement("img", {
888
- src: "/images/img-login.png",
901
+ src: "/images/img-login.jpg",
889
902
  className: "" + styles["img-login"]
890
903
  })));
891
904
  });
@@ -1113,16 +1126,20 @@ var BlockTwoFactorLogin = function BlockTwoFactorLogin() {
1113
1126
  return handleSubmit();
1114
1127
  }
1115
1128
  }, "Confirm")), React.createElement("p", {
1116
- className: "d-flex justify-content-end"
1129
+ className: "d-flex justify-content-between"
1117
1130
  }, React.createElement(Link, {
1118
1131
  to: "/login",
1119
1132
  className: "" + styles["link-to-login"]
1120
- }, "Return to login"))))), React.createElement(Col, {
1133
+ }, "Return to login"), React.createElement("a", {
1134
+ href: "https://marioframework.com/privacy-policy/",
1135
+ target: "blank",
1136
+ className: "" + styles["link-to-login"]
1137
+ }, "Privacy Policy"))))), React.createElement(Col, {
1121
1138
  lg: 4,
1122
1139
  md: 4,
1123
1140
  className: "" + styles["img-box"]
1124
1141
  }, React.createElement("img", {
1125
- src: "/images/img-login.png",
1142
+ src: "/images/img-login.jpg",
1126
1143
  className: "" + styles["img-login"]
1127
1144
  })));
1128
1145
  });
@@ -4060,6 +4077,8 @@ var TITLE$8 = "User list";
4060
4077
 
4061
4078
  var useUserList = function useUserList() {
4062
4079
  var history = useHistory();
4080
+ var query = new URLSearchParams(location.search);
4081
+ var fullName = query.get("query");
4063
4082
  var userList = useSelector(function (state) {
4064
4083
  return state.users.userList;
4065
4084
  });
@@ -4110,6 +4129,11 @@ var useUserList = function useUserList() {
4110
4129
  useEffect(function () {
4111
4130
  getData();
4112
4131
  }, [filters]);
4132
+ useEffect(function () {
4133
+ changeFilters({
4134
+ searchString: fullName
4135
+ });
4136
+ }, [fullName]);
4113
4137
  var removeData = useCallback(function (id) {
4114
4138
  dispatch(setLoading(true));
4115
4139
 
@@ -4155,6 +4179,7 @@ var useUserList = function useUserList() {
4155
4179
  userList: userList,
4156
4180
  totalItems: totalItems,
4157
4181
  filters: filters,
4182
+ fullName: fullName,
4158
4183
  getData: getData,
4159
4184
  removeData: removeData,
4160
4185
  changeFilters: changeFilters,
@@ -4231,6 +4256,7 @@ var header$2 = "User";
4231
4256
 
4232
4257
  var UserList = function UserList() {
4233
4258
  var _useUserList = useUserList(),
4259
+ fullName = _useUserList.fullName,
4234
4260
  userList = _useUserList.userList,
4235
4261
  totalItems = _useUserList.totalItems,
4236
4262
  filters = _useUserList.filters,
@@ -4251,7 +4277,7 @@ var UserList = function UserList() {
4251
4277
  onClick: function onClick() {
4252
4278
  return reDirectDetailPage();
4253
4279
  },
4254
- initValue: "",
4280
+ initValue: !!fullName ? fullName : '',
4255
4281
  onSearch: function onSearch(searchString) {
4256
4282
  return changeFilters({
4257
4283
  searchString: searchString
@@ -4490,8 +4516,8 @@ var useUserDetail = function useUserDetail(id) {
4490
4516
  return Promise.reject(e);
4491
4517
  }
4492
4518
  }, [id]);
4493
- var backToList = useCallback(function () {
4494
- history.push(USER_LIST_URL);
4519
+ var backToList = useCallback(function (user) {
4520
+ !!user ? history.push(USER_LIST_URL + ("?query=" + user)) : history.push(USER_LIST_URL);
4495
4521
  }, []);
4496
4522
  var confirmData = useCallback(function (data) {
4497
4523
  try {
@@ -4505,12 +4531,17 @@ var useUserDetail = function useUserDetail(id) {
4505
4531
  function _temp6() {
4506
4532
  var next = !!id ? update$3 : create$3;
4507
4533
  !id && delete data.id;
4508
- return Promise.resolve(next(data)).then(function () {
4534
+ return Promise.resolve(next(data)).then(function (result) {
4535
+ if (!!result) {
4536
+ getById$3(result.data.id).then(function (e) {
4537
+ backToList(e.data.fullName);
4538
+ });
4539
+ }
4540
+
4509
4541
  dispatch(setAlert({
4510
4542
  type: "success",
4511
4543
  message: (!!id ? "Update" : "Create") + " user successfully"
4512
4544
  }));
4513
- backToList();
4514
4545
  });
4515
4546
  }
4516
4547
 
@@ -6600,7 +6631,8 @@ var initialState = {
6600
6631
  currentStudentId: parseInt((_localStorage$getItem = localStorage.getItem("currentStudentId")) != null ? _localStorage$getItem : "0"),
6601
6632
  currentStudentUserId: localStorage.getItem("currentStudentUserId") || "",
6602
6633
  currentStudentName: localStorage.getItem("currentStudentName") || "",
6603
- turnOffPassWhenChangeMode: false
6634
+ turnOffPassWhenChangeMode: false,
6635
+ menuBar: true
6604
6636
  };
6605
6637
  var commonReducer = createReducer(initialState, function (builder) {
6606
6638
  builder.addCase(setLoading, function (state, action) {
@@ -6626,6 +6658,8 @@ var commonReducer = createReducer(initialState, function (builder) {
6626
6658
  state.currentStudentName = action.payload;
6627
6659
  }).addCase(setTurnOffPassWhenChangeMode, function (state, action) {
6628
6660
  state.turnOffPassWhenChangeMode = action.payload;
6661
+ }).addCase(showMenuBar, function (state, action) {
6662
+ state.menuBar = action.payload;
6629
6663
  });
6630
6664
  });
6631
6665
 
@@ -7536,5 +7570,5 @@ var generateRandomString = (function () {
7536
7570
  return (Math.random() + 1).toString(36).substring(7);
7537
7571
  });
7538
7572
 
7539
- 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, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
7573
+ 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, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
7540
7574
  //# sourceMappingURL=index.modern.js.map