acsi-core 0.1.90 → 0.1.92
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/index.js +25 -33
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +25 -33
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,8 +47,8 @@ var PUSHER_CONFIG = {
|
|
|
47
47
|
cluster: process.env.REACT_APP_PUSHER_CONFIG_CLUSTER || "",
|
|
48
48
|
key: process.env.REACT_APP_PUSHER_CONFIG_KEY || ""
|
|
49
49
|
};
|
|
50
|
-
var MICROSOFT_CLIENT_ID = process.env.
|
|
51
|
-
var MICROSOFT_URL_DIRECT = process.env.
|
|
50
|
+
var MICROSOFT_CLIENT_ID = process.env.REACT_APP_MICROSOFT_CLIENT_ID || "";
|
|
51
|
+
var MICROSOFT_URL_DIRECT = process.env.REACT_APP_MICROSOFT_URL_DIRECT || "";
|
|
52
52
|
var OPENSALT_BASE_URL = process.env.REACT_APP_OPENSALT || "";
|
|
53
53
|
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
|
54
54
|
var AUTH_COOKIE = "auth";
|
|
@@ -80,25 +80,6 @@ var ORGANIZATION_TEAM = "ORGANIZATION_TEAM";
|
|
|
80
80
|
|
|
81
81
|
var styleGlobal = {"signup_wrap":"_1KLz9","box-signin":"_2Jo1o","signin_title":"_3egBO","signup_link":"_1DoIT","google_button":"_34hK_","microsoft_button":"_19ESb","box-field":"_2e9xO","box-input":"_3zXRp","box-text":"_8NJga","box-button-email":"_21FPk","box-signin-container":"_1QERu","box-signin-text":"_2-znH","box-signin-logo":"_1aB2m","box-right":"_3qndF","image-slideshow":"_1aM7m","active":"_Vx1zf","box-right-body":"_JzdCr","box-right-footer":"_19aCA","pr-30":"_2HB5r","width-400":"_4ehXP"};
|
|
82
82
|
|
|
83
|
-
// A type of promise-like that resolves synchronously and supports only one observer
|
|
84
|
-
|
|
85
|
-
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
86
|
-
|
|
87
|
-
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
88
|
-
|
|
89
|
-
// Asynchronously call a function and send errors to recovery continuation
|
|
90
|
-
function _catch(body, recover) {
|
|
91
|
-
try {
|
|
92
|
-
var result = body();
|
|
93
|
-
} catch(e) {
|
|
94
|
-
return recover(e);
|
|
95
|
-
}
|
|
96
|
-
if (result && result.then) {
|
|
97
|
-
return result.then(void 0, recover);
|
|
98
|
-
}
|
|
99
|
-
return result;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
83
|
function _extends() {
|
|
103
84
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
104
85
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -118,6 +99,25 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
118
99
|
return t;
|
|
119
100
|
}
|
|
120
101
|
|
|
102
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
103
|
+
|
|
104
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
105
|
+
|
|
106
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
107
|
+
|
|
108
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
109
|
+
function _catch(body, recover) {
|
|
110
|
+
try {
|
|
111
|
+
var result = body();
|
|
112
|
+
} catch(e) {
|
|
113
|
+
return recover(e);
|
|
114
|
+
}
|
|
115
|
+
if (result && result.then) {
|
|
116
|
+
return result.then(void 0, recover);
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
121
|
var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj","danger":"_2uYm1","light":"_wxH5S"};
|
|
122
122
|
|
|
123
123
|
var _excluded = ["type", "children", "onClick", "icon", "disabled", "htmlType"];
|
|
@@ -1417,16 +1417,16 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
return Promise.resolve(_catch(function () {
|
|
1419
1419
|
return Promise.resolve(msalInstance.initialize()).then(function () {
|
|
1420
|
-
console.log("MSAL instance initialized:", msalInstance);
|
|
1421
1420
|
var loginRequest = {
|
|
1422
1421
|
scopes: ["openid", "profile", "email"]
|
|
1423
1422
|
};
|
|
1424
|
-
|
|
1425
|
-
|
|
1423
|
+
var silentRequest = _extends({}, loginRequest, {
|
|
1424
|
+
prompt: "select_account"
|
|
1425
|
+
});
|
|
1426
|
+
return Promise.resolve(msalInstance.loginPopup(silentRequest)).then(function (response) {
|
|
1426
1427
|
return function () {
|
|
1427
1428
|
if (response && response.account) {
|
|
1428
1429
|
var account = response.account;
|
|
1429
|
-
console.log("User account:", account);
|
|
1430
1430
|
var fullName = (account === null || account === void 0 ? void 0 : account.name) || "";
|
|
1431
1431
|
var infoLogin = {
|
|
1432
1432
|
firstName: fullName.split(' ').slice(0, -1).join(' '),
|
|
@@ -1459,7 +1459,6 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1459
1459
|
timestamp: new Date().toISOString()
|
|
1460
1460
|
}
|
|
1461
1461
|
});
|
|
1462
|
-
console.log("Login info:", infoLogin);
|
|
1463
1462
|
if (role === "LandingPage") {
|
|
1464
1463
|
CookieService.setAuthCookie({
|
|
1465
1464
|
token: tokenJWT,
|
|
@@ -1561,11 +1560,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1561
1560
|
}, [images.length]);
|
|
1562
1561
|
var initInformationSSO = function initInformationSSO() {
|
|
1563
1562
|
try {
|
|
1564
|
-
console.log("Initializing Microsoft SSO with client ID:", MICROSOFT_CLIENT_ID, "and redirect URL:", MICROSOFT_URL_DIRECT);
|
|
1565
1563
|
var _msalInstance = new msalBrowser.PublicClientApplication(msalConfig(MICROSOFT_CLIENT_ID, MICROSOFT_URL_DIRECT));
|
|
1566
|
-
console.log({
|
|
1567
|
-
msalInstance: _msalInstance
|
|
1568
|
-
});
|
|
1569
1564
|
setMsalInstance(_msalInstance);
|
|
1570
1565
|
return Promise.resolve();
|
|
1571
1566
|
} catch (e) {
|
|
@@ -1573,9 +1568,6 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
1573
1568
|
}
|
|
1574
1569
|
};
|
|
1575
1570
|
React.useEffect(function () {
|
|
1576
|
-
console.log({
|
|
1577
|
-
TEACHER_ORIGIN: TEACHER_ORIGIN
|
|
1578
|
-
});
|
|
1579
1571
|
initInformationSSO();
|
|
1580
1572
|
}, []);
|
|
1581
1573
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(reactstrap.Row, {
|