acsi-core 1.2.36 → 1.2.40
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/README.md +3 -46
- package/dist/containers/Login/apiClient/index.d.ts +5 -5
- package/dist/index.js +23 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +23 -16
- package/dist/index.modern.js.map +1 -1
- package/dist/services/accountService.d.ts +6 -6
- package/dist/utils/env.d.ts +1 -0
- package/package.json +5 -2
package/dist/index.modern.js
CHANGED
|
@@ -158,6 +158,9 @@ function _catch(body, recover) {
|
|
|
158
158
|
return result;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
var _process$env$PUBLIC_U;
|
|
162
|
+
var PUBLIC_URL = (_process$env$PUBLIC_U = process.env.PUBLIC_URL) != null ? _process$env$PUBLIC_U : '';
|
|
163
|
+
|
|
161
164
|
var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj","danger":"_2uYm1","light":"_wxH5S"};
|
|
162
165
|
|
|
163
166
|
var _excluded = ["type", "children", "onClick", "icon", "disabled", "htmlType"];
|
|
@@ -1729,7 +1732,7 @@ var apiUpload = axios.create({
|
|
|
1729
1732
|
if (imPersonate) {
|
|
1730
1733
|
config.headers.ImPersonate = imPersonate;
|
|
1731
1734
|
}
|
|
1732
|
-
var tenantId = config.
|
|
1735
|
+
var tenantId = config.externalTenantId || localStorage.getItem(ORGANIZATION_TENANT);
|
|
1733
1736
|
if (tenantId) {
|
|
1734
1737
|
config.headers["X-TenantID"] = tenantId;
|
|
1735
1738
|
}
|
|
@@ -1868,6 +1871,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1868
1871
|
var _useState5 = useState(0),
|
|
1869
1872
|
currentImageIndex = _useState5[0],
|
|
1870
1873
|
setCurrentImageIndex = _useState5[1];
|
|
1874
|
+
var search = new URLSearchParams(window.location.search);
|
|
1875
|
+
var returnUrl = search.get("returnUrl") || "";
|
|
1871
1876
|
var handleGetImage = function handleGetImage() {
|
|
1872
1877
|
try {
|
|
1873
1878
|
var _temp = _catch(function () {
|
|
@@ -1958,7 +1963,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1958
1963
|
dispatch(setLoading(false));
|
|
1959
1964
|
}
|
|
1960
1965
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
1961
|
-
onNavigate("/dashboard");
|
|
1966
|
+
onNavigate(returnUrl || "/dashboard");
|
|
1962
1967
|
dispatch(setLoading(false));
|
|
1963
1968
|
});
|
|
1964
1969
|
}
|
|
@@ -2041,11 +2046,11 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2041
2046
|
}
|
|
2042
2047
|
};
|
|
2043
2048
|
var redirectUrl = getRedirectUrl(authResult.data.role);
|
|
2044
|
-
window.location.href = redirectUrl + "/dashboard";
|
|
2049
|
+
window.location.href = redirectUrl + " " + (returnUrl || "/dashboard");
|
|
2045
2050
|
dispatch(setLoading(false));
|
|
2046
2051
|
}
|
|
2047
2052
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
2048
|
-
onNavigate("/dashboard");
|
|
2053
|
+
onNavigate(returnUrl || "/dashboard");
|
|
2049
2054
|
dispatch(setLoading(false));
|
|
2050
2055
|
});
|
|
2051
2056
|
}
|
|
@@ -2138,7 +2143,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2138
2143
|
to: "/",
|
|
2139
2144
|
className: "d-flex"
|
|
2140
2145
|
}, React.createElement("img", {
|
|
2141
|
-
src: "/images/Logo.png",
|
|
2146
|
+
src: PUBLIC_URL + "/images/Logo.png",
|
|
2142
2147
|
alt: "",
|
|
2143
2148
|
height: 37,
|
|
2144
2149
|
width: 155,
|
|
@@ -2165,7 +2170,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2165
2170
|
width: 24,
|
|
2166
2171
|
height: 24,
|
|
2167
2172
|
alt: "Google sign-in",
|
|
2168
|
-
src: "/images/icons/Google__G__logo.png"
|
|
2173
|
+
src: PUBLIC_URL + "/images/icons/Google__G__logo.png"
|
|
2169
2174
|
}), "Sign in with Google")), MICROSOFT_SSO_ENABLED === "true" && React.createElement("div", {
|
|
2170
2175
|
className: "" + styleGlobal["microsoft_button"]
|
|
2171
2176
|
}, React.createElement("button", {
|
|
@@ -2176,7 +2181,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2176
2181
|
width: 24,
|
|
2177
2182
|
height: 24,
|
|
2178
2183
|
alt: "Google sign-in",
|
|
2179
|
-
src: "/images/Single-Sign-On-logo.png"
|
|
2184
|
+
src: PUBLIC_URL + "/images/Single-Sign-On-logo.png"
|
|
2180
2185
|
}), "Sign in with Microsoft")), React.createElement("span", {
|
|
2181
2186
|
className: "" + styleGlobal["box-field"]
|
|
2182
2187
|
}, "OR"), React.createElement("div", {
|
|
@@ -2196,7 +2201,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2196
2201
|
width: 20,
|
|
2197
2202
|
height: 20,
|
|
2198
2203
|
alt: "Email sign-in",
|
|
2199
|
-
src: "/images/icons/Login_icon.png"
|
|
2204
|
+
src: PUBLIC_URL + "/images/icons/Login_icon.png"
|
|
2200
2205
|
}), "Sign in with Email")), React.createElement("div", {
|
|
2201
2206
|
className: styleGlobal["box-signin-text"] + " "
|
|
2202
2207
|
}, React.createElement("span", {
|
|
@@ -2230,7 +2235,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2230
2235
|
}))) : React.createElement("div", {
|
|
2231
2236
|
className: "" + styleGlobal["box-right"],
|
|
2232
2237
|
style: {
|
|
2233
|
-
backgroundImage: "url('/images/bg_login.png')"
|
|
2238
|
+
backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
|
|
2234
2239
|
}
|
|
2235
2240
|
}, React.createElement("div", {
|
|
2236
2241
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2259,7 +2264,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2259
2264
|
}, React.createElement("img", {
|
|
2260
2265
|
className: "img-fluid",
|
|
2261
2266
|
alt: "",
|
|
2262
|
-
src: "/images/image_login.png",
|
|
2267
|
+
src: PUBLIC_URL + "/images/image_login.png",
|
|
2263
2268
|
style: {
|
|
2264
2269
|
width: "15vw"
|
|
2265
2270
|
}
|
|
@@ -2270,7 +2275,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2270
2275
|
marginTop: "-15px"
|
|
2271
2276
|
},
|
|
2272
2277
|
alt: "",
|
|
2273
|
-
src: "/images/icons/Vector 22.png"
|
|
2278
|
+
src: PUBLIC_URL + "/images/icons/Vector 22.png"
|
|
2274
2279
|
}))))))), role === "LandingPage" && React.createElement(Col, {
|
|
2275
2280
|
sm: 12,
|
|
2276
2281
|
lg: 5,
|
|
@@ -2278,7 +2283,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2278
2283
|
}, React.createElement("div", {
|
|
2279
2284
|
className: "" + styleGlobal["box-right"],
|
|
2280
2285
|
style: {
|
|
2281
|
-
backgroundImage: "url('/images/bg_login.png')"
|
|
2286
|
+
backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
|
|
2282
2287
|
}
|
|
2283
2288
|
}, React.createElement("div", {
|
|
2284
2289
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2307,7 +2312,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2307
2312
|
}, React.createElement("img", {
|
|
2308
2313
|
className: "img-fluid",
|
|
2309
2314
|
alt: "",
|
|
2310
|
-
src: "/images/image_login.png",
|
|
2315
|
+
src: PUBLIC_URL + "/images/image_login.png",
|
|
2311
2316
|
style: {
|
|
2312
2317
|
width: "15vw"
|
|
2313
2318
|
}
|
|
@@ -2318,7 +2323,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2318
2323
|
marginTop: "-15px"
|
|
2319
2324
|
},
|
|
2320
2325
|
alt: "",
|
|
2321
|
-
src: "/images/icons/Vector 22.png"
|
|
2326
|
+
src: PUBLIC_URL + "/images/icons/Vector 22.png"
|
|
2322
2327
|
})))))))), React.createElement(Modal, {
|
|
2323
2328
|
isOpen: isScreenCode,
|
|
2324
2329
|
toggle: function toggle() {
|
|
@@ -2444,6 +2449,8 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2444
2449
|
var _useState6 = useState(minutes * 60),
|
|
2445
2450
|
timeLeft = _useState6[0],
|
|
2446
2451
|
setTimeLeft = _useState6[1];
|
|
2452
|
+
var search = new URLSearchParams(window.location.search);
|
|
2453
|
+
var returnUrl = search.get("returnUrl") || "/dashboard";
|
|
2447
2454
|
var loginWithEmail = function loginWithEmail(role) {
|
|
2448
2455
|
try {
|
|
2449
2456
|
var _temp2 = function _temp2() {
|
|
@@ -2510,9 +2517,9 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2510
2517
|
if ((_data$data$roles = data.data.roles) !== null && _data$data$roles !== void 0 && _data$data$roles.includes("Admin")) {
|
|
2511
2518
|
domain = ADMIN_ORIGIN;
|
|
2512
2519
|
}
|
|
2513
|
-
window.location.href = domain + "/dashboard";
|
|
2520
|
+
window.location.href = "" + domain + (returnUrl || "/dashboard");
|
|
2514
2521
|
} else {
|
|
2515
|
-
onNavigate("/dashboard");
|
|
2522
|
+
onNavigate(returnUrl || "/dashboard");
|
|
2516
2523
|
}
|
|
2517
2524
|
} else {
|
|
2518
2525
|
toast.error("The code is not correct. Please check again.");
|