acsi-core 0.1.91 → 0.1.94

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 CHANGED
@@ -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"];
@@ -1302,9 +1302,6 @@ var BlockLogin = function BlockLogin(_ref) {
1302
1302
  var _useState5 = React.useState(0),
1303
1303
  currentImageIndex = _useState5[0],
1304
1304
  setCurrentImageIndex = _useState5[1];
1305
- var _useState6 = React.useState(),
1306
- msalInstance = _useState6[0],
1307
- setMsalInstance = _useState6[1];
1308
1305
  var handleGetImage = function handleGetImage() {
1309
1306
  try {
1310
1307
  var _temp = _catch(function () {
@@ -1411,6 +1408,7 @@ var BlockLogin = function BlockLogin(_ref) {
1411
1408
  });
1412
1409
  var fnLoginMicrosoft = function fnLoginMicrosoft() {
1413
1410
  try {
1411
+ var msalInstance = new msalBrowser.PublicClientApplication(msalConfig(MICROSOFT_CLIENT_ID, MICROSOFT_URL_DIRECT));
1414
1412
  if (!msalInstance) {
1415
1413
  console.error("MSAL instance not initialized");
1416
1414
  return Promise.resolve();
@@ -1420,7 +1418,10 @@ var BlockLogin = function BlockLogin(_ref) {
1420
1418
  var loginRequest = {
1421
1419
  scopes: ["openid", "profile", "email"]
1422
1420
  };
1423
- return Promise.resolve(msalInstance.loginPopup(loginRequest)).then(function (response) {
1421
+ var silentRequest = _extends({}, loginRequest, {
1422
+ prompt: "select_account"
1423
+ });
1424
+ return Promise.resolve(msalInstance.loginPopup(silentRequest)).then(function (response) {
1424
1425
  return function () {
1425
1426
  if (response && response.account) {
1426
1427
  var account = response.account;
@@ -1485,7 +1486,6 @@ var BlockLogin = function BlockLogin(_ref) {
1485
1486
  });
1486
1487
  }, function (error) {
1487
1488
  console.error("Microsoft login error:", error);
1488
- alert("Microsoft login failed. Please try again.");
1489
1489
  }));
1490
1490
  } catch (e) {
1491
1491
  return Promise.reject(e);
@@ -1555,18 +1555,6 @@ var BlockLogin = function BlockLogin(_ref) {
1555
1555
  return clearInterval(interval);
1556
1556
  };
1557
1557
  }, [images.length]);
1558
- var initInformationSSO = function initInformationSSO() {
1559
- try {
1560
- var _msalInstance = new msalBrowser.PublicClientApplication(msalConfig(MICROSOFT_CLIENT_ID, MICROSOFT_URL_DIRECT));
1561
- setMsalInstance(_msalInstance);
1562
- return Promise.resolve();
1563
- } catch (e) {
1564
- return Promise.reject(e);
1565
- }
1566
- };
1567
- React.useEffect(function () {
1568
- initInformationSSO();
1569
- }, []);
1570
1558
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(reactstrap.Row, {
1571
1559
  style: {
1572
1560
  height: "100%"