acsi-core 1.2.41 → 1.2.42
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/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Available Scripts
|
|
6
|
-
|
|
7
|
-
In the project directory, you can run:
|
|
8
|
-
|
|
9
|
-
### `npm start`
|
|
10
|
-
|
|
11
|
-
Runs the app in the development mode.\
|
|
12
|
-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
13
|
-
|
|
14
|
-
The page will reload if you make edits.\
|
|
15
|
-
You will also see any lint errors in the console.
|
|
16
|
-
|
|
17
|
-
### `npm test`
|
|
18
|
-
|
|
19
|
-
Launches the test runner in the interactive watch mode.\
|
|
20
|
-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
21
|
-
|
|
22
|
-
### `npm run build`
|
|
23
|
-
|
|
24
|
-
Builds the app for production to the `build` folder.\
|
|
25
|
-
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
26
|
-
|
|
27
|
-
The build is minified and the filenames include the hashes.\
|
|
28
|
-
Your app is ready to be deployed!
|
|
29
|
-
|
|
30
|
-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
31
|
-
|
|
32
|
-
### `npm run eject`
|
|
33
|
-
|
|
34
|
-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
|
35
|
-
|
|
36
|
-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
37
|
-
|
|
38
|
-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
|
39
|
-
|
|
40
|
-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
|
41
|
-
|
|
42
|
-
## Learn More
|
|
43
|
-
|
|
44
|
-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
|
45
|
-
|
|
46
|
-
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
1
|
+
To publish npm to gitlab.brss.work using this command:
|
|
2
|
+
chmod +x publish.sh
|
|
3
|
+
NPM_TOKEN=glpat-xxxxxxxx ./publish.sh
|
package/dist/index.js
CHANGED
|
@@ -160,6 +160,9 @@ function _catch(body, recover) {
|
|
|
160
160
|
return result;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
var _process$env$PUBLIC_U;
|
|
164
|
+
var PUBLIC_URL = (_process$env$PUBLIC_U = process.env.PUBLIC_URL) != null ? _process$env$PUBLIC_U : '';
|
|
165
|
+
|
|
163
166
|
var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj","danger":"_2uYm1","light":"_wxH5S"};
|
|
164
167
|
|
|
165
168
|
var _excluded = ["type", "children", "onClick", "icon", "disabled", "htmlType"];
|
|
@@ -1730,6 +1733,10 @@ var apiUpload = axios.create({
|
|
|
1730
1733
|
if (imPersonate) {
|
|
1731
1734
|
config.headers.ImPersonate = imPersonate;
|
|
1732
1735
|
}
|
|
1736
|
+
var tenantId = config.externalTenantId || localStorage.getItem(ORGANIZATION_TENANT);
|
|
1737
|
+
if (tenantId) {
|
|
1738
|
+
config.headers["X-TenantID"] = tenantId;
|
|
1739
|
+
}
|
|
1733
1740
|
return config;
|
|
1734
1741
|
}, function (error) {
|
|
1735
1742
|
return Promise.reject(error);
|
|
@@ -1761,14 +1768,15 @@ var apiUpload = axios.create({
|
|
|
1761
1768
|
});
|
|
1762
1769
|
});
|
|
1763
1770
|
|
|
1771
|
+
var IDP_URL = "" + process.env.REACT_APP_IDP_API_URL;
|
|
1764
1772
|
var apiLoginGoogle = function apiLoginGoogle(body) {
|
|
1765
|
-
return api.post(
|
|
1773
|
+
return api.post(IDP_URL + "/api/Auth/login", body);
|
|
1766
1774
|
};
|
|
1767
1775
|
var apiSendEmailCode = function apiSendEmailCode(body) {
|
|
1768
|
-
return api.post(
|
|
1776
|
+
return api.post(IDP_URL + "/api/Auth/send-code-email", body);
|
|
1769
1777
|
};
|
|
1770
1778
|
var apiCheckEmailCode = function apiCheckEmailCode(params) {
|
|
1771
|
-
return api.get(
|
|
1779
|
+
return api.get(IDP_URL + "/api/Auth/check-code-email", {
|
|
1772
1780
|
params: params
|
|
1773
1781
|
});
|
|
1774
1782
|
};
|
|
@@ -1864,6 +1872,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1864
1872
|
var _useState5 = React.useState(0),
|
|
1865
1873
|
currentImageIndex = _useState5[0],
|
|
1866
1874
|
setCurrentImageIndex = _useState5[1];
|
|
1875
|
+
var search = new URLSearchParams(window.location.search);
|
|
1876
|
+
var returnUrl = search.get("returnUrl") || "";
|
|
1867
1877
|
var handleGetImage = function handleGetImage() {
|
|
1868
1878
|
try {
|
|
1869
1879
|
var _temp = _catch(function () {
|
|
@@ -1954,7 +1964,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1954
1964
|
dispatch(setLoading(false));
|
|
1955
1965
|
}
|
|
1956
1966
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
1957
|
-
onNavigate("/dashboard");
|
|
1967
|
+
onNavigate(returnUrl || "/dashboard");
|
|
1958
1968
|
dispatch(setLoading(false));
|
|
1959
1969
|
});
|
|
1960
1970
|
}
|
|
@@ -2037,11 +2047,11 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2037
2047
|
}
|
|
2038
2048
|
};
|
|
2039
2049
|
var redirectUrl = getRedirectUrl(authResult.data.role);
|
|
2040
|
-
window.location.href = redirectUrl + "/dashboard";
|
|
2050
|
+
window.location.href = redirectUrl + " " + (returnUrl || "/dashboard");
|
|
2041
2051
|
dispatch(setLoading(false));
|
|
2042
2052
|
}
|
|
2043
2053
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
2044
|
-
onNavigate("/dashboard");
|
|
2054
|
+
onNavigate(returnUrl || "/dashboard");
|
|
2045
2055
|
dispatch(setLoading(false));
|
|
2046
2056
|
});
|
|
2047
2057
|
}
|
|
@@ -2134,7 +2144,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2134
2144
|
to: "/",
|
|
2135
2145
|
className: "d-flex"
|
|
2136
2146
|
}, React__default.createElement("img", {
|
|
2137
|
-
src: "/images/Logo.png",
|
|
2147
|
+
src: PUBLIC_URL + "/images/Logo.png",
|
|
2138
2148
|
alt: "",
|
|
2139
2149
|
height: 37,
|
|
2140
2150
|
width: 155,
|
|
@@ -2161,7 +2171,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2161
2171
|
width: 24,
|
|
2162
2172
|
height: 24,
|
|
2163
2173
|
alt: "Google sign-in",
|
|
2164
|
-
src: "/images/icons/Google__G__logo.png"
|
|
2174
|
+
src: PUBLIC_URL + "/images/icons/Google__G__logo.png"
|
|
2165
2175
|
}), "Sign in with Google")), MICROSOFT_SSO_ENABLED === "true" && React__default.createElement("div", {
|
|
2166
2176
|
className: "" + styleGlobal["microsoft_button"]
|
|
2167
2177
|
}, React__default.createElement("button", {
|
|
@@ -2172,7 +2182,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2172
2182
|
width: 24,
|
|
2173
2183
|
height: 24,
|
|
2174
2184
|
alt: "Google sign-in",
|
|
2175
|
-
src: "/images/Single-Sign-On-logo.png"
|
|
2185
|
+
src: PUBLIC_URL + "/images/Single-Sign-On-logo.png"
|
|
2176
2186
|
}), "Sign in with Microsoft")), React__default.createElement("span", {
|
|
2177
2187
|
className: "" + styleGlobal["box-field"]
|
|
2178
2188
|
}, "OR"), React__default.createElement("div", {
|
|
@@ -2192,7 +2202,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2192
2202
|
width: 20,
|
|
2193
2203
|
height: 20,
|
|
2194
2204
|
alt: "Email sign-in",
|
|
2195
|
-
src: "/images/icons/Login_icon.png"
|
|
2205
|
+
src: PUBLIC_URL + "/images/icons/Login_icon.png"
|
|
2196
2206
|
}), "Sign in with Email")), React__default.createElement("div", {
|
|
2197
2207
|
className: styleGlobal["box-signin-text"] + " "
|
|
2198
2208
|
}, React__default.createElement("span", {
|
|
@@ -2226,7 +2236,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2226
2236
|
}))) : React__default.createElement("div", {
|
|
2227
2237
|
className: "" + styleGlobal["box-right"],
|
|
2228
2238
|
style: {
|
|
2229
|
-
backgroundImage: "url('/images/bg_login.png')"
|
|
2239
|
+
backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
|
|
2230
2240
|
}
|
|
2231
2241
|
}, React__default.createElement("div", {
|
|
2232
2242
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2255,7 +2265,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2255
2265
|
}, React__default.createElement("img", {
|
|
2256
2266
|
className: "img-fluid",
|
|
2257
2267
|
alt: "",
|
|
2258
|
-
src: "/images/image_login.png",
|
|
2268
|
+
src: PUBLIC_URL + "/images/image_login.png",
|
|
2259
2269
|
style: {
|
|
2260
2270
|
width: "15vw"
|
|
2261
2271
|
}
|
|
@@ -2266,7 +2276,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2266
2276
|
marginTop: "-15px"
|
|
2267
2277
|
},
|
|
2268
2278
|
alt: "",
|
|
2269
|
-
src: "/images/icons/Vector 22.png"
|
|
2279
|
+
src: PUBLIC_URL + "/images/icons/Vector 22.png"
|
|
2270
2280
|
}))))))), role === "LandingPage" && React__default.createElement(reactstrap.Col, {
|
|
2271
2281
|
sm: 12,
|
|
2272
2282
|
lg: 5,
|
|
@@ -2274,7 +2284,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2274
2284
|
}, React__default.createElement("div", {
|
|
2275
2285
|
className: "" + styleGlobal["box-right"],
|
|
2276
2286
|
style: {
|
|
2277
|
-
backgroundImage: "url('/images/bg_login.png')"
|
|
2287
|
+
backgroundImage: "url('" + PUBLIC_URL + "/images/bg_login.png')"
|
|
2278
2288
|
}
|
|
2279
2289
|
}, React__default.createElement("div", {
|
|
2280
2290
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2303,7 +2313,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2303
2313
|
}, React__default.createElement("img", {
|
|
2304
2314
|
className: "img-fluid",
|
|
2305
2315
|
alt: "",
|
|
2306
|
-
src: "/images/image_login.png",
|
|
2316
|
+
src: PUBLIC_URL + "/images/image_login.png",
|
|
2307
2317
|
style: {
|
|
2308
2318
|
width: "15vw"
|
|
2309
2319
|
}
|
|
@@ -2314,7 +2324,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2314
2324
|
marginTop: "-15px"
|
|
2315
2325
|
},
|
|
2316
2326
|
alt: "",
|
|
2317
|
-
src: "/images/icons/Vector 22.png"
|
|
2327
|
+
src: PUBLIC_URL + "/images/icons/Vector 22.png"
|
|
2318
2328
|
})))))))), React__default.createElement(reactstrap.Modal, {
|
|
2319
2329
|
isOpen: isScreenCode,
|
|
2320
2330
|
toggle: function toggle() {
|
|
@@ -2440,6 +2450,8 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2440
2450
|
var _useState6 = React.useState(minutes * 60),
|
|
2441
2451
|
timeLeft = _useState6[0],
|
|
2442
2452
|
setTimeLeft = _useState6[1];
|
|
2453
|
+
var search = new URLSearchParams(window.location.search);
|
|
2454
|
+
var returnUrl = search.get("returnUrl") || "/dashboard";
|
|
2443
2455
|
var loginWithEmail = function loginWithEmail(role) {
|
|
2444
2456
|
try {
|
|
2445
2457
|
var _temp2 = function _temp2() {
|
|
@@ -2506,9 +2518,9 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2506
2518
|
if ((_data$data$roles = data.data.roles) !== null && _data$data$roles !== void 0 && _data$data$roles.includes("Admin")) {
|
|
2507
2519
|
domain = ADMIN_ORIGIN;
|
|
2508
2520
|
}
|
|
2509
|
-
window.location.href = domain + "/dashboard";
|
|
2521
|
+
window.location.href = "" + domain + (returnUrl || "/dashboard");
|
|
2510
2522
|
} else {
|
|
2511
|
-
onNavigate("/dashboard");
|
|
2523
|
+
onNavigate(returnUrl || "/dashboard");
|
|
2512
2524
|
}
|
|
2513
2525
|
} else {
|
|
2514
2526
|
reactToastify.toast.error("The code is not correct. Please check again.");
|