mario-core 2.9.190-release → 2.9.191-release

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,7 @@
1
+ import React, { FC } from "react";
2
+ interface Props {
3
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
4
+ className?: string;
5
+ }
6
+ declare const SyncButtonIcon: FC<Props>;
7
+ export default SyncButtonIcon;
@@ -0,0 +1,4 @@
1
+ import { Language } from "../types/Language";
2
+ export declare const LANGUAGES: Language[];
3
+ export declare const DEFAULT_LANGUAGE_CODE = "en-GB";
4
+ export declare const SUPPORTED_LANGUAGES_CODE: string[];
@@ -0,0 +1,8 @@
1
+ import { Option } from "../constants/types";
2
+ declare const useStudentSelector: (value?: string | undefined) => {
3
+ students: Option[];
4
+ isLoading: boolean;
5
+ student: Option | undefined;
6
+ handleInputChange: (value: string) => void;
7
+ };
8
+ export default useStudentSelector;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ onChange: (e: any) => void;
4
+ value?: string;
5
+ }
6
+ declare const RosterStudentSelector: FC<Props>;
7
+ export default RosterStudentSelector;
package/dist/index.js CHANGED
@@ -4676,6 +4676,8 @@ var DEFAULT_LANGUAGE_CODE = "en-US";
4676
4676
  var SUPPORTED_LANGUAGES_CODE = LANGUAGES.map(function (i) {
4677
4677
  return i.code;
4678
4678
  });
4679
+ var SANDBOX_MODE_KEY = "SANDBOX_MODE_KEY";
4680
+ var SANDBOX_MIGRATE_KEY = "SANDBOX_MIGRATE_KEY";
4679
4681
 
4680
4682
  var resources = {
4681
4683
  "en-US": {
@@ -22096,6 +22098,22 @@ var encodeParams = (function (params) {
22096
22098
  }).join('&');
22097
22099
  });
22098
22100
 
22101
+ var getSandboxMode = (function () {
22102
+ try {
22103
+ return localStorage.getItem(SANDBOX_MODE_KEY);
22104
+ } catch (err) {
22105
+ return null;
22106
+ }
22107
+ });
22108
+
22109
+ var getSandboxMigrateMode = (function () {
22110
+ try {
22111
+ return localStorage.getItem(SANDBOX_MIGRATE_KEY);
22112
+ } catch (err) {
22113
+ return null;
22114
+ }
22115
+ });
22116
+
22099
22117
  var api = axios.create({
22100
22118
  baseURL: BASE_URL,
22101
22119
  timeout: 0,
@@ -22116,9 +22134,13 @@ var apiUpload = axios.create({
22116
22134
  [api, apiUpload].forEach(function (i) {
22117
22135
  return i.interceptors.request.use(function (config) {
22118
22136
  var token = getAccessToken();
22137
+ var isSandBoxMode = getSandboxMode();
22138
+ var migrateSandbox = getSandboxMigrateMode();
22119
22139
 
22120
22140
  if (token) {
22121
22141
  config.headers.Authorization = "Bearer " + token;
22142
+ if (isSandBoxMode) config.headers["XSRF_Auth_Sandbox"] = isSandBoxMode;
22143
+ if (migrateSandbox) config.headers["XSRF_Auth_Migrate_Sandbox"] = migrateSandbox;
22122
22144
  localStorage.setItem("LAST_TIME_REQUETST", moment__default().utc().format("YYYY-MM-DD HH:mm:ss"));
22123
22145
  }
22124
22146
 
@@ -22129,6 +22151,10 @@ var apiUpload = axios.create({
22129
22151
  });
22130
22152
  [api, apiUpload].forEach(function (i) {
22131
22153
  return i.interceptors.response.use(function (response) {
22154
+ var isSandBoxMode = response.headers["XSRF_Auth_Sandbox"];
22155
+ var migrateSandbox = response.headers["XSRF_Auth_Migrate_Sandbox"];
22156
+ localStorage.setItem(SANDBOX_MODE_KEY, isSandBoxMode);
22157
+ localStorage.setItem(SANDBOX_MIGRATE_KEY, migrateSandbox);
22132
22158
  return response;
22133
22159
  }, function (error) {
22134
22160
  if (error.response.status === 401) {