@opengeoweb/authentication 9.22.0 → 9.23.1
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/index.esm.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { Navigate, useLocation, Link } from 'react-router-dom';
|
|
5
|
-
import { useIsMounted, AlertBanner } from '@opengeoweb/shared';
|
|
6
|
-
import { KEEP_ALIVE_POLLER_IN_SECONDS, MILLISECOND_TO_SECOND, getCurrentTimeInSeconds, refreshAccessTokenAndSetAuthContext, makeCredentialsFromTokenResponse, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER } from '@opengeoweb/api';
|
|
5
|
+
import { useIsMounted, SHARED_NAMESPACE, AlertBanner } from '@opengeoweb/shared';
|
|
6
|
+
import { KEEP_ALIVE_POLLER_IN_SECONDS, MILLISECOND_TO_SECOND, getCurrentTimeInSeconds, refreshAccessTokenAndSetAuthContext, makeCredentialsFromTokenResponse, API_NAMESPACE, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER } from '@opengeoweb/api';
|
|
7
7
|
import { ThemeWrapper } from '@opengeoweb/theme';
|
|
8
8
|
import { useTranslation, Trans } from 'react-i18next';
|
|
9
9
|
import 'i18next';
|
|
@@ -24,10 +24,10 @@ var fi = {
|
|
|
24
24
|
"auth-role-message-assigned": "🚧 ei käännetty"
|
|
25
25
|
};
|
|
26
26
|
var no = {
|
|
27
|
-
"auth-logout-go-back-to-home-page": "
|
|
28
|
-
"auth-logout-you-are-logged-out": "
|
|
29
|
-
"auth-role-title": "
|
|
30
|
-
"auth-role-message-assigned": "
|
|
27
|
+
"auth-logout-go-back-to-home-page": "Gå tilbake til <1>Hjemmesiden</1>",
|
|
28
|
+
"auth-logout-you-are-logged-out": "Du er logget ut",
|
|
29
|
+
"auth-role-title": "Rolle",
|
|
30
|
+
"auth-role-message-assigned": "Rolle {{role}} har blitt tildelt"
|
|
31
31
|
};
|
|
32
32
|
var nl = {
|
|
33
33
|
"auth-logout-go-back-to-home-page": "Ga terug naar de <1>Startpagina</1>",
|
|
@@ -5881,7 +5881,8 @@ const OAuth2Login = () => {
|
|
|
5881
5881
|
};
|
|
5882
5882
|
|
|
5883
5883
|
const AUTH_NAMESPACE = 'auth';
|
|
5884
|
-
const
|
|
5884
|
+
const ns = [AUTH_NAMESPACE, API_NAMESPACE, SHARED_NAMESPACE];
|
|
5885
|
+
const useAuthenticationTranslation = () => useTranslation(ns);
|
|
5885
5886
|
|
|
5886
5887
|
const OAuth2Logout = () => {
|
|
5887
5888
|
const {
|
|
@@ -5962,7 +5963,7 @@ const UserMenuRoles = ({
|
|
|
5962
5963
|
disabled: isLoading,
|
|
5963
5964
|
checked: _currentRole === role.name
|
|
5964
5965
|
}),
|
|
5965
|
-
label: role.
|
|
5966
|
+
label: role.getTitle(t),
|
|
5966
5967
|
onChange: () => onChangeRole(role)
|
|
5967
5968
|
}, role.name))]
|
|
5968
5969
|
})]
|
|
@@ -6742,7 +6743,7 @@ const UserMenuRolesConnect = ({
|
|
|
6742
6743
|
setCurrentRole(role.name);
|
|
6743
6744
|
_temporaryOnChangeRoleForDemo(role);
|
|
6744
6745
|
const message = t('auth-role-message-assigned', {
|
|
6745
|
-
role: role.
|
|
6746
|
+
role: role.getTitle(t)
|
|
6746
6747
|
});
|
|
6747
6748
|
dispatch(snackbarActions.openSnackbar({
|
|
6748
6749
|
message
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/authentication",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.23.1",
|
|
4
4
|
"description": "GeoWeb authentication library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"axios": "1.5.0",
|
|
12
12
|
"@opengeoweb/api": "*",
|
|
13
|
-
"react-router-dom": "^6.
|
|
13
|
+
"react-router-dom": "^6.23.1",
|
|
14
14
|
"@opengeoweb/shared": "*",
|
|
15
15
|
"@opengeoweb/theme": "*",
|
|
16
16
|
"i18next": "^23.11.5",
|
|
17
17
|
"react-i18next": "^14.1.2",
|
|
18
|
-
"@opengeoweb/snackbar": "9.
|
|
18
|
+
"@opengeoweb/snackbar": "9.23.1",
|
|
19
19
|
"react-redux": "^8.1.3",
|
|
20
20
|
"@reduxjs/toolkit": "^1.9.7",
|
|
21
21
|
"@mui/material": "^5.16.0"
|