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.
- package/README.md +46 -3
- package/dist/containers/Login/apiClient/index.d.ts +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -27
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -28
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/commons/action.d.ts +1 -0
- package/dist/services/accountService.d.ts +6 -6
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Getting Started with Create React App
|
|
2
|
+
|
|
3
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
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,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.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const historyCore: import("history").History<unknown>;
|
|
2
|
-
import { setLoading, setAlert, setTenant, setAddTenant, setTeam, setUser, setMenuCollapse, setIsRefetchSidebar, setLoadingPage, setIsFirstCalendar } from "./redux/commons/action";
|
|
2
|
+
import { setLoading, setAlert, setTenant, setAddTenant, setTeam, setUser, setMenuCollapse, setIsRefetchSidebar, setLoadingPage, setIsFirstCalendar, setStandards } from "./redux/commons/action";
|
|
3
3
|
import { BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, OPENSALT_BASE_URL, ORGANIZATION_TEAM, ORGANIZATION_TENANT, TIMEZONE_ID } from "./utils/constants";
|
|
4
4
|
import Login from "./containers/Login/views/Login";
|
|
5
5
|
import store from "./store";
|
|
@@ -32,4 +32,4 @@ import getTimeZoneId from "./utils/getTimeZoneId";
|
|
|
32
32
|
import timeSpanToLocalMoment from "./utils/timeSpanToLocalMoment";
|
|
33
33
|
import timeSpanToUtc from "./utils/timeSpanToUtc";
|
|
34
34
|
import Cookies from "js-cookie";
|
|
35
|
-
export { setLoading, setLoadingPage, setIsFirstCalendar, BASE_URL, OPENSALT_BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, ORGANIZATION_TEAM, ORGANIZATION_TENANT, TIMEZONE_ID, firstCheckToken, getImageUrl, Login, utcToLocalTime, timeSpanToUtc, getTimeZoneId, timeSpanToLocalMoment, getAccessToken, store, historyCore, setAlert, setUser, setTenant, setAddTenant, setTeam, setMenuCollapse, setIsRefetchSidebar, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, Cookies, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, CoreSelectCompact, CoreInputCompact, CoreTitleInput, CoreTooltip, getErrorMessage, MarkdownLatexRender, RichContentRenderer, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption, GoogleOAuthProvider, useAmplitude, AmplitudeEvent, initializeAmplitude, initSentry };
|
|
35
|
+
export { setLoading, setLoadingPage, setIsFirstCalendar, setStandards, BASE_URL, OPENSALT_BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, ORGANIZATION_TEAM, ORGANIZATION_TENANT, TIMEZONE_ID, firstCheckToken, getImageUrl, Login, utcToLocalTime, timeSpanToUtc, getTimeZoneId, timeSpanToLocalMoment, getAccessToken, store, historyCore, setAlert, setUser, setTenant, setAddTenant, setTeam, setMenuCollapse, setIsRefetchSidebar, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, Cookies, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, CoreSelectCompact, CoreInputCompact, CoreTitleInput, CoreTooltip, getErrorMessage, MarkdownLatexRender, RichContentRenderer, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption, GoogleOAuthProvider, useAmplitude, AmplitudeEvent, initializeAmplitude, initSentry };
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ var setTenant = toolkit.createAction("common/setTenant");
|
|
|
43
43
|
var setAddTenant = toolkit.createAction("common/setAddTenant");
|
|
44
44
|
var setTeam = toolkit.createAction("common/setTeam");
|
|
45
45
|
var setIsFirstCalendar = toolkit.createAction("common/setIsFirstCalendar");
|
|
46
|
+
var setStandards = toolkit.createAction("common/setStandards");
|
|
46
47
|
|
|
47
48
|
var REQUEST_ORIGIN = process.env.REACT_APP_REQUEST_ORIGIN || "";
|
|
48
49
|
var ADMIN_ORIGIN = process.env.REACT_APP_ADMIN_ORIGIN || "";
|
|
@@ -159,9 +160,6 @@ function _catch(body, recover) {
|
|
|
159
160
|
return result;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
var _process$env$PUBLIC_U;
|
|
163
|
-
var PUBLIC_URL = (_process$env$PUBLIC_U = process.env.PUBLIC_URL) != null ? _process$env$PUBLIC_U : '';
|
|
164
|
-
|
|
165
163
|
var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj","danger":"_2uYm1","light":"_wxH5S"};
|
|
166
164
|
|
|
167
165
|
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);
|
|
@@ -1870,8 +1864,6 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1870
1864
|
var _useState5 = React.useState(0),
|
|
1871
1865
|
currentImageIndex = _useState5[0],
|
|
1872
1866
|
setCurrentImageIndex = _useState5[1];
|
|
1873
|
-
var search = new URLSearchParams(window.location.search);
|
|
1874
|
-
var returnUrl = search.get("returnUrl") || "";
|
|
1875
1867
|
var handleGetImage = function handleGetImage() {
|
|
1876
1868
|
try {
|
|
1877
1869
|
var _temp = _catch(function () {
|
|
@@ -1962,7 +1954,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1962
1954
|
dispatch(setLoading(false));
|
|
1963
1955
|
}
|
|
1964
1956
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
1965
|
-
onNavigate(
|
|
1957
|
+
onNavigate("/dashboard");
|
|
1966
1958
|
dispatch(setLoading(false));
|
|
1967
1959
|
});
|
|
1968
1960
|
}
|
|
@@ -2045,11 +2037,11 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2045
2037
|
}
|
|
2046
2038
|
};
|
|
2047
2039
|
var redirectUrl = getRedirectUrl(authResult.data.role);
|
|
2048
|
-
window.location.href = redirectUrl + "
|
|
2040
|
+
window.location.href = redirectUrl + "/dashboard";
|
|
2049
2041
|
dispatch(setLoading(false));
|
|
2050
2042
|
}
|
|
2051
2043
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
2052
|
-
onNavigate(
|
|
2044
|
+
onNavigate("/dashboard");
|
|
2053
2045
|
dispatch(setLoading(false));
|
|
2054
2046
|
});
|
|
2055
2047
|
}
|
|
@@ -2142,7 +2134,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2142
2134
|
to: "/",
|
|
2143
2135
|
className: "d-flex"
|
|
2144
2136
|
}, React__default.createElement("img", {
|
|
2145
|
-
src:
|
|
2137
|
+
src: "/images/Logo.png",
|
|
2146
2138
|
alt: "",
|
|
2147
2139
|
height: 37,
|
|
2148
2140
|
width: 155,
|
|
@@ -2169,7 +2161,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2169
2161
|
width: 24,
|
|
2170
2162
|
height: 24,
|
|
2171
2163
|
alt: "Google sign-in",
|
|
2172
|
-
src:
|
|
2164
|
+
src: "/images/icons/Google__G__logo.png"
|
|
2173
2165
|
}), "Sign in with Google")), MICROSOFT_SSO_ENABLED === "true" && React__default.createElement("div", {
|
|
2174
2166
|
className: "" + styleGlobal["microsoft_button"]
|
|
2175
2167
|
}, React__default.createElement("button", {
|
|
@@ -2180,7 +2172,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2180
2172
|
width: 24,
|
|
2181
2173
|
height: 24,
|
|
2182
2174
|
alt: "Google sign-in",
|
|
2183
|
-
src:
|
|
2175
|
+
src: "/images/Single-Sign-On-logo.png"
|
|
2184
2176
|
}), "Sign in with Microsoft")), React__default.createElement("span", {
|
|
2185
2177
|
className: "" + styleGlobal["box-field"]
|
|
2186
2178
|
}, "OR"), React__default.createElement("div", {
|
|
@@ -2200,7 +2192,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2200
2192
|
width: 20,
|
|
2201
2193
|
height: 20,
|
|
2202
2194
|
alt: "Email sign-in",
|
|
2203
|
-
src:
|
|
2195
|
+
src: "/images/icons/Login_icon.png"
|
|
2204
2196
|
}), "Sign in with Email")), React__default.createElement("div", {
|
|
2205
2197
|
className: styleGlobal["box-signin-text"] + " "
|
|
2206
2198
|
}, React__default.createElement("span", {
|
|
@@ -2234,7 +2226,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2234
2226
|
}))) : React__default.createElement("div", {
|
|
2235
2227
|
className: "" + styleGlobal["box-right"],
|
|
2236
2228
|
style: {
|
|
2237
|
-
backgroundImage: "url('
|
|
2229
|
+
backgroundImage: "url('/images/bg_login.png')"
|
|
2238
2230
|
}
|
|
2239
2231
|
}, React__default.createElement("div", {
|
|
2240
2232
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2263,7 +2255,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2263
2255
|
}, React__default.createElement("img", {
|
|
2264
2256
|
className: "img-fluid",
|
|
2265
2257
|
alt: "",
|
|
2266
|
-
src:
|
|
2258
|
+
src: "/images/image_login.png",
|
|
2267
2259
|
style: {
|
|
2268
2260
|
width: "15vw"
|
|
2269
2261
|
}
|
|
@@ -2274,7 +2266,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2274
2266
|
marginTop: "-15px"
|
|
2275
2267
|
},
|
|
2276
2268
|
alt: "",
|
|
2277
|
-
src:
|
|
2269
|
+
src: "/images/icons/Vector 22.png"
|
|
2278
2270
|
}))))))), role === "LandingPage" && React__default.createElement(reactstrap.Col, {
|
|
2279
2271
|
sm: 12,
|
|
2280
2272
|
lg: 5,
|
|
@@ -2282,7 +2274,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2282
2274
|
}, React__default.createElement("div", {
|
|
2283
2275
|
className: "" + styleGlobal["box-right"],
|
|
2284
2276
|
style: {
|
|
2285
|
-
backgroundImage: "url('
|
|
2277
|
+
backgroundImage: "url('/images/bg_login.png')"
|
|
2286
2278
|
}
|
|
2287
2279
|
}, React__default.createElement("div", {
|
|
2288
2280
|
className: "" + styleGlobal["box-right-body"]
|
|
@@ -2311,7 +2303,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2311
2303
|
}, React__default.createElement("img", {
|
|
2312
2304
|
className: "img-fluid",
|
|
2313
2305
|
alt: "",
|
|
2314
|
-
src:
|
|
2306
|
+
src: "/images/image_login.png",
|
|
2315
2307
|
style: {
|
|
2316
2308
|
width: "15vw"
|
|
2317
2309
|
}
|
|
@@ -2322,7 +2314,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2322
2314
|
marginTop: "-15px"
|
|
2323
2315
|
},
|
|
2324
2316
|
alt: "",
|
|
2325
|
-
src:
|
|
2317
|
+
src: "/images/icons/Vector 22.png"
|
|
2326
2318
|
})))))))), React__default.createElement(reactstrap.Modal, {
|
|
2327
2319
|
isOpen: isScreenCode,
|
|
2328
2320
|
toggle: function toggle() {
|
|
@@ -2448,8 +2440,6 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2448
2440
|
var _useState6 = React.useState(minutes * 60),
|
|
2449
2441
|
timeLeft = _useState6[0],
|
|
2450
2442
|
setTimeLeft = _useState6[1];
|
|
2451
|
-
var search = new URLSearchParams(window.location.search);
|
|
2452
|
-
var returnUrl = search.get("returnUrl") || "/dashboard";
|
|
2453
2443
|
var loginWithEmail = function loginWithEmail(role) {
|
|
2454
2444
|
try {
|
|
2455
2445
|
var _temp2 = function _temp2() {
|
|
@@ -2516,9 +2506,9 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2516
2506
|
if ((_data$data$roles = data.data.roles) !== null && _data$data$roles !== void 0 && _data$data$roles.includes("Admin")) {
|
|
2517
2507
|
domain = ADMIN_ORIGIN;
|
|
2518
2508
|
}
|
|
2519
|
-
window.location.href =
|
|
2509
|
+
window.location.href = domain + "/dashboard";
|
|
2520
2510
|
} else {
|
|
2521
|
-
onNavigate(
|
|
2511
|
+
onNavigate("/dashboard");
|
|
2522
2512
|
}
|
|
2523
2513
|
} else {
|
|
2524
2514
|
reactToastify.toast.error("The code is not correct. Please check again.");
|
|
@@ -2798,7 +2788,8 @@ var initialState = {
|
|
|
2798
2788
|
academy: null,
|
|
2799
2789
|
menuCollapse: false,
|
|
2800
2790
|
isRefetchSidebar: false,
|
|
2801
|
-
isFirstCalendar: false
|
|
2791
|
+
isFirstCalendar: false,
|
|
2792
|
+
standards: []
|
|
2802
2793
|
};
|
|
2803
2794
|
var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
2804
2795
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -2825,6 +2816,8 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
|
2825
2816
|
state.user.currentTeamId = action.payload;
|
|
2826
2817
|
}).addCase(setIsFirstCalendar, function (state) {
|
|
2827
2818
|
state.isFirstCalendar = !state.isFirstCalendar;
|
|
2819
|
+
}).addCase(setStandards, function (state, action) {
|
|
2820
|
+
state.standards = action.payload;
|
|
2828
2821
|
});
|
|
2829
2822
|
});
|
|
2830
2823
|
|
|
@@ -3702,6 +3695,7 @@ exports.setIsRefetchSidebar = setIsRefetchSidebar;
|
|
|
3702
3695
|
exports.setLoading = setLoading;
|
|
3703
3696
|
exports.setLoadingPage = setLoadingPage;
|
|
3704
3697
|
exports.setMenuCollapse = setMenuCollapse;
|
|
3698
|
+
exports.setStandards = setStandards;
|
|
3705
3699
|
exports.setTeam = setTeam;
|
|
3706
3700
|
exports.setTenant = setTenant;
|
|
3707
3701
|
exports.setUser = setUser;
|