mario-core 2.10.2-beta → 2.10.4-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.
@@ -0,0 +1,5 @@
1
+ export interface IModelSelectRoles {
2
+ isOpenModel: boolean;
3
+ userRoles: string[];
4
+ onSelectUserRoles: Function;
5
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IModelSelectRoles } from "../constant/type";
3
+ declare const ModelSelectRole: ({ isOpenModel, userRoles, onSelectUserRoles }: IModelSelectRoles) => JSX.Element;
4
+ export default ModelSelectRole;
package/dist/index.js CHANGED
@@ -598,6 +598,7 @@ var secondary_teacher_name = "Secondary Teacher Name";
598
598
  var user_for_question = "User For Question";
599
599
  var requested_reflection = "Requested Reflection";
600
600
  var request_class_reflection = "Request Class Reflection";
601
+ var share_survey_to_teacher = "Share Survey To Teacher";
601
602
  var lang_us = {
602
603
  dashboard: dashboard,
603
604
  user: user,
@@ -1169,7 +1170,8 @@ var lang_us = {
1169
1170
  secondary_teacher_name: secondary_teacher_name,
1170
1171
  user_for_question: user_for_question,
1171
1172
  requested_reflection: requested_reflection,
1172
- request_class_reflection: request_class_reflection
1173
+ request_class_reflection: request_class_reflection,
1174
+ share_survey_to_teacher: share_survey_to_teacher
1173
1175
  };
1174
1176
 
1175
1177
  var dashboard$1 = "Dashboard";
@@ -1737,6 +1739,7 @@ var secondary_teacher_name$1 = "Secondary Teacher Name";
1737
1739
  var user_for_question$1 = "User For Question";
1738
1740
  var requested_reflection$1 = "Requested Reflection";
1739
1741
  var request_class_reflection$1 = "Request Class Reflection";
1742
+ var share_survey_to_teacher$1 = "Share Survey To Teacher";
1740
1743
  var lang_uk = {
1741
1744
  dashboard: dashboard$1,
1742
1745
  user: user$1,
@@ -2308,7 +2311,8 @@ var lang_uk = {
2308
2311
  secondary_teacher_name: secondary_teacher_name$1,
2309
2312
  user_for_question: user_for_question$1,
2310
2313
  requested_reflection: requested_reflection$1,
2311
- request_class_reflection: request_class_reflection$1
2314
+ request_class_reflection: request_class_reflection$1,
2315
+ share_survey_to_teacher: share_survey_to_teacher$1
2312
2316
  };
2313
2317
 
2314
2318
  var DEFAULT_LANGUAGE = localStorage.getItem("language") !== null ? localStorage.getItem("language") : "uk";
@@ -2489,7 +2493,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
2489
2493
  var TINY_MCE_API_KEY = "adpshj9swgsscf83gw4gs2f74nx0vicpd5ydka20iqjd7l8r";
2490
2494
  var GOOGLE_RECAPTCHA_KEY = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
2491
2495
  var INIT_AMPLITUDE_KEY_PROD = "860fa99c52ae79d98e904b4c862ddaac";
2492
- var INIT_AMPLITUDE_KEY_STAGE = "c617d0950cfdcae12953907273a1920f";
2496
+ var INIT_AMPLITUDE_KEY_STAGE = "adf89d0ed9b0d5fcc0d1bcfd535345dc";
2493
2497
  var ACCESS_TOKEN = "ACCESS_TOKEN";
2494
2498
  var DEFAULT_PAGE_SIZE_VALUES = [{
2495
2499
  label: "10",
@@ -2687,12 +2691,14 @@ var apiUpload = axios.create({
2687
2691
  if (!key.includes('learning-plan')) delete localStorage[key];
2688
2692
  });
2689
2693
  var userEmail = localStorage.getItem("USER_EMAIL");
2694
+ var roles = localStorage.getItem("ROLES");
2690
2695
  var hostName = window.location.hostname;
2691
2696
 
2692
2697
  if (userEmail) {
2693
2698
  amplitude.getInstance().logEvent("general: session end", {
2694
2699
  user_id: userEmail,
2695
- domain: hostName
2700
+ domain: hostName,
2701
+ roles: roles
2696
2702
  });
2697
2703
  amplitude.getInstance().resetSessionId();
2698
2704
  }
@@ -2836,6 +2842,8 @@ var useLogin = function useLogin() {
2836
2842
  }));
2837
2843
 
2838
2844
  if (data !== null && data !== void 0 && data.email && !roles.includes("Admin")) {
2845
+ var _data$roles;
2846
+
2839
2847
  amplitude.getInstance().init(!isLocalhost ? INIT_AMPLITUDE_KEY_PROD : INIT_AMPLITUDE_KEY_STAGE, data.email, {
2840
2848
  includeReferrer: false,
2841
2849
  includeUtm: false
@@ -2843,14 +2851,18 @@ var useLogin = function useLogin() {
2843
2851
  var hostName = window.location.hostname;
2844
2852
  amplitude.getInstance().logEvent("general: session start", {
2845
2853
  user_id: data.email,
2846
- domain: hostName
2854
+ domain: hostName,
2855
+ roles: data === null || data === void 0 ? void 0 : (_data$roles = data.roles) === null || _data$roles === void 0 ? void 0 : _data$roles.toString()
2847
2856
  });
2848
2857
  localStorage.setItem("USER_EMAIL", data.email);
2849
2858
 
2850
2859
  if (isLoginFirst) {
2860
+ var _data$roles2;
2861
+
2851
2862
  amplitude.getInstance().logEvent("general: first login", {
2852
2863
  user_id: data.email,
2853
- domain: hostName
2864
+ domain: hostName,
2865
+ roles: data === null || data === void 0 ? void 0 : (_data$roles2 = data.roles) === null || _data$roles2 === void 0 ? void 0 : _data$roles2.toString()
2854
2866
  });
2855
2867
  }
2856
2868
  }
@@ -9507,7 +9519,8 @@ var initialState = {
9507
9519
  first_login: "",
9508
9520
  duration_since: 0,
9509
9521
  last_page: "",
9510
- event: ""
9522
+ event: "",
9523
+ roles: ""
9511
9524
  }
9512
9525
  };
9513
9526
  var commonReducer = toolkit.createReducer(initialState, function (builder) {
@@ -9547,7 +9560,7 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
9547
9560
  }).addCase(showFontSize, function (state, action) {
9548
9561
  state.defaultFontSize = action.payload;
9549
9562
  }).addCase(initAmplitude, function (state, action) {
9550
- var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7, _action$payload8, _action$payload9, _action$payload10, _action$payload11, _action$payload12;
9563
+ var _action$payload, _action$payload2, _action$payload3, _action$payload4, _action$payload5, _action$payload6, _action$payload7, _action$payload8, _action$payload9, _action$payload10, _action$payload11, _action$payload12, _action$payload13, _action$payload13$rol, _action$payload14;
9551
9564
 
9552
9565
  var hostName = window.location.hostname;
9553
9566
  var eventProperties = {
@@ -9563,7 +9576,8 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
9563
9576
  last_page: (_action$payload11 = action.payload) !== null && _action$payload11 !== void 0 && _action$payload11.last_page ? action.payload.last_page : "",
9564
9577
  event: action.payload.event,
9565
9578
  domain: !!hostName ? hostName : "",
9566
- answer: !!((_action$payload12 = action.payload) !== null && _action$payload12 !== void 0 && _action$payload12.answer) ? action.payload.answer : ""
9579
+ roles: !!((_action$payload12 = action.payload) !== null && _action$payload12 !== void 0 && _action$payload12.roles) ? (_action$payload13 = action.payload) === null || _action$payload13 === void 0 ? void 0 : (_action$payload13$rol = _action$payload13.roles) === null || _action$payload13$rol === void 0 ? void 0 : _action$payload13$rol.toString() : "",
9580
+ answer: !!((_action$payload14 = action.payload) !== null && _action$payload14 !== void 0 && _action$payload14.answer) ? action.payload.answer : ""
9567
9581
  };
9568
9582
  state.amplitude = eventProperties;
9569
9583
  });