mario-core 2.9.26-admin → 2.9.28-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 +3 -2
- package/dist/index.js +106 -92
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +106 -92
- package/dist/index.modern.js.map +1 -1
- package/dist/types/Payload.d.ts +3 -0
- package/package.json +97 -97
package/dist/index.d.ts
CHANGED
|
@@ -102,5 +102,6 @@ import { setBandScoreList } from "./redux/bandScores/action";
|
|
|
102
102
|
import { setStudentIdSelectedByTeacher } from "./redux/navMobile/action";
|
|
103
103
|
import { setEnableIEP, setConversationOneToOne } from "./redux/commons/action";
|
|
104
104
|
import useFilters from "./hooks/useFilters";
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
import amplitude from "amplitude-js";
|
|
106
|
+
declare const amplitudeClient: amplitude.AmplitudeClient;
|
|
107
|
+
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, setEnableIEP, setConversationOneToOne, 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, amplitudeClient };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
2
|
|
|
3
3
|
require('bootstrap/dist/css/bootstrap.min.css');
|
|
4
|
-
var amplitude = _interopDefault(require('amplitude-js'));
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var React__default = _interopDefault(React);
|
|
7
6
|
var reactstrap = require('reactstrap');
|
|
@@ -30,10 +29,85 @@ var ReactNotification$1 = _interopDefault(require('react-notifications-component
|
|
|
30
29
|
require('react-notifications-component/dist/theme.css');
|
|
31
30
|
var ai = require('react-icons/ai');
|
|
32
31
|
var moment = _interopDefault(require('moment'));
|
|
32
|
+
var amplitude = _interopDefault(require('amplitude-js'));
|
|
33
|
+
|
|
34
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
35
|
+
|
|
36
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
37
|
+
|
|
38
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
39
|
+
|
|
40
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
41
|
+
function _catch(body, recover) {
|
|
42
|
+
try {
|
|
43
|
+
var result = body();
|
|
44
|
+
} catch(e) {
|
|
45
|
+
return recover(e);
|
|
46
|
+
}
|
|
47
|
+
if (result && result.then) {
|
|
48
|
+
return result.then(void 0, recover);
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
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"};
|
|
54
|
+
|
|
55
|
+
var style = {
|
|
56
|
+
fontSize: "0.85rem"
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var ErrorHandler = function ErrorHandler(_ref) {
|
|
60
|
+
var text = _ref.text;
|
|
61
|
+
return React__default.createElement("p", {
|
|
62
|
+
className: "text-danger",
|
|
63
|
+
style: style
|
|
64
|
+
}, text);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var containerStyle = {
|
|
68
|
+
height: "40px",
|
|
69
|
+
backgroundColor: "#f7f9fc",
|
|
70
|
+
borderRadius: "4px",
|
|
71
|
+
marginBottom: "5px",
|
|
72
|
+
position: "relative"
|
|
73
|
+
};
|
|
74
|
+
var inputStyle = {
|
|
75
|
+
backgroundColor: "#f7f9fc",
|
|
76
|
+
paddingRight: "50px"
|
|
77
|
+
};
|
|
78
|
+
var eyeIconStyle = {
|
|
79
|
+
fontSize: "20px",
|
|
80
|
+
position: "absolute",
|
|
81
|
+
right: "10px"
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var PasswordInput = function PasswordInput(_ref) {
|
|
85
|
+
var isShowPassword = _ref.isShowPassword,
|
|
86
|
+
togglePasswordVisible = _ref.togglePasswordVisible,
|
|
87
|
+
onChange = _ref.onChange;
|
|
88
|
+
return React__default.createElement("div", {
|
|
89
|
+
className: "d-flex align-items-center w-100",
|
|
90
|
+
style: containerStyle
|
|
91
|
+
}, React__default.createElement(reactstrap.Input, {
|
|
92
|
+
className: "border password-input",
|
|
93
|
+
style: inputStyle,
|
|
94
|
+
type: isShowPassword ? "text" : "password",
|
|
95
|
+
name: "password",
|
|
96
|
+
onChange: onChange,
|
|
97
|
+
placeholder: "Password",
|
|
98
|
+
required: true
|
|
99
|
+
}), React__default.createElement("i", {
|
|
100
|
+
className: "far " + (isShowPassword ? "fa-eye-slash" : "fa-eye") + " mx-2 cursor-pointer",
|
|
101
|
+
style: eyeIconStyle,
|
|
102
|
+
onClick: function onClick() {
|
|
103
|
+
return togglePasswordVisible();
|
|
104
|
+
},
|
|
105
|
+
title: isShowPassword ? "Hide" : "Show"
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
33
108
|
|
|
34
109
|
var TINY_MCE_API_KEY = "adpshj9swgsscf83gw4gs2f74nx0vicpd5ydka20iqjd7l8r";
|
|
35
110
|
var GOOGLE_RECAPTCHA_KEY = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
|
|
36
|
-
var INIT_AMPLITUDE_KEY = "860fa99c52ae79d98e904b4c862ddaac";
|
|
37
111
|
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
|
38
112
|
var DEFAULT_PAGE_SIZE_VALUES = [{
|
|
39
113
|
label: "10",
|
|
@@ -153,81 +227,6 @@ var ROLES = {
|
|
|
153
227
|
PARENT: "Parent"
|
|
154
228
|
};
|
|
155
229
|
|
|
156
|
-
// A type of promise-like that resolves synchronously and supports only one observer
|
|
157
|
-
|
|
158
|
-
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
159
|
-
|
|
160
|
-
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
161
|
-
|
|
162
|
-
// Asynchronously call a function and send errors to recovery continuation
|
|
163
|
-
function _catch(body, recover) {
|
|
164
|
-
try {
|
|
165
|
-
var result = body();
|
|
166
|
-
} catch(e) {
|
|
167
|
-
return recover(e);
|
|
168
|
-
}
|
|
169
|
-
if (result && result.then) {
|
|
170
|
-
return result.then(void 0, recover);
|
|
171
|
-
}
|
|
172
|
-
return result;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
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"};
|
|
176
|
-
|
|
177
|
-
var style = {
|
|
178
|
-
fontSize: "0.85rem"
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
var ErrorHandler = function ErrorHandler(_ref) {
|
|
182
|
-
var text = _ref.text;
|
|
183
|
-
return React__default.createElement("p", {
|
|
184
|
-
className: "text-danger",
|
|
185
|
-
style: style
|
|
186
|
-
}, text);
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
var containerStyle = {
|
|
190
|
-
height: "40px",
|
|
191
|
-
backgroundColor: "#f7f9fc",
|
|
192
|
-
borderRadius: "4px",
|
|
193
|
-
marginBottom: "5px",
|
|
194
|
-
position: "relative"
|
|
195
|
-
};
|
|
196
|
-
var inputStyle = {
|
|
197
|
-
backgroundColor: "#f7f9fc",
|
|
198
|
-
paddingRight: "50px"
|
|
199
|
-
};
|
|
200
|
-
var eyeIconStyle = {
|
|
201
|
-
fontSize: "20px",
|
|
202
|
-
position: "absolute",
|
|
203
|
-
right: "10px"
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
var PasswordInput = function PasswordInput(_ref) {
|
|
207
|
-
var isShowPassword = _ref.isShowPassword,
|
|
208
|
-
togglePasswordVisible = _ref.togglePasswordVisible,
|
|
209
|
-
onChange = _ref.onChange;
|
|
210
|
-
return React__default.createElement("div", {
|
|
211
|
-
className: "d-flex align-items-center w-100",
|
|
212
|
-
style: containerStyle
|
|
213
|
-
}, React__default.createElement(reactstrap.Input, {
|
|
214
|
-
className: "border password-input",
|
|
215
|
-
style: inputStyle,
|
|
216
|
-
type: isShowPassword ? "text" : "password",
|
|
217
|
-
name: "password",
|
|
218
|
-
onChange: onChange,
|
|
219
|
-
placeholder: "Password",
|
|
220
|
-
required: true
|
|
221
|
-
}), React__default.createElement("i", {
|
|
222
|
-
className: "far " + (isShowPassword ? "fa-eye-slash" : "fa-eye") + " mx-2 cursor-pointer",
|
|
223
|
-
style: eyeIconStyle,
|
|
224
|
-
onClick: function onClick() {
|
|
225
|
-
return togglePasswordVisible();
|
|
226
|
-
},
|
|
227
|
-
title: isShowPassword ? "Hide" : "Show"
|
|
228
|
-
}));
|
|
229
|
-
};
|
|
230
|
-
|
|
231
230
|
var getAccessToken = (function () {
|
|
232
231
|
try {
|
|
233
232
|
return localStorage.getItem(ACCESS_TOKEN);
|
|
@@ -7101,7 +7100,20 @@ var initialState = {
|
|
|
7101
7100
|
menuBar: true,
|
|
7102
7101
|
defaultFontSize: 16,
|
|
7103
7102
|
isEnableIEP: true,
|
|
7104
|
-
isConversationOneToOne: false
|
|
7103
|
+
isConversationOneToOne: false,
|
|
7104
|
+
amplitude: {
|
|
7105
|
+
user_id: "",
|
|
7106
|
+
status: "",
|
|
7107
|
+
student_id: "",
|
|
7108
|
+
page: "",
|
|
7109
|
+
part: "",
|
|
7110
|
+
iep_date: null,
|
|
7111
|
+
saved: null,
|
|
7112
|
+
first_login: "",
|
|
7113
|
+
duration_since: 0,
|
|
7114
|
+
last_page: "",
|
|
7115
|
+
event: ""
|
|
7116
|
+
}
|
|
7105
7117
|
};
|
|
7106
7118
|
var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
7107
7119
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -7135,19 +7147,23 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
|
7135
7147
|
state.isConversationOneToOne = action.payload;
|
|
7136
7148
|
}).addCase(showFontSize, function (state, action) {
|
|
7137
7149
|
state.defaultFontSize = action.payload;
|
|
7138
|
-
}).addCase(initAmplitude, function (
|
|
7139
|
-
var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7;
|
|
7150
|
+
}).addCase(initAmplitude, function (state, action) {
|
|
7151
|
+
var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7, _action$payload8, _action$payload9, _action$payload10, _action$payload11;
|
|
7140
7152
|
|
|
7141
7153
|
var eventProperties = {
|
|
7142
|
-
user_id: action.payload.name,
|
|
7143
|
-
status: (_action$
|
|
7144
|
-
student_id: (_action$
|
|
7145
|
-
page: (_action$
|
|
7146
|
-
part: (_action$
|
|
7147
|
-
iep_date: (_action$
|
|
7148
|
-
saved: typeof ((_action$
|
|
7154
|
+
user_id: (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.name,
|
|
7155
|
+
status: (_action$payload2 = action.payload) !== null && _action$payload2 !== void 0 && _action$payload2.status ? (_action$payload3 = action.payload) === null || _action$payload3 === void 0 ? void 0 : _action$payload3.status : "",
|
|
7156
|
+
student_id: (_action$payload4 = action.payload) !== null && _action$payload4 !== void 0 && _action$payload4.student_id ? action.payload.student_id : "",
|
|
7157
|
+
page: (_action$payload5 = action.payload) !== null && _action$payload5 !== void 0 && _action$payload5.page ? action.payload.page : "",
|
|
7158
|
+
part: (_action$payload6 = action.payload) !== null && _action$payload6 !== void 0 && _action$payload6.part ? action.payload.part : "",
|
|
7159
|
+
iep_date: (_action$payload7 = action.payload) !== null && _action$payload7 !== void 0 && _action$payload7.iep_date ? action.payload.iep_date : null,
|
|
7160
|
+
saved: typeof ((_action$payload8 = action.payload) === null || _action$payload8 === void 0 ? void 0 : _action$payload8.saved) == "boolean" ? action.payload.saved : null,
|
|
7161
|
+
first_login: (_action$payload9 = action.payload) !== null && _action$payload9 !== void 0 && _action$payload9.first_login ? action.payload.first_login : "",
|
|
7162
|
+
duration_since: (_action$payload10 = action.payload) !== null && _action$payload10 !== void 0 && _action$payload10.duration_since ? action.payload.duration_since : 0,
|
|
7163
|
+
last_page: (_action$payload11 = action.payload) !== null && _action$payload11 !== void 0 && _action$payload11.last_page ? action.payload.last_page : "",
|
|
7164
|
+
event: action.payload.event
|
|
7149
7165
|
};
|
|
7150
|
-
amplitude
|
|
7166
|
+
state.amplitude = eventProperties;
|
|
7151
7167
|
});
|
|
7152
7168
|
});
|
|
7153
7169
|
|
|
@@ -8058,9 +8074,7 @@ var generateRandomString = (function () {
|
|
|
8058
8074
|
return (Math.random() + 1).toString(36).substring(7);
|
|
8059
8075
|
});
|
|
8060
8076
|
|
|
8061
|
-
var
|
|
8062
|
-
return amplitude.getInstance().init(INIT_AMPLITUDE_KEY, userId);
|
|
8063
|
-
};
|
|
8077
|
+
var amplitudeClient = amplitude.getInstance();
|
|
8064
8078
|
|
|
8065
8079
|
exports.ACCESS_TOKEN = ACCESS_TOKEN;
|
|
8066
8080
|
exports.ANSWER_EDITOR_HEIGHT = ANSWER_EDITOR_HEIGHT;
|
|
@@ -8125,7 +8139,7 @@ exports.UploadFileButton = UploadFileButton;
|
|
|
8125
8139
|
exports.UserDetail = UserDetail;
|
|
8126
8140
|
exports.UserList = UserList;
|
|
8127
8141
|
exports.addTab = addTab;
|
|
8128
|
-
exports.
|
|
8142
|
+
exports.amplitudeClient = amplitudeClient;
|
|
8129
8143
|
exports.answerQuestion = answerQuestion;
|
|
8130
8144
|
exports.answerQuestionDataPlayer = answerQuestionDataPlayer;
|
|
8131
8145
|
exports.api = api;
|