mario-core 2.9.20-suffix → 2.9.23-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.
@@ -1,4 +1,5 @@
1
1
  import 'bootstrap/dist/css/bootstrap.min.css';
2
+ import amplitude from 'amplitude-js';
2
3
  import React, { useState, useCallback, useEffect, forwardRef, useRef, Suspense, useMemo, memo, Fragment, useImperativeHandle } from 'react';
3
4
  import { Input, Modal, ModalHeader, ModalBody, ModalFooter, Button, Row, Col, Form, FormGroup, Label, Dropdown, DropdownToggle, DropdownMenu, NavLink, DropdownItem, Alert, Pagination, PaginationItem, PaginationLink, Table, CustomInput, Nav, NavItem, TabContent, TabPane, Card, CardImg, CardBody, CardTitle, CardHeader, CardText } from 'reactstrap';
4
5
  import { useHistory, Link, useLocation, Switch, Route, Prompt, useParams } from 'react-router-dom';
@@ -26,82 +27,6 @@ import ReactNotification$1 from 'react-notifications-component';
26
27
  import 'react-notifications-component/dist/theme.css';
27
28
  import { AiOutlineEye } from 'react-icons/ai';
28
29
  import moment from 'moment';
29
- import amplitude from 'amplitude-js';
30
-
31
- // A type of promise-like that resolves synchronously and supports only one observer
32
-
33
- const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
34
-
35
- const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
36
-
37
- // Asynchronously call a function and send errors to recovery continuation
38
- function _catch(body, recover) {
39
- try {
40
- var result = body();
41
- } catch(e) {
42
- return recover(e);
43
- }
44
- if (result && result.then) {
45
- return result.then(void 0, recover);
46
- }
47
- return result;
48
- }
49
-
50
- var styles = {"btn-login-google":"_2HqmH","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"};
51
-
52
- var style = {
53
- fontSize: "0.85rem"
54
- };
55
-
56
- var ErrorHandler = function ErrorHandler(_ref) {
57
- var text = _ref.text;
58
- return React.createElement("p", {
59
- className: "text-danger",
60
- style: style
61
- }, text);
62
- };
63
-
64
- var containerStyle = {
65
- height: "40px",
66
- backgroundColor: "#f7f9fc",
67
- borderRadius: "4px",
68
- marginBottom: "5px",
69
- position: "relative"
70
- };
71
- var inputStyle = {
72
- backgroundColor: "#f7f9fc",
73
- paddingRight: "50px"
74
- };
75
- var eyeIconStyle = {
76
- fontSize: "20px",
77
- position: "absolute",
78
- right: "10px"
79
- };
80
-
81
- var PasswordInput = function PasswordInput(_ref) {
82
- var isShowPassword = _ref.isShowPassword,
83
- togglePasswordVisible = _ref.togglePasswordVisible,
84
- onChange = _ref.onChange;
85
- return React.createElement("div", {
86
- className: "d-flex align-items-center w-100",
87
- style: containerStyle
88
- }, React.createElement(Input, {
89
- className: "border password-input",
90
- style: inputStyle,
91
- type: isShowPassword ? "text" : "password",
92
- name: "password",
93
- onChange: onChange,
94
- placeholder: "Password",
95
- required: true
96
- }), React.createElement("i", {
97
- className: "far " + (isShowPassword ? "fa-eye-slash" : "fa-eye") + " mx-2 cursor-pointer",
98
- style: eyeIconStyle,
99
- onClick: function onClick() {
100
- return togglePasswordVisible();
101
- },
102
- title: isShowPassword ? "Hide" : "Show"
103
- }));
104
- };
105
30
 
106
31
  var TINY_MCE_API_KEY = "adpshj9swgsscf83gw4gs2f74nx0vicpd5ydka20iqjd7l8r";
107
32
  var GOOGLE_RECAPTCHA_KEY = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
@@ -225,6 +150,81 @@ var ROLES = {
225
150
  PARENT: "Parent"
226
151
  };
227
152
 
153
+ // A type of promise-like that resolves synchronously and supports only one observer
154
+
155
+ const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
156
+
157
+ const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
158
+
159
+ // Asynchronously call a function and send errors to recovery continuation
160
+ function _catch(body, recover) {
161
+ try {
162
+ var result = body();
163
+ } catch(e) {
164
+ return recover(e);
165
+ }
166
+ if (result && result.then) {
167
+ return result.then(void 0, recover);
168
+ }
169
+ return result;
170
+ }
171
+
172
+ var styles = {"btn-login-google":"_2HqmH","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"};
173
+
174
+ var style = {
175
+ fontSize: "0.85rem"
176
+ };
177
+
178
+ var ErrorHandler = function ErrorHandler(_ref) {
179
+ var text = _ref.text;
180
+ return React.createElement("p", {
181
+ className: "text-danger",
182
+ style: style
183
+ }, text);
184
+ };
185
+
186
+ var containerStyle = {
187
+ height: "40px",
188
+ backgroundColor: "#f7f9fc",
189
+ borderRadius: "4px",
190
+ marginBottom: "5px",
191
+ position: "relative"
192
+ };
193
+ var inputStyle = {
194
+ backgroundColor: "#f7f9fc",
195
+ paddingRight: "50px"
196
+ };
197
+ var eyeIconStyle = {
198
+ fontSize: "20px",
199
+ position: "absolute",
200
+ right: "10px"
201
+ };
202
+
203
+ var PasswordInput = function PasswordInput(_ref) {
204
+ var isShowPassword = _ref.isShowPassword,
205
+ togglePasswordVisible = _ref.togglePasswordVisible,
206
+ onChange = _ref.onChange;
207
+ return React.createElement("div", {
208
+ className: "d-flex align-items-center w-100",
209
+ style: containerStyle
210
+ }, React.createElement(Input, {
211
+ className: "border password-input",
212
+ style: inputStyle,
213
+ type: isShowPassword ? "text" : "password",
214
+ name: "password",
215
+ onChange: onChange,
216
+ placeholder: "Password",
217
+ required: true
218
+ }), React.createElement("i", {
219
+ className: "far " + (isShowPassword ? "fa-eye-slash" : "fa-eye") + " mx-2 cursor-pointer",
220
+ style: eyeIconStyle,
221
+ onClick: function onClick() {
222
+ return togglePasswordVisible();
223
+ },
224
+ title: isShowPassword ? "Hide" : "Show"
225
+ }));
226
+ };
227
+
228
228
  var getAccessToken = (function () {
229
229
  try {
230
230
  return localStorage.getItem(ACCESS_TOKEN);
@@ -393,7 +393,7 @@ var useLogin = function useLogin() {
393
393
  document.title = TITLE;
394
394
  var token = getAccessToken();
395
395
  if (!!token) history.push("/");
396
- getInfoGoogle();
396
+ !!googleClientId && getInfoGoogle();
397
397
  }, []);
398
398
  var isDistrict = window.location.host.includes("-district");
399
399
  var userLogin = useCallback(function (data) {
@@ -7131,7 +7131,6 @@ var commonReducer = createReducer(initialState, function (builder) {
7131
7131
  }).addCase(initAmplitude, function (_state, action) {
7132
7132
  var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7;
7133
7133
 
7134
- amplitude.getInstance().init(INIT_AMPLITUDE_KEY, action.payload.name);
7135
7134
  var eventProperties = {
7136
7135
  user_id: action.payload.name,
7137
7136
  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 : "",
@@ -8052,5 +8051,9 @@ var generateRandomString = (function () {
8052
8051
  return (Math.random() + 1).toString(36).substring(7);
8053
8052
  });
8054
8053
 
8055
- 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, initAmplitude, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setEnableIEP, 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 };
8054
+ var amplitudeCallInit = function amplitudeCallInit(userId) {
8055
+ return amplitude.getInstance().init(INIT_AMPLITUDE_KEY, userId);
8056
+ };
8057
+
8058
+ 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, amplitudeCallInit, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, initAmplitude, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setEnableIEP, 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 };
8056
8059
  //# sourceMappingURL=index.modern.js.map