mario-core 2.9.162-level → 2.9.163-level

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
@@ -62,6 +62,7 @@ import debounce from "./utils/debounce";
62
62
  import getFileUrl from "./utils/getFileUrl";
63
63
  import getTextFromHTML from "./utils/getTextFromHTML";
64
64
  import utcToLocalTime from "./utils/utcToLocalTime";
65
+ import getStaticFileUrl from "./utils/getStaticFileUrl";
65
66
  import { uploadFile, systemStudentBadge, systemCertificateUpload } from "./services/fileServices";
66
67
  import { setLoading, setModal, setAlert, setUser, reset, setCurrentStudentId, setCurrentStudentUserId, setCurrentStudentName, setTurnOffPassWhenChangeMode, showMenuBar, showFontSize, initAmplitude } from "./redux/commons/action";
67
68
  import { setClassList } from "./redux/classes/action";
@@ -109,4 +110,4 @@ import { setEnableIEP, setEnableSurvey, setConversationOneToOne, setLanguage } f
109
110
  import useFilters from "./hooks/useFilters";
110
111
  import amplitude from "amplitude-js";
111
112
  declare const amplitudeClient: amplitude.AmplitudeClient;
112
- export { Login, Dashboard, TheLayout, TheContent, NotFound, EmailTemplateList, EmailTemplateDetail, FaqList, SkillList, UserList, UserDetail, Loading, NotificationModal, CommonHeader, CommonModal, NotificationLogoutModal, AddButton, DeleteButtonIcon, EditButtonIcon, LinkEditButton, ToggleButton, EmptyDataAlert, CreatableSelector, CustomPagination, SearchBox, FileInput, QuitPrompt, QuestionTypeSelector, QuestionCategorySelector, SuggestionCategorySelector, CategorySelector, 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, setEnableIEP, setEnableSurvey, setConversationOneToOne, setLanguage, i18n, useTranslation, I18nextProvider, 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, NOTIFICATION_ALERT_KEY, 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, amplitudeClient, INIT_AMPLITUDE_KEY_STAGE, INIT_AMPLITUDE_KEY_PROD, isLocalhost };
113
+ export { Login, Dashboard, TheLayout, TheContent, NotFound, EmailTemplateList, EmailTemplateDetail, FaqList, SkillList, UserList, UserDetail, Loading, NotificationModal, CommonHeader, CommonModal, NotificationLogoutModal, AddButton, DeleteButtonIcon, EditButtonIcon, LinkEditButton, ToggleButton, EmptyDataAlert, CreatableSelector, CustomPagination, SearchBox, FileInput, QuitPrompt, QuestionTypeSelector, QuestionCategorySelector, SuggestionCategorySelector, CategorySelector, 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, setEnableIEP, setEnableSurvey, setConversationOneToOne, setLanguage, i18n, useTranslation, I18nextProvider, 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, NOTIFICATION_ALERT_KEY, 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, amplitudeClient, INIT_AMPLITUDE_KEY_STAGE, INIT_AMPLITUDE_KEY_PROD, isLocalhost, getStaticFileUrl };
package/dist/index.js CHANGED
@@ -3070,6 +3070,7 @@ var handleUserRole = function handleUserRole(userRoles) {
3070
3070
 
3071
3071
  return userRoles;
3072
3072
  };
3073
+ var MARIO_SUCCESS_BASE_URL = "https://mariosuccess.com";
3073
3074
 
3074
3075
  var getAccessToken = (function () {
3075
3076
  try {
@@ -12403,6 +12404,14 @@ var getTextFromHTML = function getTextFromHTML(htmlString) {
12403
12404
  return text;
12404
12405
  };
12405
12406
 
12407
+ var getStaticFileUrl = function getStaticFileUrl(url) {
12408
+ var STAGE_DOMAIN = "https://stage.marioforme.com";
12409
+ var isStage = STAGE_DOMAIN === location.origin;
12410
+ if (!url) return "";
12411
+ if (isLocalhost && !isStage || url.startsWith("http")) return url;
12412
+ if (url.startsWith("/")) return "" + (isStage ? STAGE_DOMAIN : MARIO_SUCCESS_BASE_URL) + url;else return (isStage ? STAGE_DOMAIN : MARIO_SUCCESS_BASE_URL) + "/" + url;
12413
+ };
12414
+
12406
12415
  var generateRandomString = (function () {
12407
12416
  return (Math.random() + 1).toString(36).substring(7);
12408
12417
  });
@@ -12506,6 +12515,7 @@ exports.firstCheckToken = firstCheckToken;
12506
12515
  exports.generateRandomString = generateRandomString;
12507
12516
  exports.getFileUrl = getFileUrl;
12508
12517
  exports.getInfo = getInfo;
12518
+ exports.getStaticFileUrl = getStaticFileUrl;
12509
12519
  exports.getTextFromHTML = getTextFromHTML;
12510
12520
  exports.i18n = i18n;
12511
12521
  exports.initAmplitude = initAmplitude;