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