@gridsuite/commons-ui 0.29.0 → 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.
|
@@ -227,22 +227,20 @@ var MuiVirtualizedTable = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
227
227
|
return (0, _clsx3["default"])(classes.tableRow, classes.flexContainer, index % 2 === 0 && classes.rowBackgroundDark, index % 2 !== 0 && classes.rowBackgroundLight, ((_rowGetter = rowGetter(index)) === null || _rowGetter === void 0 ? void 0 : _rowGetter.notClickable) === true && classes.noClick, (_clsx = {}, _clsx[classes.tableRowHover] = index !== -1 && onRowClick != null && !(((_rowGetter2 = rowGetter(index)) === null || _rowGetter2 === void 0 ? void 0 : _rowGetter2.notClickable) === true), _clsx));
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
_defineProperty(_assertThisInitialized(_this), "onClickableRowClick", function (
|
|
231
|
-
var
|
|
232
|
-
index = _ref3.index,
|
|
233
|
-
rowData = _ref3.rowData;
|
|
230
|
+
_defineProperty(_assertThisInitialized(_this), "onClickableRowClick", function (event) {
|
|
231
|
+
var _event$rowData;
|
|
234
232
|
|
|
235
|
-
if (!((rowData === null || rowData === void 0 ? void 0 : rowData.notClickable) === true)) {
|
|
236
|
-
_this.props.onRowClick(
|
|
233
|
+
if (!(((_event$rowData = event.rowData) === null || _event$rowData === void 0 ? void 0 : _event$rowData.notClickable) === true)) {
|
|
234
|
+
_this.props.onRowClick(event);
|
|
237
235
|
}
|
|
238
236
|
});
|
|
239
237
|
|
|
240
|
-
_defineProperty(_assertThisInitialized(_this), "cellRenderer", function (
|
|
238
|
+
_defineProperty(_assertThisInitialized(_this), "cellRenderer", function (_ref3) {
|
|
241
239
|
var _rows$rowIndex, _rows$rowIndex2, _clsx2;
|
|
242
240
|
|
|
243
|
-
var cellData =
|
|
244
|
-
columnIndex =
|
|
245
|
-
rowIndex =
|
|
241
|
+
var cellData = _ref3.cellData,
|
|
242
|
+
columnIndex = _ref3.columnIndex,
|
|
243
|
+
rowIndex = _ref3.rowIndex;
|
|
246
244
|
var _this$props3 = _this.props,
|
|
247
245
|
columns = _this$props3.columns,
|
|
248
246
|
classes = _this$props3.classes,
|
|
@@ -274,9 +272,9 @@ var MuiVirtualizedTable = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
274
272
|
}));
|
|
275
273
|
});
|
|
276
274
|
|
|
277
|
-
_defineProperty(_assertThisInitialized(_this), "headerRenderer", function (
|
|
278
|
-
var label =
|
|
279
|
-
columnIndex =
|
|
275
|
+
_defineProperty(_assertThisInitialized(_this), "headerRenderer", function (_ref4) {
|
|
276
|
+
var label = _ref4.label,
|
|
277
|
+
columnIndex = _ref4.columnIndex;
|
|
280
278
|
var _this$props4 = _this.props,
|
|
281
279
|
columns = _this$props4.columns,
|
|
282
280
|
classes = _this$props4.classes;
|
|
@@ -487,9 +485,9 @@ var MuiVirtualizedTable = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
487
485
|
style: {
|
|
488
486
|
flexGrow: 1
|
|
489
487
|
}
|
|
490
|
-
}, /*#__PURE__*/_react["default"].createElement(_reactVirtualized.AutoSizer, null, function (
|
|
491
|
-
var height =
|
|
492
|
-
width =
|
|
488
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactVirtualized.AutoSizer, null, function (_ref5) {
|
|
489
|
+
var height = _ref5.height,
|
|
490
|
+
width = _ref5.width;
|
|
493
491
|
return /*#__PURE__*/_react["default"].createElement(_reactVirtualized.Table, _extends({
|
|
494
492
|
height: height,
|
|
495
493
|
width: width,
|
|
@@ -501,20 +499,20 @@ var MuiVirtualizedTable = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
501
499
|
className: classes.table
|
|
502
500
|
}, tableProps, {
|
|
503
501
|
rowCount: reorderedIndex.length,
|
|
504
|
-
rowClassName: function rowClassName(
|
|
505
|
-
var index =
|
|
502
|
+
rowClassName: function rowClassName(_ref6) {
|
|
503
|
+
var index = _ref6.index;
|
|
506
504
|
return _this2.getRowClassName({
|
|
507
505
|
index: index,
|
|
508
506
|
rowGetter: _rowGetter3
|
|
509
507
|
});
|
|
510
508
|
},
|
|
511
|
-
rowGetter: function rowGetter(
|
|
512
|
-
var index =
|
|
509
|
+
rowGetter: function rowGetter(_ref7) {
|
|
510
|
+
var index = _ref7.index;
|
|
513
511
|
return _rowGetter3(index);
|
|
514
512
|
}
|
|
515
|
-
}), columns.map(function (
|
|
516
|
-
var dataKey =
|
|
517
|
-
other = _objectWithoutPropertiesLoose(
|
|
513
|
+
}), columns.map(function (_ref8, index) {
|
|
514
|
+
var dataKey = _ref8.dataKey,
|
|
515
|
+
other = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
518
516
|
|
|
519
517
|
return /*#__PURE__*/_react["default"].createElement(_reactVirtualized.Column, _extends({
|
|
520
518
|
key: dataKey,
|
|
@@ -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
|
|