@gridsuite/commons-ui 0.29.1 → 0.29.2
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.
|
@@ -109,9 +109,9 @@ var LogTable = function LogTable(_ref) {
|
|
|
109
109
|
});
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
var handleRowClick = function handleRowClick(event
|
|
113
|
-
setSelectedRowIndex(index);
|
|
114
|
-
onRowClick(
|
|
112
|
+
var handleRowClick = function handleRowClick(event) {
|
|
113
|
+
setSelectedRowIndex(event.index);
|
|
114
|
+
onRowClick(event.rowData);
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
var rowStyleFormat = function rowStyleFormat(row) {
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.useSnackMessage = exports.useIntlRef = exports.useImportExportParams = exports.treeview_finder_fr = exports.treeview_finder_en = exports.top_bar_fr = exports.top_bar_en = exports.table_fr = exports.table_en = exports.setSignInCallbackError = exports.setShowAuthenticationRouterLogin = exports.setLoggedUser = exports.report_viewer_fr = exports.report_viewer_en = exports.logout = exports.login_fr = exports.login_en = exports.initializeAuthenticationProd = exports.initializeAuthenticationDev = exports.getPreLoginPath = exports.getFileIcon = exports.getEquipmentsInfosForSearchBar = exports.equipment_search_fr = exports.equipment_search_en = exports.equipmentStyles = exports.element_search_fr = exports.element_search_en = exports.elementType = exports.dispatchUser = exports.card_error_boundary_fr = exports.card_error_boundary_en = exports.USER_VALIDATION_ERROR = exports.USER = exports.UNAUTHORIZED_USER_INFO = exports.TreeViewFinder = exports.TopBar = exports.TagRenderer = exports.SnackbarProvider = exports.SIGNIN_CALLBACK_ERROR = exports.SHOW_AUTH_INFO_LOGIN = exports.ReportViewerDialog = exports.ReportViewer = exports.OverflowableText = exports.MuiVirtualizedTable = exports.LOGOUT_ERROR = exports.LIGHT_THEME = exports.LANG_SYSTEM = exports.LANG_FRENCH = exports.LANG_ENGLISH = exports.EquipmentItem = exports.ElementSearchDialog = exports.EQUIPMENT_TYPE = exports.DEFAULT_ROW_HEIGHT = exports.DEFAULT_HEADER_HEIGHT = exports.DEFAULT_CELL_PADDING = exports.DARK_THEME = exports.CardErrorBoundary = exports.AuthenticationRouter = void 0;
|
|
4
|
+
exports.useSnackMessage = exports.useIntlRef = exports.useImportExportParams = exports.treeview_finder_fr = exports.treeview_finder_en = exports.top_bar_fr = exports.top_bar_en = exports.table_fr = exports.table_en = exports.setSignInCallbackError = exports.setShowAuthenticationRouterLogin = exports.setLoggedUser = exports.report_viewer_fr = exports.report_viewer_en = exports.logout = exports.login_fr = exports.login_en = exports.initializeAuthenticationProd = exports.initializeAuthenticationDev = exports.getPreLoginPath = exports.getFileIcon = exports.getEquipmentsInfosForSearchBar = exports.equipment_search_fr = exports.equipment_search_en = exports.equipmentStyles = exports.element_search_fr = exports.element_search_en = exports.elementType = exports.dispatchUser = exports.card_error_boundary_fr = exports.card_error_boundary_en = exports.USER_VALIDATION_ERROR = exports.USER = exports.UNAUTHORIZED_USER_INFO = exports.TreeViewFinder = exports.TopBar = exports.TagRenderer = exports.SnackbarProvider = exports.SIGNIN_CALLBACK_ERROR = exports.SHOW_AUTH_INFO_LOGIN = exports.ReportViewerDialog = exports.ReportViewer = exports.RESET_AUTHENTICATION_ROUTER_ERROR = exports.OverflowableText = exports.MuiVirtualizedTable = exports.LOGOUT_ERROR = exports.LIGHT_THEME = exports.LANG_SYSTEM = exports.LANG_FRENCH = exports.LANG_ENGLISH = exports.EquipmentItem = exports.ElementSearchDialog = exports.EQUIPMENT_TYPE = exports.DEFAULT_ROW_HEIGHT = exports.DEFAULT_HEADER_HEIGHT = exports.DEFAULT_CELL_PADDING = exports.DARK_THEME = exports.CardErrorBoundary = exports.AuthenticationRouter = void 0;
|
|
5
5
|
|
|
6
6
|
var _TreeViewFinder = _interopRequireDefault(require("./components/TreeViewFinder"));
|
|
7
7
|
|
|
@@ -82,6 +82,7 @@ exports.setSignInCallbackError = _actions.setSignInCallbackError;
|
|
|
82
82
|
exports.UNAUTHORIZED_USER_INFO = _actions.UNAUTHORIZED_USER_INFO;
|
|
83
83
|
exports.LOGOUT_ERROR = _actions.LOGOUT_ERROR;
|
|
84
84
|
exports.USER_VALIDATION_ERROR = _actions.USER_VALIDATION_ERROR;
|
|
85
|
+
exports.RESET_AUTHENTICATION_ROUTER_ERROR = _actions.RESET_AUTHENTICATION_ROUTER_ERROR;
|
|
85
86
|
exports.setShowAuthenticationRouterLogin = _actions.setShowAuthenticationRouterLogin;
|
|
86
87
|
exports.SHOW_AUTH_INFO_LOGIN = _actions.SHOW_AUTH_INFO_LOGIN;
|
|
87
88
|
|
package/lib/utils/AuthService.js
CHANGED
|
@@ -234,14 +234,16 @@ function handleUser(dispatch, userManager, validateUser) {
|
|
|
234
234
|
console.log('Error in silent renew, idtoken expired: ' + idTokenExpiresIn + ' => Logging out.', error); // TODO here allow to continue to use the app but in some kind of frozen state because we can't make API calls anymore
|
|
235
235
|
// remove the user from our app, but don't sso logout on all other apps
|
|
236
236
|
|
|
237
|
-
dispatch((0, _actions.setShowAuthenticationRouterLogin)(true));
|
|
237
|
+
dispatch((0, _actions.setShowAuthenticationRouterLogin)(true)); // logout during token expiration, show login without errors
|
|
238
|
+
|
|
239
|
+
dispatch((0, _actions.resetAuthenticationRouterError)());
|
|
238
240
|
return dispatch((0, _actions.setLoggedUser)(null));
|
|
239
241
|
} else if (userManager.idpSettings.maxExpiresIn) {
|
|
240
242
|
if (idTokenExpiresIn < userManager.idpSettings.maxExpiresIn) {
|
|
241
243
|
// TODO here attempt last chance login ? snackbar to notify the user ? Popup ?
|
|
242
244
|
// for now we do the same thing as in the else block
|
|
243
|
-
console.log('Error in silent renew, but idtoken ALMOST expiring (expiring in' + idTokenExpiresIn + ') => last chance' + userManager.idpSettings.maxExpiresIn, error);
|
|
244
|
-
user.expires_in =
|
|
245
|
+
console.log('Error in silent renew, but idtoken ALMOST expiring (expiring in' + idTokenExpiresIn + ') => last chance, next error will logout', 'maxExpiresIn = ' + userManager.idpSettings.maxExpiresIn, 'last renew attempt in ' + idTokenExpiresIn - accessTokenExpiringNotificationTime + 'seconds', error);
|
|
246
|
+
user.expires_in = idTokenExpiresIn;
|
|
245
247
|
userManager.storeUser(user).then(function () {
|
|
246
248
|
userManager.getUser();
|
|
247
249
|
});
|
package/lib/utils/actions.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.USER_VALIDATION_ERROR = exports.USER = exports.UNAUTHORIZED_USER_INFO = exports.SIGNIN_CALLBACK_ERROR = exports.SHOW_AUTH_INFO_LOGIN = exports.LOGOUT_ERROR = void 0;
|
|
4
|
+
exports.USER_VALIDATION_ERROR = exports.USER = exports.UNAUTHORIZED_USER_INFO = exports.SIGNIN_CALLBACK_ERROR = exports.SHOW_AUTH_INFO_LOGIN = exports.RESET_AUTHENTICATION_ROUTER_ERROR = exports.LOGOUT_ERROR = void 0;
|
|
5
|
+
exports.resetAuthenticationRouterError = resetAuthenticationRouterError;
|
|
5
6
|
exports.setLoggedUser = setLoggedUser;
|
|
6
7
|
exports.setLogoutError = setLogoutError;
|
|
7
8
|
exports.setShowAuthenticationRouterLogin = setShowAuthenticationRouterLogin;
|
|
@@ -74,6 +75,16 @@ function setUserValidationError(userName, userValidationError) {
|
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
var RESET_AUTHENTICATION_ROUTER_ERROR = 'RESET_AUTHENTICATION_ROUTER_ERROR';
|
|
79
|
+
exports.RESET_AUTHENTICATION_ROUTER_ERROR = RESET_AUTHENTICATION_ROUTER_ERROR;
|
|
80
|
+
|
|
81
|
+
function resetAuthenticationRouterError() {
|
|
82
|
+
return {
|
|
83
|
+
type: RESET_AUTHENTICATION_ROUTER_ERROR,
|
|
84
|
+
authenticationRouterError: null
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
77
88
|
var SHOW_AUTH_INFO_LOGIN = 'SHOW_AUTH_INFO_LOGIN';
|
|
78
89
|
exports.SHOW_AUTH_INFO_LOGIN = SHOW_AUTH_INFO_LOGIN;
|
|
79
90
|
|