acsi-core 1.1.3 → 1.2.5
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/dist/containers/Login/apiClient/index.d.ts +5 -5
- package/dist/index.js +11 -27
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -27
- package/dist/index.modern.js.map +1 -1
- package/dist/services/accountService.d.ts +6 -6
- package/dist/utils/timeSpanToLocalMoment.d.ts +2 -2
- package/package.json +1 -2
|
@@ -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
|
@@ -28,7 +28,6 @@ var amplitude = require('@amplitude/analytics-browser');
|
|
|
28
28
|
var Sentry = require('@sentry/react');
|
|
29
29
|
var fa = require('react-icons/fa');
|
|
30
30
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
|
31
|
-
var moment$1 = _interopDefault(require('moment-timezone'));
|
|
32
31
|
|
|
33
32
|
var setLoading = toolkit.createAction("common/setLoading");
|
|
34
33
|
var setLoadingPage = toolkit.createAction("common/setLoadingPage");
|
|
@@ -1933,7 +1932,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1933
1932
|
});
|
|
1934
1933
|
var fnLoginMicrosoft = function fnLoginMicrosoft() {
|
|
1935
1934
|
try {
|
|
1936
|
-
var
|
|
1935
|
+
var redirectUri = window.location.origin + "/auth-redirect.html";
|
|
1936
|
+
var msalInstance = new msalBrowser.PublicClientApplication(msalConfig(MICROSOFT_CLIENT_ID, redirectUri));
|
|
1937
1937
|
if (!msalInstance) {
|
|
1938
1938
|
console.error("MSAL instance not initialized");
|
|
1939
1939
|
return Promise.resolve();
|
|
@@ -1941,7 +1941,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1941
1941
|
return Promise.resolve(_catch(function () {
|
|
1942
1942
|
return Promise.resolve(msalInstance.initialize()).then(function () {
|
|
1943
1943
|
var loginRequest = {
|
|
1944
|
-
scopes: ["openid", "profile", "email"]
|
|
1944
|
+
scopes: ["openid", "profile", "email"],
|
|
1945
|
+
redirectUri: redirectUri
|
|
1945
1946
|
};
|
|
1946
1947
|
var silentRequest = _extends({}, loginRequest, {
|
|
1947
1948
|
prompt: "select_account"
|
|
@@ -3469,31 +3470,14 @@ var utcToLocalTime = (function (time, FORMAT) {
|
|
|
3469
3470
|
}
|
|
3470
3471
|
});
|
|
3471
3472
|
|
|
3472
|
-
var timeSpanToLocalMoment = (function (time
|
|
3473
|
+
var timeSpanToLocalMoment = (function (time) {
|
|
3473
3474
|
if (!time) return null;
|
|
3474
|
-
|
|
3475
|
-
if (
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
}
|
|
3481
|
-
var dateTime;
|
|
3482
|
-
var isOffset = /^(UTC|GMT)?[+-]/.test(timezone);
|
|
3483
|
-
console.log({
|
|
3484
|
-
isOffset: isOffset
|
|
3485
|
-
});
|
|
3486
|
-
if (isOffset) {
|
|
3487
|
-
var cleanOffset = timezone.replace(/UTC|GMT/gi, '').trim();
|
|
3488
|
-
console.log({
|
|
3489
|
-
cleanOffset: cleanOffset
|
|
3490
|
-
});
|
|
3491
|
-
dateTime = moment$1.utc(time, "HH:mm:ss").utcOffset(cleanOffset, true);
|
|
3492
|
-
} else {
|
|
3493
|
-
dateTime = moment$1.tz(time, "HH:mm:ss", timezone);
|
|
3494
|
-
}
|
|
3495
|
-
console.log("run time", dateTime.format("HH:mm:ss"), timezone);
|
|
3496
|
-
return dateTime;
|
|
3475
|
+
var times = time.split(":");
|
|
3476
|
+
if (times.length !== 3) return null;
|
|
3477
|
+
var totalSeconds = +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
|
3478
|
+
var startOfDay = moment.utc().startOf("day");
|
|
3479
|
+
var dateTime = startOfDay.add(totalSeconds, "seconds");
|
|
3480
|
+
return dateTime.local();
|
|
3497
3481
|
});
|
|
3498
3482
|
|
|
3499
3483
|
var historyCore = history.createBrowserHistory();
|