@zengenti/contensis-react-base 2.4.1-beta.7 → 2.5.1-beta.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/CHANGELOG.md +61 -0
- package/README.md +89 -0
- package/cjs/{App-f3164dab.js → App-8f560cc5.js} +236 -22
- package/cjs/App-8f560cc5.js.map +1 -0
- package/cjs/{RouteLoader-5c44f039.js → RouteLoader-f99cd734.js} +14 -41
- package/cjs/RouteLoader-f99cd734.js.map +1 -0
- package/cjs/{ToJs-ca9bea03.js → ToJs-d72e5b10.js} +58 -2
- package/cjs/ToJs-d72e5b10.js.map +1 -0
- package/cjs/{actions-e22726ed.js → actions-e9f69947.js} +1 -1
- package/cjs/actions-e9f69947.js.map +1 -0
- package/cjs/client.js +121 -16
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +128 -118
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +1 -1
- package/cjs/{login-6c0ef139.js → login-4f274c6a.js} +8 -5
- package/cjs/login-4f274c6a.js.map +1 -0
- package/cjs/reducers-cb531715.js +207 -0
- package/cjs/reducers-cb531715.js.map +1 -0
- package/cjs/redux.js +15 -16
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +4 -5
- package/cjs/routing.js.map +1 -1
- package/cjs/search.js +6 -4
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-69c3d37c.js → selectors-1295124a.js} +9 -1
- package/cjs/selectors-1295124a.js.map +1 -0
- package/cjs/user.js +82 -27
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +21 -91
- package/cjs/util.js.map +1 -1
- package/cjs/{injectors-72d5b989.js → version-3a808c12.js} +21 -6
- package/cjs/version-3a808c12.js.map +1 -0
- package/esm/{App-08311b77.js → App-d468b2a6.js} +223 -8
- package/esm/App-d468b2a6.js.map +1 -0
- package/esm/{RouteLoader-2cfdfc5c.js → RouteLoader-281d47e1.js} +14 -40
- package/esm/RouteLoader-281d47e1.js.map +1 -0
- package/esm/{ToJs-19a3244a.js → ToJs-6e7b247c.js} +47 -3
- package/esm/ToJs-6e7b247c.js.map +1 -0
- package/esm/{actions-fda5e103.js → actions-ddd9c623.js} +1 -1
- package/esm/actions-ddd9c623.js.map +1 -0
- package/esm/client.js +121 -16
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +122 -112
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +1 -1
- package/esm/{login-c05fee0e.js → login-1f9ad133.js} +8 -6
- package/esm/login-1f9ad133.js.map +1 -0
- package/esm/reducers-feab84fc.js +183 -0
- package/esm/reducers-feab84fc.js.map +1 -0
- package/esm/redux.js +5 -6
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +4 -5
- package/esm/routing.js.map +1 -1
- package/esm/search.js +6 -4
- package/esm/search.js.map +1 -1
- package/esm/{selectors-170581d2.js → selectors-68799788.js} +9 -1
- package/esm/selectors-68799788.js.map +1 -0
- package/esm/user.js +80 -29
- package/esm/user.js.map +1 -1
- package/esm/util.js +20 -90
- package/esm/util.js.map +1 -1
- package/esm/{injectors-3cbe3981.js → version-64906b26.js} +20 -5
- package/esm/version-64906b26.js.map +1 -0
- package/models/app/App.d.ts +4 -0
- package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +40 -0
- package/models/app/pages/VersionInfo/components/VersionInfo.styled.d.ts +1 -0
- package/models/app/pages/VersionInfo/index.d.ts +2 -0
- package/models/app/pages/VersionInfo/transformations/state-to-versioninfoprops.mapper.d.ts +3 -0
- package/models/client/client.d.ts +11 -0
- package/models/client/index.d.ts +3 -0
- package/models/config.d.ts +33 -0
- package/models/forms/index.d.ts +1 -0
- package/models/index.d.ts +5 -0
- package/models/redux/actions/index.d.ts +9 -0
- package/models/redux/actions/navigation.d.ts +1 -0
- package/models/redux/actions/version.d.ts +2 -0
- package/models/redux/index.d.ts +17 -0
- package/models/redux/reducers/navigation.d.ts +3 -0
- package/models/redux/reducers/version.d.ts +3 -0
- package/models/redux/sagas/index.d.ts +1 -0
- package/models/redux/sagas/navigation.d.ts +4 -0
- package/models/redux/selectors/index.d.ts +9 -0
- package/models/redux/selectors/navigation.d.ts +3 -0
- package/models/redux/selectors/version.d.ts +3 -0
- package/models/redux/store/history.d.ts +2 -0
- package/models/redux/store/injectors.d.ts +19 -0
- package/models/redux/store/routerMiddleware.d.ts +7 -0
- package/models/redux/store/store.d.ts +3 -0
- package/models/redux/types/index.d.ts +9 -0
- package/models/redux/types/navigation.d.ts +3 -0
- package/models/redux/types/version.d.ts +2 -0
- package/models/redux/util.d.ts +1 -0
- package/models/routing/components/Loading.d.ts +5 -0
- package/models/routing/components/NotFound.d.ts +6 -0
- package/models/routing/components/RouteLoader.d.ts +3 -0
- package/models/routing/components/Status.d.ts +4 -0
- package/models/routing/index.d.ts +4 -0
- package/models/routing/redux/actions.d.ts +6 -0
- package/models/routing/redux/reducers.d.ts +4 -0
- package/models/routing/redux/sagas.d.ts +1 -0
- package/models/routing/redux/selectors.d.ts +25 -0
- package/models/routing/redux/types.d.ts +12 -0
- package/models/routing/routes.d.ts +98 -0
- package/models/routing/util/expressions.d.ts +2 -0
- package/models/routing/util/find-contenttype-mapping.d.ts +2 -0
- package/models/routing/util/queries.d.ts +2 -0
- package/models/search/containers/withListing.d.ts +4 -0
- package/models/search/containers/withSearch.d.ts +4 -0
- package/models/search/hooks/useMinilist.hook.d.ts +23 -0
- package/models/search/index.d.ts +16 -0
- package/models/search/models/Enums.d.ts +5 -0
- package/models/search/models/Queries.d.ts +43 -0
- package/models/search/models/Search.d.ts +180 -0
- package/models/search/models/SearchActions.d.ts +127 -0
- package/models/search/models/SearchProps.d.ts +45 -0
- package/models/search/models/SearchState.d.ts +83 -0
- package/models/search/models/SearchUtil.d.ts +6 -0
- package/models/search/models/index.d.ts +3 -0
- package/models/search/redux/actions.d.ts +39 -0
- package/models/search/redux/queries.d.ts +3 -0
- package/models/search/redux/reducers.d.ts +4 -0
- package/models/search/redux/sagas.d.ts +20 -0
- package/models/search/redux/schema.d.ts +9 -0
- package/models/search/redux/selectors.d.ts +112 -0
- package/models/search/redux/types.d.ts +20 -0
- package/models/search/redux/util.d.ts +25 -0
- package/models/search/search/ContensisDeliveryApi.d.ts +32 -0
- package/models/search/search/ToJs.d.ts +4 -0
- package/models/search/search/expressions.d.ts +29 -0
- package/models/search/search/performance.d.ts +1 -0
- package/models/search/search/schema.d.ts +28 -0
- package/models/search/search/util.d.ts +21 -0
- package/models/search/transformations/entry-to-filteritem.mapper.d.ts +2 -0
- package/models/search/transformations/filters-to-filterexpression.d.ts +1 -0
- package/models/search/transformations/filters-to-filterexpression.mapper.d.ts +2 -0
- package/models/search/transformations/searchresult-to-state.mapper.d.ts +6 -0
- package/models/search/transformations/state-to-queryparams.mapper.d.ts +12 -0
- package/models/search/transformations/state-to-searchuri.d.ts +14 -0
- package/models/server/features/caching/cacheDuration.schema.d.ts +7 -0
- package/models/server/features/caching/cacheHashing.d.ts +1 -0
- package/models/server/features/caching/setCachingHeaders.d.ts +6 -0
- package/models/server/features/response-handler/index.d.ts +12 -0
- package/models/server/features/response-handler/types.d.ts +5 -0
- package/models/server/features/reverse-proxy/index.d.ts +4 -0
- package/models/server/features/static-assets/index.d.ts +14 -0
- package/models/server/internalServer.d.ts +10 -0
- package/models/server/middleware/bundleManipulation.d.ts +6 -0
- package/models/server/middleware/resolveStartup.d.ts +13 -0
- package/models/server/util/bundles.d.ts +46 -0
- package/models/server/util/displayStartupConfiguration.d.ts +2 -0
- package/models/server/util/headers.d.ts +9 -0
- package/models/server/util/staticPaths.d.ts +1 -0
- package/models/server/util/stringifyAttributes.d.ts +2 -0
- package/models/server/webApp.d.ts +9 -0
- package/models/testImmer/redux/reducer.d.ts +8 -0
- package/models/testImmer/redux/selectors.d.ts +3 -0
- package/models/user/components/Login.d.ts +2 -0
- package/models/user/components/LoginForm.d.ts +16 -0
- package/models/user/components/LogoutForm.d.ts +12 -0
- package/models/user/components.styled/Login.styled.d.ts +2 -0
- package/models/user/components.styled/LoginForm.styled.d.ts +2 -0
- package/models/user/containers/ChangePassword.container.d.ts +2 -0
- package/models/user/containers/ForgotPassword.container.d.ts +2 -0
- package/models/user/containers/Login.container.d.ts +2 -0
- package/models/user/containers/Registration.container.d.ts +2 -0
- package/models/user/hocs/withLogin.d.ts +2 -0
- package/models/user/hocs/withRegistration.d.ts +2 -0
- package/models/user/hooks/useChangePassword.d.ts +9 -0
- package/models/user/hooks/useForgotPassword.d.ts +14 -0
- package/models/user/hooks/useLogin.d.ts +12 -0
- package/models/user/hooks/useRegistration.d.ts +8 -0
- package/models/user/index.d.ts +16 -0
- package/models/user/redux/actions.d.ts +6 -0
- package/models/user/redux/reducers.d.ts +4 -0
- package/models/user/redux/sagas/index.d.ts +1 -0
- package/models/user/redux/sagas/login.d.ts +36 -0
- package/models/user/redux/sagas/register.d.ts +1 -0
- package/models/user/redux/sagas/resetPassword.d.ts +1 -0
- package/models/user/redux/selectors.d.ts +27 -0
- package/models/user/redux/types.d.ts +21 -0
- package/models/user/transformations/mapClientCredentials.d.ts +2 -0
- package/models/user/util/ContensisManagementApi.d.ts +9 -0
- package/models/user/util/CookieHelper.class.d.ts +5 -0
- package/models/user/util/LoginHelper.class.d.ts +52 -0
- package/models/user/util/OidcUserManager.d.ts +18 -0
- package/models/user/util/matchGroups.d.ts +3 -0
- package/models/user/util/userHelper.d.ts +12 -0
- package/models/util/ContensisDeliveryApi.d.ts +40 -0
- package/models/util/ToJs.d.ts +1 -0
- package/models/util/fromJSLeaveImmer.d.ts +2 -0
- package/models/util/fromJSOrdered.d.ts +2 -0
- package/models/util/index.d.ts +5 -0
- package/models/util/json-mapper.d.ts +81 -0
- package/models/util/navHelper.d.ts +7 -0
- package/models/util/navigation.d.ts +4 -0
- package/models/util/performance.d.ts +1 -0
- package/models/util/pickProject.d.ts +2 -0
- package/models/{schema.d.ts → util/schema.d.ts} +0 -0
- package/models/util/stringifyStrings.d.ts +2 -0
- package/models/util/urls.d.ts +9 -0
- package/package-lock.json +7831 -7713
- package/package.json +24 -14
- package/cjs/App-f3164dab.js.map +0 -1
- package/cjs/RouteLoader-5c44f039.js.map +0 -1
- package/cjs/ToJs-ca9bea03.js.map +0 -1
- package/cjs/actions-e22726ed.js.map +0 -1
- package/cjs/injectors-72d5b989.js.map +0 -1
- package/cjs/login-6c0ef139.js.map +0 -1
- package/cjs/reducers-91e3e239.js +0 -119
- package/cjs/reducers-91e3e239.js.map +0 -1
- package/cjs/selectors-69c3d37c.js.map +0 -1
- package/cjs/version-7d8852f6.js +0 -23
- package/cjs/version-7d8852f6.js.map +0 -1
- package/esm/App-08311b77.js.map +0 -1
- package/esm/RouteLoader-2cfdfc5c.js.map +0 -1
- package/esm/ToJs-19a3244a.js.map +0 -1
- package/esm/actions-fda5e103.js.map +0 -1
- package/esm/injectors-3cbe3981.js.map +0 -1
- package/esm/login-c05fee0e.js.map +0 -1
- package/esm/reducers-f855681f.js +0 -108
- package/esm/reducers-f855681f.js.map +0 -1
- package/esm/selectors-170581d2.js.map +0 -1
- package/esm/version-937d57fb.js +0 -19
- package/esm/version-937d57fb.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default useLogin;
|
|
2
|
+
declare function useLogin(): {
|
|
3
|
+
loginUser: (username: any, password: any) => any;
|
|
4
|
+
logoutUser: (redirectPath: any) => any;
|
|
5
|
+
authenticationError: any;
|
|
6
|
+
authenticationErrorMessage: any;
|
|
7
|
+
error: any;
|
|
8
|
+
errorMessage: any;
|
|
9
|
+
isAuthenticated: any;
|
|
10
|
+
isLoading: any;
|
|
11
|
+
user: any;
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { LoginHelper } from './util/LoginHelper.class';
|
|
2
|
+
export { default as LoginContainer } from './containers/Login.container';
|
|
3
|
+
export { default as RegistrationContainer } from './containers/Registration.container';
|
|
4
|
+
export { default as ForgotPasswordContainer } from './containers/ForgotPassword.container';
|
|
5
|
+
export { default as ChangePassword } from './containers/ChangePassword.container';
|
|
6
|
+
export { default as withLogin } from './hocs/withLogin';
|
|
7
|
+
export { default as withRegistration } from './hocs/withRegistration';
|
|
8
|
+
export { default as useLogin } from './hooks/useLogin';
|
|
9
|
+
export { default as useRegistration } from './hooks/useRegistration';
|
|
10
|
+
export { default as useForgotPassword } from './hooks/useForgotPassword';
|
|
11
|
+
export { default as useChangePassword } from './hooks/useChangePassword';
|
|
12
|
+
export { handleRequiresLoginSaga, refreshSecurityToken, } from './redux/sagas/login';
|
|
13
|
+
export * as actions from './redux/actions';
|
|
14
|
+
export { default as reducer, initialUserState } from './redux/reducers';
|
|
15
|
+
export * as selectors from './redux/selectors';
|
|
16
|
+
export * as types from './redux/types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function loginUser(username: any, password: any): any;
|
|
2
|
+
export function logoutUser(redirectPath: any): any;
|
|
3
|
+
export function registerUser(user: any, mappers: any): any;
|
|
4
|
+
export function requestPasswordReset(userEmailObject: any): any;
|
|
5
|
+
export function resetPassword(resetPasswordObject: any): any;
|
|
6
|
+
export function changePassword(userId: any, currentPassword: any, newPassword: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const userSagas: import("redux-saga/effects").ForkEffect<never>[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function handleRequiresLoginSaga(action: any): Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").CallEffect<Generator<import("redux-saga/effects").SelectEffect | Promise<undefined[] | Error[] | {
|
|
2
|
+
message: string;
|
|
3
|
+
}[] | {
|
|
4
|
+
message: string;
|
|
5
|
+
data: any;
|
|
6
|
+
}[]> | import("redux-saga/effects").PutEffect<{
|
|
7
|
+
type: string;
|
|
8
|
+
authenticationState: {
|
|
9
|
+
error: {
|
|
10
|
+
message: any;
|
|
11
|
+
stack: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}> | import("redux-saga/effects").CallEffect<Generator<Promise<{
|
|
15
|
+
authenticationState: {
|
|
16
|
+
authenticated: boolean;
|
|
17
|
+
authenticationError: boolean;
|
|
18
|
+
error: boolean;
|
|
19
|
+
clientCredentials: null;
|
|
20
|
+
};
|
|
21
|
+
user: Error | {
|
|
22
|
+
groups: any;
|
|
23
|
+
} | null | undefined;
|
|
24
|
+
}> | import("redux-saga/effects").PutEffect<{
|
|
25
|
+
type: string;
|
|
26
|
+
authenticationState: any;
|
|
27
|
+
user: any;
|
|
28
|
+
}>, void, {
|
|
29
|
+
authenticationState: any;
|
|
30
|
+
user: any;
|
|
31
|
+
}>>, any, [any, any]>> | import("redux-saga/effects").PutEffect<{
|
|
32
|
+
type: string;
|
|
33
|
+
securityToken: any;
|
|
34
|
+
}>, void, any>;
|
|
35
|
+
export function refreshSecurityToken(): Generator<any, void, unknown>;
|
|
36
|
+
export const loginSagas: import("redux-saga/effects").ForkEffect<never>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const registerSagas: import("redux-saga/effects").ForkEffect<never>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const resetPasswordSagas: import("redux-saga/effects").ForkEffect<never>[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function selectUserIsLoading(state: any): any;
|
|
2
|
+
export function selectUserIsAuthenticated(state: any): any;
|
|
3
|
+
export function selectUserAuthenticationError(state: any): any;
|
|
4
|
+
export function selectUserAuthenticationErrorMessage(state: any): any;
|
|
5
|
+
export function selectUserError(state: any): any;
|
|
6
|
+
export function selectUserErrorMessage(state: any): any;
|
|
7
|
+
export function selectClientCredentials(state: any): any;
|
|
8
|
+
export function selectUser(state: any): any;
|
|
9
|
+
export function selectUserIsZengentiStaff(state: any): any;
|
|
10
|
+
export function selectUserGuid(state: any): any;
|
|
11
|
+
export function selectUsername(state: any): any;
|
|
12
|
+
export function selectUserEmail(state: any): any;
|
|
13
|
+
export function selectUserGroups(state: any): any;
|
|
14
|
+
export function selectUserSecurityToken(state: any): any;
|
|
15
|
+
export function selectUserRegistration(state: any): any;
|
|
16
|
+
export function selectUserRegistrationError(state: any): any;
|
|
17
|
+
export function selectUserRegistrationIsLoading(state: any): any;
|
|
18
|
+
export function selectUserRegistrationIsSuccess(state: any): any;
|
|
19
|
+
export function selectPasswordResetRequestSending(state: any): any;
|
|
20
|
+
export function selectPasswordResetRequestSent(state: any): any;
|
|
21
|
+
export function selectPasswordResetRequestError(state: any): any;
|
|
22
|
+
export function selectResetPasswordSending(state: any): any;
|
|
23
|
+
export function selectResetPasswordSent(state: any): any;
|
|
24
|
+
export function selectResetPasswordError(state: any): any;
|
|
25
|
+
export function selectChangePasswordSending(state: any): any;
|
|
26
|
+
export function selectChangePasswordSent(state: any): any;
|
|
27
|
+
export function selectChangePasswordError(state: any): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const VALIDATE_USER: string;
|
|
2
|
+
export const SET_AUTHENTICATION_STATE: string;
|
|
3
|
+
export const LOGIN_USER: string;
|
|
4
|
+
export const LOGIN_SUCCESSFUL: string;
|
|
5
|
+
export const LOGIN_FAILED: string;
|
|
6
|
+
export const LOGOUT_USER: string;
|
|
7
|
+
export const REGISTER_USER: string;
|
|
8
|
+
export const REGISTER_USER_SUCCESS: string;
|
|
9
|
+
export const REGISTER_USER_FAILED: string;
|
|
10
|
+
export const REQUEST_USER_PASSWORD_RESET: string;
|
|
11
|
+
export const RESET_USER_PASSWORD: string;
|
|
12
|
+
export const REQUEST_USER_PASSWORD_RESET_SENDING: string;
|
|
13
|
+
export const REQUEST_USER_PASSWORD_RESET_SUCCESS: string;
|
|
14
|
+
export const REQUEST_USER_PASSWORD_RESET_ERROR: string;
|
|
15
|
+
export const RESET_USER_PASSWORD_SENDING: string;
|
|
16
|
+
export const RESET_USER_PASSWORD_SUCCESS: string;
|
|
17
|
+
export const RESET_USER_PASSWORD_ERROR: string;
|
|
18
|
+
export const CHANGE_USER_PASSWORD: string;
|
|
19
|
+
export const CHANGE_USER_PASSWORD_SENDING: string;
|
|
20
|
+
export const CHANGE_USER_PASSWORD_SUCCESS: string;
|
|
21
|
+
export const CHANGE_USER_PASSWORD_ERROR: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function getManagementApiClient({ bearerToken, bearerTokenExpiryDate, refreshToken, refreshTokenExpiryDate, contensisClassicToken, username, password, }: {
|
|
2
|
+
bearerToken: any;
|
|
3
|
+
bearerTokenExpiryDate: any;
|
|
4
|
+
refreshToken: any;
|
|
5
|
+
refreshTokenExpiryDate: any;
|
|
6
|
+
contensisClassicToken: any;
|
|
7
|
+
username: any;
|
|
8
|
+
password: any;
|
|
9
|
+
}): Promise<import("contensis-management-api").Client>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const LOGIN_COOKIE: "ContensisCMSUserName";
|
|
2
|
+
export const REFRESH_TOKEN_COOKIE: "RefreshToken";
|
|
3
|
+
export class LoginHelper {
|
|
4
|
+
static CMS_URL: string;
|
|
5
|
+
static WSFED_LOGIN: boolean;
|
|
6
|
+
static LOGIN_ROUTE: string;
|
|
7
|
+
static ACCESS_DENIED_ROUTE: string;
|
|
8
|
+
static SetLoginCookies({ contensisClassicToken, refreshToken }: {
|
|
9
|
+
contensisClassicToken: any;
|
|
10
|
+
refreshToken: any;
|
|
11
|
+
}): void;
|
|
12
|
+
static GetCachedCredentials(): {
|
|
13
|
+
bearerToken: null;
|
|
14
|
+
bearerTokenExpiryDate: null;
|
|
15
|
+
refreshToken: any;
|
|
16
|
+
refreshTokenExpiryDate: null;
|
|
17
|
+
contensisClassicToken: any;
|
|
18
|
+
};
|
|
19
|
+
static ClearCachedCredentials(): void;
|
|
20
|
+
static LoginUser({ username, password, clientCredentials }: {
|
|
21
|
+
username: any;
|
|
22
|
+
password: any;
|
|
23
|
+
clientCredentials: any;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
authenticationState: {
|
|
26
|
+
authenticated: boolean;
|
|
27
|
+
authenticationError: boolean;
|
|
28
|
+
error: boolean;
|
|
29
|
+
clientCredentials: null;
|
|
30
|
+
};
|
|
31
|
+
user: Error | {
|
|
32
|
+
groups: any;
|
|
33
|
+
} | null | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
static GetUserDetails: (client: any) => Promise<(Error | {
|
|
36
|
+
groups: any;
|
|
37
|
+
} | null)[]>;
|
|
38
|
+
static LogoutUser(redirectPath: any): void;
|
|
39
|
+
static ClientRedirectToHome(location: any): void;
|
|
40
|
+
static ClientRedirectToSignInPage(redirectPath: any): Promise<void>;
|
|
41
|
+
static ClientRedirectToAccessDeniedPage(originalPath: any): void;
|
|
42
|
+
static ClientRedirectToPath(redirectPath: any): void;
|
|
43
|
+
static WsFedLogin(redirectUri: any): Promise<void>;
|
|
44
|
+
static WsFedLogout(redirectPath: any): Promise<void>;
|
|
45
|
+
static GetCredentialsForSecurityToken(securityToken: any): Promise<undefined[] | Error[] | {
|
|
46
|
+
message: string;
|
|
47
|
+
}[] | {
|
|
48
|
+
message: string;
|
|
49
|
+
data: any;
|
|
50
|
+
}[]>;
|
|
51
|
+
static isZengentiStaff(email: any): boolean;
|
|
52
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const userManagerConfig: {
|
|
2
|
+
authority: string;
|
|
3
|
+
client_id: string;
|
|
4
|
+
redirect_uri: string;
|
|
5
|
+
post_logout_redirect_uri: string;
|
|
6
|
+
response_type: string;
|
|
7
|
+
scope: string;
|
|
8
|
+
filterProtocolClaims: boolean;
|
|
9
|
+
} | {
|
|
10
|
+
authority?: undefined;
|
|
11
|
+
client_id?: undefined;
|
|
12
|
+
redirect_uri?: undefined;
|
|
13
|
+
post_logout_redirect_uri?: undefined;
|
|
14
|
+
response_type?: undefined;
|
|
15
|
+
scope?: undefined;
|
|
16
|
+
filterProtocolClaims?: undefined;
|
|
17
|
+
};
|
|
18
|
+
export function createUserManager(config: any): Promise<{} | undefined>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class UserHelper {
|
|
2
|
+
static GetUsersEnvironments(securityToken: any): Promise<any>;
|
|
3
|
+
static ResendUserVerification(userEmail: any): Promise<any>;
|
|
4
|
+
static RequestPasswordReset(userEmailObject: any): Promise<any>;
|
|
5
|
+
static ResetPassword(resetPasswordObject: any): Promise<any>;
|
|
6
|
+
static get(url: any, options?: {
|
|
7
|
+
method: string;
|
|
8
|
+
headers: {
|
|
9
|
+
'Content-Type': string;
|
|
10
|
+
};
|
|
11
|
+
}): Promise<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export * from "contensis-delivery-api";
|
|
2
|
+
export const deliveryApi: DeliveryApi;
|
|
3
|
+
export const cachedSearch: CachedSearch;
|
|
4
|
+
declare class DeliveryApi {
|
|
5
|
+
getClientSideVersionStatus: () => "published" | "latest" | null;
|
|
6
|
+
getVersionStatusFromHostname: (currentHostname: any) => "published" | "latest";
|
|
7
|
+
search: (query: any, linkDepth: any, project: any, env: any) => Promise<import("contensis-core-api").PagedList<import("contensis-delivery-api/lib/models").Entry>>;
|
|
8
|
+
getClient: (deliveryApiStatus: string | undefined, project: any, env: any) => Client;
|
|
9
|
+
getEntry: (id: any, linkDepth: number | undefined, deliveryApiStatus: string | undefined, project: any, env: any) => Promise<import("contensis-delivery-api/lib/models").Entry>;
|
|
10
|
+
}
|
|
11
|
+
declare class CachedSearch {
|
|
12
|
+
cache: LruCache;
|
|
13
|
+
taxonomyLookup: {};
|
|
14
|
+
search(query: any, linkDepth: any, project: any, env: any): any;
|
|
15
|
+
get(id: any, linkDepth: any, versionStatus: any, project: any, env: any): any;
|
|
16
|
+
getContentType(id: any, project: any, env: any): any;
|
|
17
|
+
getTaxonomyNode(key: any, project: any, env: any): any;
|
|
18
|
+
getRootNode(options: any, project: any, env: any): any;
|
|
19
|
+
getNode(options: any, project: any, env: any): any;
|
|
20
|
+
getAncestors(options: any, project: any, env: any): any;
|
|
21
|
+
getChildren(options: any, project: any, env: any): any;
|
|
22
|
+
getSiblings(options: any, project: any, env: any): any;
|
|
23
|
+
request(key: any, execute: any): any;
|
|
24
|
+
extendTaxonomyNode(node: any): any;
|
|
25
|
+
getTaxonomyId(node: any): any;
|
|
26
|
+
getTaxonomyKey(id: any): any;
|
|
27
|
+
}
|
|
28
|
+
import { Client } from "contensis-delivery-api";
|
|
29
|
+
declare class LruCache {
|
|
30
|
+
constructor(limit?: number);
|
|
31
|
+
map: {};
|
|
32
|
+
head: any;
|
|
33
|
+
tail: any;
|
|
34
|
+
limit: number;
|
|
35
|
+
size: number;
|
|
36
|
+
get(key: any): any;
|
|
37
|
+
set(key: any, value: any): void;
|
|
38
|
+
setHead(node: any): void;
|
|
39
|
+
remove(key: any): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function toJS(WrappedComponent: any): (wrappedComponentProps: any) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as setCachingHeaders } from "../server/features/caching/setCachingHeaders";
|
|
2
|
+
export { default as stringifyStrings } from './stringifyStrings';
|
|
3
|
+
export { default as urls } from './urls';
|
|
4
|
+
export * from './json-mapper';
|
|
5
|
+
export { default as VersionInfo } from "../app/pages/VersionInfo";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import mapJson from 'jsonpath-mapper';
|
|
2
|
+
import MappingTemplate from 'jsonpath-mapper/dist/models/Template';
|
|
3
|
+
import { EntryMapper } from "../routing/routes";
|
|
4
|
+
export { default as mapJson, jpath } from 'jsonpath-mapper';
|
|
5
|
+
declare type Mappers<S> = {
|
|
6
|
+
[contentTypeId: string]: MappingTemplate<S>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {object} json The source object we wish to transform
|
|
11
|
+
* @param {object} template The mapping template we wish to apply to the source
|
|
12
|
+
* object to generate the intended target object
|
|
13
|
+
*/
|
|
14
|
+
export declare const useMapper: <T, S>(json: S, template: MappingTemplate<S>) => T | S;
|
|
15
|
+
/**
|
|
16
|
+
* useEntriesMapper hook to take a list of entries from Delivery API along
|
|
17
|
+
* with mappers for each contentTypeId and return an array of mapped objects
|
|
18
|
+
* @param {any} entry The source entry we wish to transform
|
|
19
|
+
* @param {object} mappers Object with keys containing mapper templates,
|
|
20
|
+
* the key name matching sys.contentTypeId
|
|
21
|
+
* @param {string} field Only include if we need to match content based on
|
|
22
|
+
* a field other than sys.contentTypeId in the source data
|
|
23
|
+
* @returns {object} Object transformed using a matched content type or
|
|
24
|
+
* a default mapper template, returns an empty object if no mapper template
|
|
25
|
+
* couild be applied.
|
|
26
|
+
*/
|
|
27
|
+
export declare const useEntriesMapper: <S, T extends Mappers<S>>(entry: S, mappers: T, field?: string) => unknown;
|
|
28
|
+
/**
|
|
29
|
+
* Deprecated: due to misleading name, use the hook useEntriesMapper instead
|
|
30
|
+
*/
|
|
31
|
+
export declare const useEntryMapper: <S, T extends Mappers<S>>(entry: S, mappers: T, field?: string) => unknown;
|
|
32
|
+
/**
|
|
33
|
+
* mapEntries mapping function to take a list of entries from Delivery API along
|
|
34
|
+
* with mappers for each contentTypeId and return an array of mapped objects
|
|
35
|
+
* @param {any} entry The source entry we wish to transform
|
|
36
|
+
* @param {object} mappers Object with keys containing mapper templates,
|
|
37
|
+
* the key name matching sys.contentTypeId
|
|
38
|
+
* @param {string} field Only include if we need to match content based on
|
|
39
|
+
* a field other than sys.contentTypeId in the source data
|
|
40
|
+
* @returns {object} Object transformed using a matched content type or
|
|
41
|
+
* a default mapper template, returns an empty object if no mapper template
|
|
42
|
+
* couild be applied.
|
|
43
|
+
*/
|
|
44
|
+
export declare const mapEntries: <S, Mappers_1 extends {
|
|
45
|
+
[contentTypeId: string]: MappingTemplate<S>;
|
|
46
|
+
}>(entries: S[], mappers: Mappers_1, field?: string) => unknown[];
|
|
47
|
+
/**
|
|
48
|
+
* mapComposer mapping function to take a composer field from Delivery API along
|
|
49
|
+
* with mappers for each Composer Item "type" and return an array of mapped components
|
|
50
|
+
* @param {array} composer Composer field array of Composer Items
|
|
51
|
+
* @param {object} mappers A keyed object with each key matching the Composer Item "type"
|
|
52
|
+
* @returns {array} Array of mapped objects transformed using a matched Composer Item "type" mapping
|
|
53
|
+
* or null. Injects a "_type" property into each transformed object in the array to indicate
|
|
54
|
+
* where the mapping originated and for what component the mapped object is representing
|
|
55
|
+
*/
|
|
56
|
+
export declare const mapComposer: <S extends {
|
|
57
|
+
type: string;
|
|
58
|
+
value: any;
|
|
59
|
+
}, T extends Mappers<S>>(composer: S[], mappers: T) => any[];
|
|
60
|
+
/**
|
|
61
|
+
* useComposerMapper hook to take a composer field from Delivery API along
|
|
62
|
+
* with mappers for each Composer Item "type" and return an array of mapped components
|
|
63
|
+
* @param {array} composer Composer field array of Composer Items
|
|
64
|
+
* @param {object} mappers A keyed object with each key matching the Composer Item "type"
|
|
65
|
+
* @returns {array} Array of mapped objects transformed using a matched Composer Item "type" mapping
|
|
66
|
+
* or null. Injects a "_type" property into each transformed object in the array to indicate
|
|
67
|
+
* where the mapping originated and for what component the mapped object is representing
|
|
68
|
+
*/
|
|
69
|
+
export declare const useComposerMapper: <S extends {
|
|
70
|
+
type: string;
|
|
71
|
+
value: any;
|
|
72
|
+
}, T extends Mappers<S>>(composer: S[] | undefined, mappers: T) => any[];
|
|
73
|
+
/**
|
|
74
|
+
* entryMapper will return a function to satisfy an entryMapper when defining app route
|
|
75
|
+
* this is essentially a shorthand function to prevent boilerplate repetition inside your routes file
|
|
76
|
+
* you do not need to use this function should you wish to map your entry via raw JS functions
|
|
77
|
+
* @param mapping the jsonpath-mapper mapping template to apply when the route is resolved
|
|
78
|
+
* @returns {mappedEntry}
|
|
79
|
+
*/
|
|
80
|
+
export declare const entryMapper: (mapping: any) => EntryMapper;
|
|
81
|
+
export default mapJson;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function componentWillMountNavHandler(props: any, urlPropsQueryConfig: any): void;
|
|
2
|
+
export function componentWillReceivePropsNavHandler(nextProps: any, component: any, urlPropsQueryConfig: any, currentPath: any): void;
|
|
3
|
+
export function getUrlFromNavigationSettings(entry: any): string;
|
|
4
|
+
export function getParentUrlFromNavigationSettings(entry: any): string;
|
|
5
|
+
export function getLeafSlugFromRoute(currentPath: any): any;
|
|
6
|
+
export function validateRouteFromNavigationSettings(currentPath: any, entry: any): boolean;
|
|
7
|
+
export function getPathFromEntry(entry: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function now(): number;
|
|
File without changes
|