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