mario-core 2.9.11-beta → 2.9.12-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/index.d.ts CHANGED
@@ -58,7 +58,7 @@ import getFileUrl from "./utils/getFileUrl";
58
58
  import getTextFromHTML from "./utils/getTextFromHTML";
59
59
  import utcToLocalTime from "./utils/utcToLocalTime";
60
60
  import { uploadFile, systemStudentBadge, systemCertificateUpload } from "./services/fileServices";
61
- import { setLoading, setModal, setAlert, setUser, reset, setCurrentStudentId, setCurrentStudentUserId, setCurrentStudentName, setTurnOffPassWhenChangeMode, showMenuBar, showFontSize } from "./redux/commons/action";
61
+ import { setLoading, setModal, setAlert, setUser, reset, setCurrentStudentId, setCurrentStudentUserId, setCurrentStudentName, setTurnOffPassWhenChangeMode, showMenuBar, showFontSize, initAmplitude } from "./redux/commons/action";
62
62
  import { setClassList } from "./redux/classes/action";
63
63
  import { setConferenceRubricList } from "./redux/conferenceRubrics/action";
64
64
  import { setSuggestionList } from "./redux/suggestionBanks/action";
@@ -101,4 +101,4 @@ import { setFilterWidget } from "./redux/widget/action";
101
101
  import { setBandScoreList } from "./redux/bandScores/action";
102
102
  import { setStudentIdSelectedByTeacher } from "./redux/navMobile/action";
103
103
  import useFilters from "./hooks/useFilters";
104
- export { Login, Dashboard, TheLayout, TheContent, NotFound, EmailTemplateList, EmailTemplateDetail, FaqList, SkillList, UserList, UserDetail, Loading, NotificationModal, CommonHeader, CommonModal, AddButton, DeleteButtonIcon, EditButtonIcon, LinkEditButton, ToggleButton, EmptyDataAlert, CreatableSelector, CustomPagination, SearchBox, FileInput, QuitPrompt, QuestionTypeSelector, QuestionCategorySelector, SuggestionCategorySelector, ErrorHandler, DetailActionButtons, RequiredLabel, StarRatingSelector, ReactNotification, NotificationList, CustomSelector, UploadFileButton, SearchBoxContainer, CustomTab, CommonAlert, GalleryList, MediaList, useGalleryList, AcademicClassSelector, SchoolList, store, showMenuBar, showFontSize, setLoading, setModal, setAlert, setClassList, setConferenceRubricList, setSuggestionList, setStrategyList, setSubjectList, setLearningSupportCategoryList, setQuestionList, setUserList, setStudentList, setBadgeList, setGoalExampleList, setSemesterList, setFeedbackList, setAssessmentList, setQuestionByCategory, setSelectQuestion, setMoveItemQuestion, setReflectionList, setReflectionResultList, setEditItemQuesion, setResetQuestionList, setMailCategory, setUser, setAssignmentList, setAssistantList, setSessionTemplateList, setTutorialScreenList, setSessionTemplateGeneralClassList, setCustomAlertList, setCertificateList, closeTab, addTab, editTab, clearTab, changeNote, changeTags, answerQuestion, setSessionPlayer, setStartTime, setTurnOffPassWhenChangeMode, reset, setImproveMyClass, setSchoolBlankDayList, api, apiUpload, uploadFile, systemStudentBadge, systemCertificateUpload, BASE_URL, DEFAULT_FILTER, LICENSE_AGGRID, TINY_MCE_API_KEY, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, ANSWER_EDITOR_HEIGHT, CHAT_CHANNEL, NOTIFICATION_CHANNEL, DATE_RESULT, DATE_FORMAT, FULL_DATE_RESULT, ACCESS_TOKEN, GOOGLE_RECAPTCHA_KEY, EMOTIONS, TAB_COLORS, Filter, Conversation, Message, ConversationMember, NavbarTab, editorConfig, generateRandomString, isInViewport, debounce, firstCheckToken, canAccessRoute, getFileUrl, getTextFromHTML, utcToLocalTime, getInfo, Images, setQuestionCateList, setMyStudent, setDataPlayer, answerQuestionDataPlayer, setCurrentStudentUserId, setCurrentStudentId, setCurrentStudentName, setFilterWidget, setBandScoreList, setStudentIdSelectedByTeacher, useFilters, ScrollToTop };
104
+ export { Login, Dashboard, TheLayout, TheContent, NotFound, EmailTemplateList, EmailTemplateDetail, FaqList, SkillList, UserList, UserDetail, Loading, NotificationModal, CommonHeader, CommonModal, AddButton, DeleteButtonIcon, EditButtonIcon, LinkEditButton, ToggleButton, EmptyDataAlert, CreatableSelector, CustomPagination, SearchBox, FileInput, QuitPrompt, QuestionTypeSelector, QuestionCategorySelector, SuggestionCategorySelector, ErrorHandler, DetailActionButtons, RequiredLabel, StarRatingSelector, ReactNotification, NotificationList, CustomSelector, UploadFileButton, SearchBoxContainer, CustomTab, CommonAlert, GalleryList, MediaList, useGalleryList, AcademicClassSelector, SchoolList, store, showMenuBar, showFontSize, setLoading, setModal, setAlert, setClassList, setConferenceRubricList, setSuggestionList, setStrategyList, setSubjectList, setLearningSupportCategoryList, setQuestionList, setUserList, setStudentList, setBadgeList, setGoalExampleList, setSemesterList, setFeedbackList, setAssessmentList, setQuestionByCategory, setSelectQuestion, setMoveItemQuestion, setReflectionList, setReflectionResultList, setEditItemQuesion, setResetQuestionList, setMailCategory, setUser, setAssignmentList, setAssistantList, setSessionTemplateList, setTutorialScreenList, setSessionTemplateGeneralClassList, setCustomAlertList, setCertificateList, closeTab, addTab, editTab, clearTab, changeNote, changeTags, answerQuestion, setSessionPlayer, setStartTime, setTurnOffPassWhenChangeMode, reset, setImproveMyClass, setSchoolBlankDayList, api, apiUpload, uploadFile, systemStudentBadge, systemCertificateUpload, BASE_URL, DEFAULT_FILTER, LICENSE_AGGRID, TINY_MCE_API_KEY, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, ANSWER_EDITOR_HEIGHT, CHAT_CHANNEL, NOTIFICATION_CHANNEL, DATE_RESULT, DATE_FORMAT, FULL_DATE_RESULT, ACCESS_TOKEN, GOOGLE_RECAPTCHA_KEY, EMOTIONS, TAB_COLORS, Filter, Conversation, Message, ConversationMember, NavbarTab, editorConfig, generateRandomString, isInViewport, debounce, firstCheckToken, canAccessRoute, getFileUrl, getTextFromHTML, utcToLocalTime, getInfo, Images, setQuestionCateList, setMyStudent, setDataPlayer, answerQuestionDataPlayer, setCurrentStudentUserId, setCurrentStudentId, setCurrentStudentName, setFilterWidget, setBandScoreList, setStudentIdSelectedByTeacher, useFilters, ScrollToTop, initAmplitude };
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ var ReactNotification$1 = _interopDefault(require('react-notifications-component
28
28
  require('react-notifications-component/dist/theme.css');
29
29
  var ai = require('react-icons/ai');
30
30
  var moment = _interopDefault(require('moment'));
31
+ var amplitude = _interopDefault(require('amplitude-js'));
31
32
 
32
33
  // A type of promise-like that resolves synchronously and supports only one observer
33
34
 
@@ -237,6 +238,7 @@ var setCurrentStudentId = toolkit.createAction("common/setCurrentStudentId");
237
238
  var setCurrentStudentUserId = toolkit.createAction("common/setCurrentStudentUserId");
238
239
  var setCurrentStudentName = toolkit.createAction("common/setCurrentStudentName");
239
240
  var setTurnOffPassWhenChangeMode = toolkit.createAction("common/setTurnOffPassWhenChangeMode");
241
+ var initAmplitude = toolkit.createAction("common/initAmplitude");
240
242
 
241
243
  var encodeParams = (function (params) {
242
244
  return Object.keys(params).filter(function (key) {
@@ -6770,6 +6772,20 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
6770
6772
  state.menuBar = action.payload;
6771
6773
  }).addCase(showFontSize, function (state, action) {
6772
6774
  state.defaultFontSize = action.payload;
6775
+ }).addCase(initAmplitude, function (_state, action) {
6776
+ var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7;
6777
+
6778
+ amplitude.getInstance().init("860fa99c52ae79d98e904b4c862ddaac", action.payload.name);
6779
+ var eventProperties = {
6780
+ user_id: action.payload.name,
6781
+ status: (_action$payload = action.payload) !== null && _action$payload !== void 0 && _action$payload.status ? (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.status : "",
6782
+ student_id: (_action$payload3 = action.payload) !== null && _action$payload3 !== void 0 && _action$payload3.student_id ? action.payload.student_id : "",
6783
+ page: (_action$payload4 = action.payload) !== null && _action$payload4 !== void 0 && _action$payload4.page ? action.payload.page : "",
6784
+ part: (_action$payload5 = action.payload) !== null && _action$payload5 !== void 0 && _action$payload5.part ? action.payload.part : "",
6785
+ iep_date: (_action$payload6 = action.payload) !== null && _action$payload6 !== void 0 && _action$payload6.iep_date ? action.payload.iep_date : null,
6786
+ saved: typeof ((_action$payload7 = action.payload) === null || _action$payload7 === void 0 ? void 0 : _action$payload7.saved) == "boolean" ? action.payload.saved : null
6787
+ };
6788
+ amplitude.getInstance().logEvent(action.payload.event, eventProperties);
6773
6789
  });
6774
6790
  });
6775
6791
 
@@ -7760,6 +7776,7 @@ exports.generateRandomString = generateRandomString;
7760
7776
  exports.getFileUrl = getFileUrl;
7761
7777
  exports.getInfo = getInfo;
7762
7778
  exports.getTextFromHTML = getTextFromHTML;
7779
+ exports.initAmplitude = initAmplitude;
7763
7780
  exports.isInViewport = isInViewport;
7764
7781
  exports.reset = reset;
7765
7782
  exports.setAlert = setAlert;