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
package/dist/index.modern.js
CHANGED
|
@@ -27,7 +27,6 @@ import { Identify, identify, track, setUserId, reset as reset$1, init } from '@a
|
|
|
27
27
|
import { init as init$1, replayIntegration } from '@sentry/react';
|
|
28
28
|
import { FaCaretDown } from 'react-icons/fa';
|
|
29
29
|
import CreatableSelect from 'react-select/creatable';
|
|
30
|
-
import moment$1 from 'moment-timezone';
|
|
31
30
|
|
|
32
31
|
var setLoading = createAction("common/setLoading");
|
|
33
32
|
var setLoadingPage = createAction("common/setLoadingPage");
|
|
@@ -1934,7 +1933,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1934
1933
|
});
|
|
1935
1934
|
var fnLoginMicrosoft = function fnLoginMicrosoft() {
|
|
1936
1935
|
try {
|
|
1937
|
-
var
|
|
1936
|
+
var redirectUri = window.location.origin + "/auth-redirect.html";
|
|
1937
|
+
var msalInstance = new PublicClientApplication(msalConfig(MICROSOFT_CLIENT_ID, redirectUri));
|
|
1938
1938
|
if (!msalInstance) {
|
|
1939
1939
|
console.error("MSAL instance not initialized");
|
|
1940
1940
|
return Promise.resolve();
|
|
@@ -1942,7 +1942,8 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1942
1942
|
return Promise.resolve(_catch(function () {
|
|
1943
1943
|
return Promise.resolve(msalInstance.initialize()).then(function () {
|
|
1944
1944
|
var loginRequest = {
|
|
1945
|
-
scopes: ["openid", "profile", "email"]
|
|
1945
|
+
scopes: ["openid", "profile", "email"],
|
|
1946
|
+
redirectUri: redirectUri
|
|
1946
1947
|
};
|
|
1947
1948
|
var silentRequest = _extends({}, loginRequest, {
|
|
1948
1949
|
prompt: "select_account"
|
|
@@ -3471,31 +3472,14 @@ var utcToLocalTime = (function (time, FORMAT) {
|
|
|
3471
3472
|
}
|
|
3472
3473
|
});
|
|
3473
3474
|
|
|
3474
|
-
var timeSpanToLocalMoment = (function (time
|
|
3475
|
+
var timeSpanToLocalMoment = (function (time) {
|
|
3475
3476
|
if (!time) return null;
|
|
3476
|
-
|
|
3477
|
-
if (
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
}
|
|
3483
|
-
var dateTime;
|
|
3484
|
-
var isOffset = /^(UTC|GMT)?[+-]/.test(timezone);
|
|
3485
|
-
console.log({
|
|
3486
|
-
isOffset: isOffset
|
|
3487
|
-
});
|
|
3488
|
-
if (isOffset) {
|
|
3489
|
-
var cleanOffset = timezone.replace(/UTC|GMT/gi, '').trim();
|
|
3490
|
-
console.log({
|
|
3491
|
-
cleanOffset: cleanOffset
|
|
3492
|
-
});
|
|
3493
|
-
dateTime = moment$1.utc(time, "HH:mm:ss").utcOffset(cleanOffset, true);
|
|
3494
|
-
} else {
|
|
3495
|
-
dateTime = moment$1.tz(time, "HH:mm:ss", timezone);
|
|
3496
|
-
}
|
|
3497
|
-
console.log("run time", dateTime.format("HH:mm:ss"), timezone);
|
|
3498
|
-
return dateTime;
|
|
3477
|
+
var times = time.split(":");
|
|
3478
|
+
if (times.length !== 3) return null;
|
|
3479
|
+
var totalSeconds = +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
|
3480
|
+
var startOfDay = moment.utc().startOf("day");
|
|
3481
|
+
var dateTime = startOfDay.add(totalSeconds, "seconds");
|
|
3482
|
+
return dateTime.local();
|
|
3499
3483
|
});
|
|
3500
3484
|
|
|
3501
3485
|
var historyCore = createBrowserHistory();
|