@opengeoweb/authentication 9.35.1-spike-oltanstack.0 → 9.36.0
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
|
@@ -4,12 +4,13 @@ import React__default, { useRef } from 'react';
|
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { Navigate, Link } from 'react-router-dom';
|
|
6
6
|
import { useIsMounted, SHARED_NAMESPACE, AlertBanner, useDebounce } from '@opengeoweb/shared';
|
|
7
|
+
import { snackbarReducer, snackbarListener, snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
|
|
8
|
+
import { configureStore } from '@reduxjs/toolkit';
|
|
7
9
|
import { ThemeWrapper } from '@opengeoweb/theme';
|
|
8
10
|
import { useTranslation, Trans } from 'react-i18next';
|
|
9
11
|
import 'i18next';
|
|
10
12
|
import { Box, LinearProgress, FormGroup, FormLabel, FormControlLabel, Radio } from '@mui/material';
|
|
11
13
|
import { useDispatch } from 'react-redux';
|
|
12
|
-
import { snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
|
|
13
14
|
|
|
14
15
|
var en$1 = {
|
|
15
16
|
"auth-logout-go-back-to-home-page": "Go back to the <1>Home Page</1>",
|
|
@@ -1194,13 +1195,25 @@ var HandleOAuth2Code = function HandleOAuth2Code() {
|
|
|
1194
1195
|
* See the License for the specific language governing permissions and
|
|
1195
1196
|
* limitations under the License.
|
|
1196
1197
|
*
|
|
1197
|
-
* Copyright
|
|
1198
|
-
* Copyright
|
|
1198
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1199
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
1199
1200
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1200
1201
|
* */
|
|
1201
1202
|
var getCurrentUrlLocation = function getCurrentUrlLocation(url, appUrl) {
|
|
1202
1203
|
return url ? url.replace(appUrl, '') : '/';
|
|
1203
1204
|
};
|
|
1205
|
+
var createAuthenticationTestStore = function createAuthenticationTestStore(preloadedState) {
|
|
1206
|
+
var store = configureStore({
|
|
1207
|
+
reducer: {
|
|
1208
|
+
snackbar: snackbarReducer
|
|
1209
|
+
},
|
|
1210
|
+
middleware: function middleware(getDefaultMiddleware) {
|
|
1211
|
+
return getDefaultMiddleware().prepend(snackbarListener.middleware);
|
|
1212
|
+
},
|
|
1213
|
+
preloadedState: preloadedState
|
|
1214
|
+
});
|
|
1215
|
+
return store;
|
|
1216
|
+
};
|
|
1204
1217
|
|
|
1205
1218
|
/* *
|
|
1206
1219
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1534,4 +1547,4 @@ var useApi = function useApi(apiCall, params, callbacks) {
|
|
|
1534
1547
|
};
|
|
1535
1548
|
};
|
|
1536
1549
|
|
|
1537
|
-
export { AUTH_NAMESPACE, ApiProvider, AuthenticationContext, AuthenticationProvider, HandleOAuth2Code as Code, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER, KEEP_ALIVE_POLLER_IN_SECONDS, OAuth2Login as Login, OAuth2Logout as Logout, MILLISECOND_TO_SECOND, REFRESH_TOKEN_WHEN_PCT_EXPIRED, RequireAuth, SessionStorageKey, UserMenuRoles, UserMenuRolesConnect, apiTranslations, authTranslations, createApiInstance, createFakeApiInstance, createNonAuthApiInstance, fakeApiRequest, getApi, getAuthConfig, getCodeChallenge, getConfig, getCurrentTimeInSeconds, getCurrentUrlLocation, getRandomString, getSessionStorageProvider, groupsToRoles, makeCredentialsFromTokenResponse, refreshAccessToken, refreshAccessTokenAndSetAuthContext, useApi, useApiContext, useAuthenticationContext, useAuthenticationDefaultProps };
|
|
1550
|
+
export { AUTH_NAMESPACE, ApiProvider, AuthenticationContext, AuthenticationProvider, HandleOAuth2Code as Code, GEOWEB_ROLE_PRESETS_ADMIN, GEOWEB_ROLE_USER, KEEP_ALIVE_POLLER_IN_SECONDS, OAuth2Login as Login, OAuth2Logout as Logout, MILLISECOND_TO_SECOND, REFRESH_TOKEN_WHEN_PCT_EXPIRED, RequireAuth, SessionStorageKey, UserMenuRoles, UserMenuRolesConnect, apiTranslations, authTranslations, createApiInstance, createAuthenticationTestStore, createFakeApiInstance, createNonAuthApiInstance, fakeApiRequest, getApi, getAuthConfig, getCodeChallenge, getConfig, getCurrentTimeInSeconds, getCurrentUrlLocation, getRandomString, getSessionStorageProvider, groupsToRoles, makeCredentialsFromTokenResponse, refreshAccessToken, refreshAccessTokenAndSetAuthContext, useApi, useApiContext, useAuthenticationContext, useAuthenticationDefaultProps };
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Store } from '@reduxjs/toolkit';
|
|
3
|
+
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
3
4
|
interface AuthTranslationWrapperProps {
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
}
|
|
@@ -8,4 +9,8 @@ export declare const DemoWrapper: React.FC<AuthTranslationWrapperProps>;
|
|
|
8
9
|
export declare const DemoWrapperConnect: React.FC<AuthTranslationWrapperProps & {
|
|
9
10
|
store: Store;
|
|
10
11
|
}>;
|
|
12
|
+
export declare const createTestAuthenticationStore: () => ToolkitStore;
|
|
13
|
+
export declare const DemoWrapperNoEggsConnect: React.FC<AuthTranslationWrapperProps & {
|
|
14
|
+
store: Store;
|
|
15
|
+
}>;
|
|
11
16
|
export {};
|
package/src/lib/utils/utils.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
2
|
+
import { ConfigureStoreOptions, ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
1
3
|
export declare const getCurrentUrlLocation: (url: string, appUrl: string) => string;
|
|
4
|
+
export declare const createAuthenticationTestStore: (preloadedState?: ConfigureStoreOptions['preloadedState']) => ToolkitStore<snackbarTypes.SnackbarModuleStore>;
|