acsi-core 1.2.40 → 1.2.41

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.
@@ -42,6 +42,7 @@ var setTenant = createAction("common/setTenant");
42
42
  var setAddTenant = createAction("common/setAddTenant");
43
43
  var setTeam = createAction("common/setTeam");
44
44
  var setIsFirstCalendar = createAction("common/setIsFirstCalendar");
45
+ var setStandards = createAction("common/setStandards");
45
46
 
46
47
  var REQUEST_ORIGIN = process.env.REACT_APP_REQUEST_ORIGIN || "";
47
48
  var ADMIN_ORIGIN = process.env.REACT_APP_ADMIN_ORIGIN || "";
@@ -158,9 +159,6 @@ function _catch(body, recover) {
158
159
  return result;
159
160
  }
160
161
 
161
- var _process$env$PUBLIC_U;
162
- var PUBLIC_URL = (_process$env$PUBLIC_U = process.env.PUBLIC_URL) != null ? _process$env$PUBLIC_U : '';
163
-
164
162
  var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj","danger":"_2uYm1","light":"_wxH5S"};
165
163
 
166
164
  var _excluded = ["type", "children", "onClick", "icon", "disabled", "htmlType"];
@@ -1732,10 +1730,6 @@ var apiUpload = axios.create({
1732
1730
  if (imPersonate) {
1733
1731
  config.headers.ImPersonate = imPersonate;
1734
1732
  }
1735
- var tenantId = config.externalTenantId || localStorage.getItem(ORGANIZATION_TENANT);
1736
- if (tenantId) {
1737
- config.headers["X-TenantID"] = tenantId;
1738
- }
1739
1733
  return config;
1740
1734
  }, function (error) {
1741
1735
  return Promise.reject(error);
@@ -1871,8 +1865,6 @@ var BlockLogin = function BlockLogin(_ref) {
1871
1865
  var _useState5 = useState(0),
1872
1866
  currentImageIndex = _useState5[0],
1873
1867
  setCurrentImageIndex = _useState5[1];
1874
- var search = new URLSearchParams(window.location.search);
1875
- var returnUrl = search.get("returnUrl") || "";
1876
1868
  var handleGetImage = function handleGetImage() {
1877
1869
  try {
1878
1870
  var _temp = _catch(function () {
@@ -1963,7 +1955,7 @@ var BlockLogin = function BlockLogin(_ref) {
1963
1955
  dispatch(setLoading(false));
1964
1956
  }
1965
1957
  localStorage.setItem(ACCESS_TOKEN, tokenJWT);
1966
- onNavigate(returnUrl || "/dashboard");
1958
+ onNavigate("/dashboard");
1967
1959
  dispatch(setLoading(false));
1968
1960
  });
1969
1961
  }
@@ -2046,11 +2038,11 @@ var BlockLogin = function BlockLogin(_ref) {
2046
2038
  }
2047
2039
  };
2048
2040
  var redirectUrl = getRedirectUrl(authResult.data.role);
2049
- window.location.href = redirectUrl + " " + (returnUrl || "/dashboard");
2041
+ window.location.href = redirectUrl + "/dashboard";
2050
2042
  dispatch(setLoading(false));
2051
2043
  }
2052
2044
  localStorage.setItem(ACCESS_TOKEN, tokenJWT);
2053
- onNavigate(returnUrl || "/dashboard");
2045
+ onNavigate("/dashboard");
2054
2046
  dispatch(setLoading(false));
2055
2047
  });
2056
2048
  }
@@ -2143,7 +2135,7 @@ var BlockLogin = function BlockLogin(_ref) {
2143
2135
  to: "/",
2144
2136
  className: "d-flex"
2145
2137
  }, React.createElement("img", {
2146
- src: PUBLIC_URL + "/images/Logo.png",
2138
+ src: "/images/Logo.png",
2147
2139
  alt: "",
2148
2140
  height: 37,
2149
2141
  width: 155,
@@ -2170,7 +2162,7 @@ var BlockLogin = function BlockLogin(_ref) {
2170
2162
  width: 24,
2171
2163
  height: 24,
2172
2164
  alt: "Google sign-in",
2173
- src: PUBLIC_URL + "/images/icons/Google__G__logo.png"
2165
+ src: "/images/icons/Google__G__logo.png"
2174
2166
  }), "Sign in with Google")), MICROSOFT_SSO_ENABLED === "true" && React.createElement("div", {
2175
2167
  className: "" + styleGlobal["microsoft_button"]
2176
2168
  }, React.createElement("button", {
@@ -2181,7 +2173,7 @@ var BlockLogin = function BlockLogin(_ref) {
2181
2173
  width: 24,
2182
2174
  height: 24,
2183
2175
  alt: "Google sign-in",
2184
- src: PUBLIC_URL + "/images/Single-Sign-On-logo.png"
2176
+ src: "/images/Single-Sign-On-logo.png"
2185
2177
  }), "Sign in with Microsoft")), React.createElement("span", {
2186
2178
  className: "" + styleGlobal["box-field"]
2187
2179
  }, "OR"), React.createElement("div", {
@@ -2201,7 +2193,7 @@ var BlockLogin = function BlockLogin(_ref) {
2201
2193
  width: 20,
2202
2194
  height: 20,
2203
2195
  alt: "Email sign-in",
2204
- src: PUBLIC_URL + "/images/icons/Login_icon.png"
2196
+ src: "/images/icons/Login_icon.png"
2205
2197
  }), "Sign in with Email")), React.createElement("div", {
2206
2198
  className: styleGlobal["box-signin-text"] + " "
2207
2199
  }, React.createElement("span", {
@@ -2235,7 +2227,7 @@ var BlockLogin = function BlockLogin(_ref) {
2235
2227
  }))) : React.createElement("div", {
2236
2228
  className: "" + styleGlobal["box-right"],
2237
2229
  style: {
2238
- backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
2230
+ backgroundImage: "url('/images/bg_login.png')"
2239
2231
  }
2240
2232
  }, React.createElement("div", {
2241
2233
  className: "" + styleGlobal["box-right-body"]
@@ -2264,7 +2256,7 @@ var BlockLogin = function BlockLogin(_ref) {
2264
2256
  }, React.createElement("img", {
2265
2257
  className: "img-fluid",
2266
2258
  alt: "",
2267
- src: PUBLIC_URL + "/images/image_login.png",
2259
+ src: "/images/image_login.png",
2268
2260
  style: {
2269
2261
  width: "15vw"
2270
2262
  }
@@ -2275,7 +2267,7 @@ var BlockLogin = function BlockLogin(_ref) {
2275
2267
  marginTop: "-15px"
2276
2268
  },
2277
2269
  alt: "",
2278
- src: PUBLIC_URL + "/images/icons/Vector 22.png"
2270
+ src: "/images/icons/Vector 22.png"
2279
2271
  }))))))), role === "LandingPage" && React.createElement(Col, {
2280
2272
  sm: 12,
2281
2273
  lg: 5,
@@ -2283,7 +2275,7 @@ var BlockLogin = function BlockLogin(_ref) {
2283
2275
  }, React.createElement("div", {
2284
2276
  className: "" + styleGlobal["box-right"],
2285
2277
  style: {
2286
- backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
2278
+ backgroundImage: "url('/images/bg_login.png')"
2287
2279
  }
2288
2280
  }, React.createElement("div", {
2289
2281
  className: "" + styleGlobal["box-right-body"]
@@ -2312,7 +2304,7 @@ var BlockLogin = function BlockLogin(_ref) {
2312
2304
  }, React.createElement("img", {
2313
2305
  className: "img-fluid",
2314
2306
  alt: "",
2315
- src: PUBLIC_URL + "/images/image_login.png",
2307
+ src: "/images/image_login.png",
2316
2308
  style: {
2317
2309
  width: "15vw"
2318
2310
  }
@@ -2323,7 +2315,7 @@ var BlockLogin = function BlockLogin(_ref) {
2323
2315
  marginTop: "-15px"
2324
2316
  },
2325
2317
  alt: "",
2326
- src: PUBLIC_URL + "/images/icons/Vector 22.png"
2318
+ src: "/images/icons/Vector 22.png"
2327
2319
  })))))))), React.createElement(Modal, {
2328
2320
  isOpen: isScreenCode,
2329
2321
  toggle: function toggle() {
@@ -2449,8 +2441,6 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
2449
2441
  var _useState6 = useState(minutes * 60),
2450
2442
  timeLeft = _useState6[0],
2451
2443
  setTimeLeft = _useState6[1];
2452
- var search = new URLSearchParams(window.location.search);
2453
- var returnUrl = search.get("returnUrl") || "/dashboard";
2454
2444
  var loginWithEmail = function loginWithEmail(role) {
2455
2445
  try {
2456
2446
  var _temp2 = function _temp2() {
@@ -2517,9 +2507,9 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
2517
2507
  if ((_data$data$roles = data.data.roles) !== null && _data$data$roles !== void 0 && _data$data$roles.includes("Admin")) {
2518
2508
  domain = ADMIN_ORIGIN;
2519
2509
  }
2520
- window.location.href = "" + domain + (returnUrl || "/dashboard");
2510
+ window.location.href = domain + "/dashboard";
2521
2511
  } else {
2522
- onNavigate(returnUrl || "/dashboard");
2512
+ onNavigate("/dashboard");
2523
2513
  }
2524
2514
  } else {
2525
2515
  toast.error("The code is not correct. Please check again.");
@@ -2800,7 +2790,8 @@ var initialState = {
2800
2790
  academy: null,
2801
2791
  menuCollapse: false,
2802
2792
  isRefetchSidebar: false,
2803
- isFirstCalendar: false
2793
+ isFirstCalendar: false,
2794
+ standards: []
2804
2795
  };
2805
2796
  var commonReducer = createReducer(initialState, function (builder) {
2806
2797
  builder.addCase(setLoading, function (state, action) {
@@ -2827,6 +2818,8 @@ var commonReducer = createReducer(initialState, function (builder) {
2827
2818
  state.user.currentTeamId = action.payload;
2828
2819
  }).addCase(setIsFirstCalendar, function (state) {
2829
2820
  state.isFirstCalendar = !state.isFirstCalendar;
2821
+ }).addCase(setStandards, function (state, action) {
2822
+ state.standards = action.payload;
2830
2823
  });
2831
2824
  });
2832
2825
 
@@ -3634,5 +3627,5 @@ var timeSpanToUtc = (function (time, timezone, format) {
3634
3627
 
3635
3628
  var historyCore = createBrowserHistory();
3636
3629
 
3637
- export { ACCESS_TOKEN, AmplitudeEvent, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreInputCompact, CoreModal, CoreRadio, CoreRange, CoreSearch, CoreSelect, CoreSelectCompact, CoreTextArea, CoreTitleInput, CoreTooltip, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, MarkdownRenderer as MarkdownLatexRender, NotFound, OPENSALT_BASE_URL, ORGANIZATION_TEAM, ORGANIZATION_TENANT, RichContentRenderer, Role, TIMEZONE_ID, api, apiUpload, firstCheckToken, getAccessToken, getErrorMessage, getImageUrl, getTimeZoneId, historyCore, initSentry, initializeAmplitude, setAddTenant, setAlert, setIsFirstCalendar, setIsRefetchSidebar, setLoading, setLoadingPage, setMenuCollapse, setTeam, setTenant, setUser, store, timeSpanToLocalMoment, timeSpanToUtc, useAmplitude, useGoogleSignOut, utcToLocalTime };
3630
+ export { ACCESS_TOKEN, AmplitudeEvent, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreInputCompact, CoreModal, CoreRadio, CoreRange, CoreSearch, CoreSelect, CoreSelectCompact, CoreTextArea, CoreTitleInput, CoreTooltip, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, MarkdownRenderer as MarkdownLatexRender, NotFound, OPENSALT_BASE_URL, ORGANIZATION_TEAM, ORGANIZATION_TENANT, RichContentRenderer, Role, TIMEZONE_ID, api, apiUpload, firstCheckToken, getAccessToken, getErrorMessage, getImageUrl, getTimeZoneId, historyCore, initSentry, initializeAmplitude, setAddTenant, setAlert, setIsFirstCalendar, setIsRefetchSidebar, setLoading, setLoadingPage, setMenuCollapse, setStandards, setTeam, setTenant, setUser, store, timeSpanToLocalMoment, timeSpanToUtc, useAmplitude, useGoogleSignOut, utcToLocalTime };
3638
3631
  //# sourceMappingURL=index.modern.js.map