@zengenti/contensis-react-base 3.0.2-beta.9 → 3.1.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.
Files changed (141) hide show
  1. package/README.md +38 -2
  2. package/cjs/{App-81a45001.js → App-555eebb0.js} +70 -34
  3. package/cjs/App-555eebb0.js.map +1 -0
  4. package/cjs/{login-51b66359.js → ChangePassword.container-f3f94d8f.js} +246 -84
  5. package/cjs/ChangePassword.container-f3f94d8f.js.map +1 -0
  6. package/cjs/{ContensisDeliveryApi-de88df2a.js → ContensisDeliveryApi-ea5ffdc2.js} +162 -122
  7. package/cjs/ContensisDeliveryApi-ea5ffdc2.js.map +1 -0
  8. package/cjs/CookieConstants-000427db.js +10 -0
  9. package/cjs/CookieConstants-000427db.js.map +1 -0
  10. package/cjs/{RouteLoader-47d70a26.js → RouteLoader-014a95b9.js} +8 -5
  11. package/cjs/RouteLoader-014a95b9.js.map +1 -0
  12. package/cjs/{ToJs-61c03582.js → ToJs-64970869.js} +49 -2
  13. package/cjs/ToJs-64970869.js.map +1 -0
  14. package/cjs/_commonjsHelpers-b3309d7b.js +11 -0
  15. package/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  16. package/cjs/client.js +14 -12
  17. package/cjs/client.js.map +1 -1
  18. package/cjs/contensis-react-base.js +47 -361
  19. package/cjs/contensis-react-base.js.map +1 -1
  20. package/cjs/forms.js +3495 -127
  21. package/cjs/forms.js.map +1 -1
  22. package/cjs/redux.js +3 -4
  23. package/cjs/redux.js.map +1 -1
  24. package/cjs/routing.js +4 -3
  25. package/cjs/routing.js.map +1 -1
  26. package/cjs/{sagas-6d12e7ca.js → sagas-e04b94c1.js} +44 -20
  27. package/cjs/sagas-e04b94c1.js.map +1 -0
  28. package/cjs/search.js +13 -13
  29. package/cjs/search.js.map +1 -1
  30. package/cjs/{selectors-c76c2676.js → selectors-8e56cc34.js} +14 -13
  31. package/cjs/selectors-8e56cc34.js.map +1 -0
  32. package/cjs/user.js +33 -159
  33. package/cjs/user.js.map +1 -1
  34. package/cjs/util.js +6 -4
  35. package/cjs/util.js.map +1 -1
  36. package/cjs/{version-886f49d8.js → version-91b90ee8.js} +3 -3
  37. package/cjs/{version-886f49d8.js.map → version-91b90ee8.js.map} +1 -1
  38. package/cjs/{version-38afaf2a.js → version-fb4ba30b.js} +16 -24
  39. package/cjs/version-fb4ba30b.js.map +1 -0
  40. package/esm/{App-5f914483.js → App-aaea6310.js} +64 -29
  41. package/esm/App-aaea6310.js.map +1 -0
  42. package/esm/{login-4d07c2de.js → ChangePassword.container-724c8e0a.js} +229 -78
  43. package/esm/ChangePassword.container-724c8e0a.js.map +1 -0
  44. package/esm/ContensisDeliveryApi-fe53fa10.js +265 -0
  45. package/esm/ContensisDeliveryApi-fe53fa10.js.map +1 -0
  46. package/esm/CookieConstants-3d3b6531.js +6 -0
  47. package/esm/CookieConstants-3d3b6531.js.map +1 -0
  48. package/esm/{RouteLoader-f5d5f733.js → RouteLoader-fe64ca81.js} +8 -5
  49. package/esm/RouteLoader-fe64ca81.js.map +1 -0
  50. package/esm/{ToJs-0066e629.js → ToJs-c75473e9.js} +49 -3
  51. package/esm/ToJs-c75473e9.js.map +1 -0
  52. package/esm/_commonjsHelpers-1789f0cf.js +8 -0
  53. package/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  54. package/esm/client.js +15 -13
  55. package/esm/client.js.map +1 -1
  56. package/esm/contensis-react-base.js +46 -361
  57. package/esm/contensis-react-base.js.map +1 -1
  58. package/esm/forms.js +3497 -129
  59. package/esm/forms.js.map +1 -1
  60. package/esm/redux.js +6 -7
  61. package/esm/redux.js.map +1 -1
  62. package/esm/routing.js +4 -3
  63. package/esm/routing.js.map +1 -1
  64. package/esm/{sagas-53d2aefb.js → sagas-933a8fc8.js} +44 -20
  65. package/esm/sagas-933a8fc8.js.map +1 -0
  66. package/esm/search.js +14 -14
  67. package/esm/search.js.map +1 -1
  68. package/esm/{selectors-3f0d804d.js → selectors-0fe67d47.js} +14 -14
  69. package/esm/selectors-0fe67d47.js.map +1 -0
  70. package/esm/user.js +21 -151
  71. package/esm/user.js.map +1 -1
  72. package/esm/util.js +4 -4
  73. package/esm/{version-dd31c7f0.js → version-7ea8bea8.js} +17 -24
  74. package/esm/version-7ea8bea8.js.map +1 -0
  75. package/esm/{version-f4629693.js → version-f42f7bdc.js} +3 -3
  76. package/esm/{version-f4629693.js.map → version-f42f7bdc.js.map} +1 -1
  77. package/models/client/client.d.ts +1 -1
  78. package/models/config.d.ts +4 -4
  79. package/models/redux/appstate.d.ts +2 -1
  80. package/models/routing/redux/actions.d.ts +10 -6
  81. package/models/routing/redux/selectors.d.ts +5 -4
  82. package/models/routing/redux/types.d.ts +0 -1
  83. package/models/routing/routes.d.ts +20 -17
  84. package/models/routing/util/queries.d.ts +3 -2
  85. package/models/search/models/Queries.d.ts +9 -10
  86. package/models/search/models/Search.d.ts +26 -24
  87. package/models/search/models/SearchActions.d.ts +36 -36
  88. package/models/search/models/SearchState.d.ts +11 -11
  89. package/models/search/models/SearchUtil.d.ts +1 -1
  90. package/models/search/models/WithSearch.d.ts +1 -1
  91. package/models/search/redux/actions.d.ts +7 -7
  92. package/models/search/redux/selectors.d.ts +27 -27
  93. package/models/search/redux/types.d.ts +21 -21
  94. package/models/search/redux/util.d.ts +2 -2
  95. package/models/search/search/ContensisDeliveryApi.d.ts +1 -1
  96. package/models/search/search/expressions.d.ts +4 -4
  97. package/models/search/search/util.d.ts +2 -2
  98. package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
  99. package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
  100. package/models/server/features/linkdepth-api/search.d.ts +3 -3
  101. package/models/server/internalServer.d.ts +7 -5
  102. package/models/server/util/bundles.d.ts +2 -2
  103. package/models/server/util/handleExceptions.d.ts +1 -1
  104. package/models/testImmer/redux/reducer.d.ts +1 -1
  105. package/models/user/components/Login.d.ts +2 -3
  106. package/models/user/containers/ChangePassword.container.d.ts +2 -2
  107. package/models/user/containers/ForgotPassword.container.d.ts +2 -2
  108. package/models/user/containers/Login.container.d.ts +2 -2
  109. package/models/user/containers/Registration.container.d.ts +2 -2
  110. package/models/user/hocs/withLogin.d.ts +5 -11
  111. package/models/user/hocs/withRegistration.d.ts +2 -8
  112. package/models/user/redux/actions.d.ts +2 -2
  113. package/models/user/redux/sagas/login.d.ts +9 -8
  114. package/models/user/redux/selectors.d.ts +4 -4
  115. package/models/user/util/CookieConstants.d.ts +8 -0
  116. package/models/user/util/CookieHelper.class.d.ts +15 -3
  117. package/models/user/util/LoginHelper.class.d.ts +27 -23
  118. package/models/util/CachedDeliveryApi.d.ts +25 -0
  119. package/models/util/ContensisDeliveryApi.d.ts +20 -44
  120. package/models/util/LruCache.d.ts +12 -0
  121. package/models/util/ToJs.d.ts +1 -1
  122. package/models/util/index.d.ts +1 -1
  123. package/models/util/json-mapper.d.ts +1 -1
  124. package/package.json +10 -11
  125. package/cjs/App-81a45001.js.map +0 -1
  126. package/cjs/ContensisDeliveryApi-de88df2a.js.map +0 -1
  127. package/cjs/RouteLoader-47d70a26.js.map +0 -1
  128. package/cjs/ToJs-61c03582.js.map +0 -1
  129. package/cjs/login-51b66359.js.map +0 -1
  130. package/cjs/sagas-6d12e7ca.js.map +0 -1
  131. package/cjs/selectors-c76c2676.js.map +0 -1
  132. package/cjs/version-38afaf2a.js.map +0 -1
  133. package/esm/App-5f914483.js.map +0 -1
  134. package/esm/ContensisDeliveryApi-ad06857d.js +0 -227
  135. package/esm/ContensisDeliveryApi-ad06857d.js.map +0 -1
  136. package/esm/RouteLoader-f5d5f733.js.map +0 -1
  137. package/esm/ToJs-0066e629.js.map +0 -1
  138. package/esm/login-4d07c2de.js.map +0 -1
  139. package/esm/sagas-53d2aefb.js.map +0 -1
  140. package/esm/selectors-3f0d804d.js.map +0 -1
  141. package/esm/version-dd31c7f0.js.map +0 -1
package/esm/user.js CHANGED
@@ -1,154 +1,18 @@
1
- export { L as LoginHelper, h as handleRequiresLoginSaga, r as refreshSecurityToken } from './login-4d07c2de.js';
2
- import { useDispatch, useSelector, connect } from 'react-redux';
3
- import { D as action, o as selectCurrentSearch } from './selectors-3f0d804d.js';
4
- import { L as LOGIN_USER, n as LOGOUT_USER, R as REGISTER_USER, c as REQUEST_USER_PASSWORD_RESET, d as RESET_USER_PASSWORD, C as CHANGE_USER_PASSWORD } from './reducers-3d5c37d1.js';
1
+ import { a as loginUser, b as logoutUser, r as registerUser } from './ChangePassword.container-724c8e0a.js';
2
+ export { C as ChangePassword, F as ForgotPasswordContainer, d as LoginContainer, L as LoginHelper, R as RegistrationContainer, c as actions, h as handleRequiresLoginSaga, k as refreshSecurityToken, j as useChangePassword, i as useForgotPassword, u as useLogin, e as useRegistration } from './ChangePassword.container-724c8e0a.js';
3
+ import React from 'react';
4
+ import { useCookies } from 'react-cookie';
5
+ import { connect } from 'react-redux';
6
+ import { C as CookieHelper, t as toJS, c as selectUserErrorMessage, a as selectUserIsAuthenticated, d as selectUserIsAuthenticationError, e as selectUserIsError, f as selectUserIsLoading, g as selectUser, h as selectUserRegistrationError, i as selectUserRegistrationIsLoading, j as selectUserRegistrationIsSuccess, k as selectUserRegistration } from './ToJs-c75473e9.js';
7
+ export { y as selectors } from './ToJs-c75473e9.js';
5
8
  export { o as initialUserState, U as reducer, t as types } from './reducers-3d5c37d1.js';
6
- import { c as selectUserErrorMessage, a as selectUserIsAuthenticated, d as selectUserIsAuthenticationError, e as selectUserIsError, f as selectUserIsLoading, g as selectUser, t as toJS, h as selectUserRegistrationError, i as selectUserRegistrationIsLoading, j as selectUserRegistrationIsSuccess, k as selectUserRegistration, l as selectPasswordResetRequestSending, n as selectPasswordResetRequestSent, o as selectPasswordResetRequestError, p as selectResetPasswordSending, q as selectResetPasswordSent, r as selectResetPasswordError, u as selectChangePasswordSending, v as selectChangePasswordSent, w as selectUserGuid, x as selectChangePasswordError } from './ToJs-0066e629.js';
7
- export { y as selectors } from './ToJs-0066e629.js';
8
9
  import '@redux-saga/core/effects';
10
+ import './selectors-0fe67d47.js';
9
11
  import 'jsonpath-mapper';
10
- import 'await-to-js';
11
- import 'js-cookie';
12
12
  import 'query-string';
13
+ import 'await-to-js';
14
+ import './CookieConstants-3d3b6531.js';
13
15
  import 'immer';
14
- import 'react';
15
-
16
- const loginUser = (username, password) => action(LOGIN_USER, {
17
- username,
18
- password
19
- });
20
- const logoutUser = redirectPath => action(LOGOUT_USER, {
21
- redirectPath
22
- });
23
- const registerUser = (user, mappers) => action(REGISTER_USER, {
24
- user,
25
- mappers
26
- });
27
- const requestPasswordReset = userEmailObject => action(REQUEST_USER_PASSWORD_RESET, {
28
- userEmailObject
29
- });
30
- const resetPassword = resetPasswordObject => action(RESET_USER_PASSWORD, {
31
- resetPasswordObject
32
- });
33
- const changePassword = (userId, currentPassword, newPassword) => action(CHANGE_USER_PASSWORD, {
34
- userId,
35
- currentPassword,
36
- newPassword
37
- });
38
-
39
- var actions = /*#__PURE__*/Object.freeze({
40
- __proto__: null,
41
- loginUser: loginUser,
42
- logoutUser: logoutUser,
43
- registerUser: registerUser,
44
- requestPasswordReset: requestPasswordReset,
45
- resetPassword: resetPassword,
46
- changePassword: changePassword
47
- });
48
-
49
- const useLogin = () => {
50
- const dispatch = useDispatch();
51
- const select = useSelector;
52
- return {
53
- loginUser: (username, password) => dispatch(loginUser(username, password)),
54
- logoutUser: redirectPath => dispatch(logoutUser(redirectPath)),
55
- errorMessage: select(selectUserErrorMessage),
56
- isAuthenticated: select(selectUserIsAuthenticated),
57
- isAuthenticationError: select(selectUserIsAuthenticationError),
58
- isError: select(selectUserIsError),
59
- isLoading: select(selectUserIsLoading),
60
- user: select(selectUser),
61
- // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead
62
- authenticationError: select(selectUserIsAuthenticationError),
63
- // DEPRECATED: authenticationErrorMessage is deprecated use errorMessage instead
64
- authenticationErrorMessage: select(selectUserErrorMessage),
65
- // DEPRECATED: error is deprecated use isError instead
66
- error: select(selectUserIsError)
67
- };
68
- };
69
-
70
- const LoginContainer = ({
71
- children,
72
- ...props
73
- }) => {
74
- const userProps = useLogin();
75
- return children(userProps);
76
- };
77
- LoginContainer.propTypes = {};
78
- var Login_container = toJS(LoginContainer);
79
-
80
- const useRegistration = () => {
81
- const dispatch = useDispatch();
82
- const select = useSelector;
83
- return {
84
- registerUser: (user, mappers) => dispatch(registerUser(user, mappers)),
85
- error: select(selectUserRegistrationError),
86
- isLoading: select(selectUserRegistrationIsLoading),
87
- isSuccess: select(selectUserRegistrationIsSuccess),
88
- user: select(selectUserRegistration)
89
- };
90
- };
91
-
92
- const RegistrationContainer = ({
93
- children,
94
- ...props
95
- }) => {
96
- const userProps = useRegistration();
97
- return children(userProps);
98
- };
99
- RegistrationContainer.propTypes = {};
100
- var Registration_container = toJS(RegistrationContainer);
101
-
102
- const useForgotPassword = () => {
103
- const dispatch = useDispatch();
104
- const select = useSelector;
105
- return {
106
- isLoading: select(selectPasswordResetRequestSending),
107
- isSuccess: select(selectPasswordResetRequestSent),
108
- error: select(selectPasswordResetRequestError),
109
- requestPasswordReset: userEmailObject => dispatch(requestPasswordReset(userEmailObject)),
110
- setNewPassword: {
111
- queryString: select(selectCurrentSearch),
112
- isLoading: select(selectResetPasswordSending),
113
- isSuccess: select(selectResetPasswordSent),
114
- error: select(selectResetPasswordError),
115
- submit: resetPasswordObject => dispatch(resetPassword(resetPasswordObject))
116
- }
117
- };
118
- };
119
-
120
- const ForgotPasswordContainer = ({
121
- children,
122
- ...props
123
- }) => {
124
- const userProps = useForgotPassword();
125
- return children(userProps);
126
- };
127
- ForgotPasswordContainer.propTypes = {};
128
- var ForgotPassword_container = toJS(ForgotPasswordContainer);
129
-
130
- const useChangePassword = () => {
131
- const dispatch = useDispatch();
132
- const select = useSelector;
133
- return {
134
- isLoading: select(selectChangePasswordSending),
135
- isSuccess: select(selectChangePasswordSent),
136
- userId: select(selectUserGuid),
137
- isLoggedIn: select(selectUserIsAuthenticated),
138
- error: select(selectChangePasswordError),
139
- changePassword: (userId, currentPassword, newPassword) => dispatch(changePassword(userId, currentPassword, newPassword))
140
- };
141
- };
142
-
143
- const ChangePasswordContainer = ({
144
- children,
145
- ...props
146
- }) => {
147
- const userProps = useChangePassword();
148
- return children(userProps);
149
- };
150
- ChangePasswordContainer.propTypes = {};
151
- var ChangePassword_container = toJS(ChangePasswordContainer);
152
16
 
153
17
  const getDisplayName$1 = WrappedComponent => {
154
18
  return WrappedComponent.displayName || WrappedComponent.name || 'Component';
@@ -156,6 +20,7 @@ const getDisplayName$1 = WrappedComponent => {
156
20
  const withLogin = WrappedComponent => {
157
21
  const mapStateToProps = state => {
158
22
  return {
23
+ errorMessage: selectUserErrorMessage(state),
159
24
  isAuthenticated: selectUserIsAuthenticated(state),
160
25
  isAuthenticationError: selectUserIsAuthenticationError(state),
161
26
  isError: selectUserIsError(state),
@@ -167,12 +32,17 @@ const withLogin = WrappedComponent => {
167
32
  error: selectUserIsError(state)
168
33
  };
169
34
  };
170
- const mapDispatchToProps = {
171
- loginUser,
172
- logoutUser
35
+ const ConnectedComponent = () => {
36
+ const cookies = new CookieHelper(...useCookies());
37
+ const mapDispatchToProps = {
38
+ loginUser: (username, password) => loginUser(username, password, cookies),
39
+ logoutUser: redirectPath => logoutUser(redirectPath, cookies)
40
+ };
41
+ const FinalComponent = connect(mapStateToProps, mapDispatchToProps)(toJS(WrappedComponent));
42
+ return /*#__PURE__*/React.createElement(FinalComponent, null);
173
43
  };
174
- const ConnectedComponent = connect(mapStateToProps, mapDispatchToProps)(toJS(WrappedComponent));
175
44
  ConnectedComponent.displayName = `${getDisplayName$1(WrappedComponent)}`;
45
+ ConnectedComponent.WrappedComponent = WrappedComponent;
176
46
  return ConnectedComponent;
177
47
  };
178
48
 
@@ -196,5 +66,5 @@ const withRegistration = WrappedComponent => {
196
66
  return ConnectedComponent;
197
67
  };
198
68
 
199
- export { ChangePassword_container as ChangePassword, ForgotPassword_container as ForgotPasswordContainer, Login_container as LoginContainer, Registration_container as RegistrationContainer, actions, useChangePassword, useForgotPassword, useLogin, useRegistration, withLogin, withRegistration };
69
+ export { withLogin, withRegistration };
200
70
  //# sourceMappingURL=user.js.map
package/esm/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sources":["../src/user/redux/actions.js","../src/user/hooks/useLogin.js","../src/user/containers/Login.container.js","../src/user/hooks/useRegistration.js","../src/user/containers/Registration.container.js","../src/user/hooks/useForgotPassword.js","../src/user/containers/ForgotPassword.container.js","../src/user/hooks/useChangePassword.js","../src/user/containers/ChangePassword.container.js","../src/user/hocs/withLogin.js","../src/user/hocs/withRegistration.js"],"sourcesContent":["import { action } from '~/redux/util';\nimport {\n CHANGE_USER_PASSWORD,\n LOGIN_USER,\n LOGOUT_USER,\n REGISTER_USER,\n REQUEST_USER_PASSWORD_RESET,\n RESET_USER_PASSWORD,\n} from './types';\n\nexport const loginUser = (username, password) =>\n action(LOGIN_USER, { username, password });\n\nexport const logoutUser = redirectPath => action(LOGOUT_USER, { redirectPath });\n\nexport const registerUser = (user, mappers) =>\n action(REGISTER_USER, {\n user,\n mappers,\n });\n\nexport const requestPasswordReset = userEmailObject =>\n action(REQUEST_USER_PASSWORD_RESET, { userEmailObject });\n\nexport const resetPassword = resetPasswordObject =>\n action(RESET_USER_PASSWORD, { resetPasswordObject });\n\nexport const changePassword = (userId, currentPassword, newPassword) =>\n action(CHANGE_USER_PASSWORD, { userId, currentPassword, newPassword });\n","import { useDispatch, useSelector } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserIsAuthenticationError,\n selectUserIsError,\n selectUserErrorMessage,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\n\nconst useLogin = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n loginUser: (username, password) => dispatch(loginUser(username, password)),\n logoutUser: redirectPath => dispatch(logoutUser(redirectPath)),\n errorMessage: select(selectUserErrorMessage),\n isAuthenticated: select(selectUserIsAuthenticated),\n isAuthenticationError: select(selectUserIsAuthenticationError),\n isError: select(selectUserIsError),\n isLoading: select(selectUserIsLoading),\n user: select(selectUser),\n // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead\n authenticationError: select(selectUserIsAuthenticationError),\n // DEPRECATED: authenticationErrorMessage is deprecated use errorMessage instead\n authenticationErrorMessage: select(selectUserErrorMessage),\n // DEPRECATED: error is deprecated use isError instead\n error: select(selectUserIsError),\n };\n};\n\nexport default useLogin;\n","import useLogin from '../hooks/useLogin';\nimport { toJS } from '~/util/ToJs';\n\nconst LoginContainer = ({ children, ...props }) => {\n const userProps = useLogin(props);\n return children(userProps);\n};\n\nLoginContainer.propTypes = {};\n\nexport default toJS(LoginContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\n\nconst useRegistration = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n registerUser: (user, mappers) => dispatch(registerUser(user, mappers)),\n error: select(selectUserRegistrationError),\n isLoading: select(selectUserRegistrationIsLoading),\n isSuccess: select(selectUserRegistrationIsSuccess),\n user: select(selectUserRegistration),\n };\n};\n\nexport default useRegistration;\n","import useRegistration from '../hooks/useRegistration';\nimport { toJS } from '~/util/ToJs';\n\nconst RegistrationContainer = ({ children, ...props }) => {\n const userProps = useRegistration(props);\n return children(userProps);\n};\n\nRegistrationContainer.propTypes = {};\n\nexport default toJS(RegistrationContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { requestPasswordReset, resetPassword } from '../redux/actions';\nimport {\n selectPasswordResetRequestError,\n selectPasswordResetRequestSending,\n selectPasswordResetRequestSent,\n selectResetPasswordSending,\n selectResetPasswordSent,\n selectResetPasswordError,\n} from '../redux/selectors';\nimport { selectCurrentSearch } from '~/routing/redux/selectors';\n\nconst useForgotPassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectPasswordResetRequestSending),\n isSuccess: select(selectPasswordResetRequestSent),\n error: select(selectPasswordResetRequestError),\n requestPasswordReset: userEmailObject =>\n dispatch(requestPasswordReset(userEmailObject)),\n\n setNewPassword: {\n queryString: select(selectCurrentSearch),\n isLoading: select(selectResetPasswordSending),\n isSuccess: select(selectResetPasswordSent),\n error: select(selectResetPasswordError),\n submit: resetPasswordObject =>\n dispatch(resetPassword(resetPasswordObject)),\n },\n };\n};\n\nexport default useForgotPassword;\n","import useForgotPassword from '../hooks/useForgotPassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ForgotPasswordContainer = ({ children, ...props }) => {\n const userProps = useForgotPassword(props);\n return children(userProps);\n};\n\nForgotPasswordContainer.propTypes = {};\n\nexport default toJS(ForgotPasswordContainer);\n","import { useDispatch, useSelector } from 'react-redux';\nimport { changePassword } from '../redux/actions';\nimport {\n selectChangePasswordSending,\n selectChangePasswordSent,\n selectChangePasswordError,\n selectUserIsAuthenticated,\n selectUserGuid,\n} from '../redux/selectors';\n\nconst useChangePassword = () => {\n const dispatch = useDispatch();\n const select = useSelector;\n\n return {\n isLoading: select(selectChangePasswordSending),\n isSuccess: select(selectChangePasswordSent),\n userId: select(selectUserGuid),\n isLoggedIn: select(selectUserIsAuthenticated),\n error: select(selectChangePasswordError),\n changePassword: (userId, currentPassword, newPassword) =>\n dispatch(changePassword(userId, currentPassword, newPassword)),\n };\n};\n\nexport default useChangePassword;\n","import useChangePassword from '../hooks/useChangePassword';\nimport { toJS } from '~/util/ToJs';\n\nconst ChangePasswordContainer = ({ children, ...props }) => {\n const userProps = useChangePassword(props);\n return children(userProps);\n};\n\nChangePasswordContainer.propTypes = {};\n\nexport default toJS(ChangePasswordContainer);\n","import { connect } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserIsAuthenticationError,\n selectUserIsError,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withLogin = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n isAuthenticated: selectUserIsAuthenticated(state),\n isAuthenticationError: selectUserIsAuthenticationError(state),\n isError: selectUserIsError(state),\n isLoading: selectUserIsLoading(state),\n user: selectUser(state),\n // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead\n authenticationError: selectUserIsAuthenticationError(state),\n // DEPRECATED: error is deprecated use isError instead\n error: selectUserIsError(state),\n };\n };\n\n const mapDispatchToProps = {\n loginUser,\n logoutUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withLogin;\n","import { connect } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withRegistration = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n error: selectUserRegistrationError(state),\n isLoading: selectUserRegistrationIsLoading(state),\n isSuccess: selectUserRegistrationIsSuccess(state),\n user: selectUserRegistration(state),\n };\n };\n\n const mapDispatchToProps = {\n registerUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withRegistration;\n"],"names":["loginUser","username","password","action","LOGIN_USER","logoutUser","redirectPath","LOGOUT_USER","registerUser","user","mappers","REGISTER_USER","requestPasswordReset","userEmailObject","REQUEST_USER_PASSWORD_RESET","resetPassword","resetPasswordObject","RESET_USER_PASSWORD","changePassword","userId","currentPassword","newPassword","CHANGE_USER_PASSWORD","useLogin","dispatch","useDispatch","select","useSelector","errorMessage","selectUserErrorMessage","isAuthenticated","selectUserIsAuthenticated","isAuthenticationError","selectUserIsAuthenticationError","isError","selectUserIsError","isLoading","selectUserIsLoading","selectUser","authenticationError","authenticationErrorMessage","error","LoginContainer","children","props","userProps","propTypes","toJS","useRegistration","selectUserRegistrationError","selectUserRegistrationIsLoading","isSuccess","selectUserRegistrationIsSuccess","selectUserRegistration","RegistrationContainer","useForgotPassword","selectPasswordResetRequestSending","selectPasswordResetRequestSent","selectPasswordResetRequestError","setNewPassword","queryString","selectCurrentSearch","selectResetPasswordSending","selectResetPasswordSent","selectResetPasswordError","submit","ForgotPasswordContainer","useChangePassword","selectChangePasswordSending","selectChangePasswordSent","selectUserGuid","isLoggedIn","selectChangePasswordError","ChangePasswordContainer","getDisplayName","WrappedComponent","displayName","name","withLogin","mapStateToProps","state","mapDispatchToProps","ConnectedComponent","connect","withRegistration"],"mappings":";;;;;;;;;;;;;;;AAUO,MAAMA,SAAS,GAAGA,CAACC,QAAQ,EAAEC,QAAQ,KAC1CC,MAAM,CAACC,UAAU,EAAE;EAAEH,QAAQ;AAAEC,EAAAA,QAAAA;AAAS,CAAC,CAAC,CAAA;AAErC,MAAMG,UAAU,GAAGC,YAAY,IAAIH,MAAM,CAACI,WAAW,EAAE;AAAED,EAAAA,YAAAA;AAAa,CAAC,CAAC,CAAA;AAExE,MAAME,YAAY,GAAGA,CAACC,IAAI,EAAEC,OAAO,KACxCP,MAAM,CAACQ,aAAa,EAAE;EACpBF,IAAI;AACJC,EAAAA,OAAAA;AACF,CAAC,CAAC,CAAA;AAEG,MAAME,oBAAoB,GAAGC,eAAe,IACjDV,MAAM,CAACW,2BAA2B,EAAE;AAAED,EAAAA,eAAAA;AAAgB,CAAC,CAAC,CAAA;AAEnD,MAAME,aAAa,GAAGC,mB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AAAA;GACD,CAAA;AAED,EAAA,MAAM6E,kBAAkB,GAAGC,OAAO,CAChCJ,eAAe,EACfE,kBAAkB,CACnB,CAAClC,IAAI,CAAC4B,gBAAgB,CAAC,CAAC,CAAA;EAEzBO,kBAAkB,CAACN,WAAW,GAAI,CAAA,EAAEF,gBAAc,CAACC,gBAAgB,CAAE,CAAC,CAAA,CAAA;AAEtE,EAAA,OAAOO,kBAAkB,CAAA;AAC3B;;ACjCA,MAAMR,cAAc,GAAGC,gBAAgB,IAAI;EACzC,OAAOA,gBAAgB,CAACC,WAAW,IAAID,gBAAgB,CAACE,IAAI,IAAI,WAAW,CAAA;AAC7E,CAAC,CAAA;AAEKO,MAAAA,gBAAgB,GAAGT,gBAAgB,IAAI;EAC3C,MAAMI,eAAe,GAAGC,KAAK,IAAI;IAC/B,OAAO;AACLvC,MAAAA,KAAK,EAAEQ,2BAA2B,CAAC+B,KAAK,CAAC;AACzC5C,MAAAA,SAAS,EAAEc,+BAA+B,CAAC8B,KAAK,CAAC;AACjD7B,MAAAA,SAAS,EAAEC,+BAA+B,CAAC4B,KAAK,CAAC;MACjDvE,IAAI,EAAE4C,sBAAsB,CAAC2B,KAAK,CAAA;KACnC,CAAA;GACF,CAAA;AAED,EAAA,MAAMC,kBAAkB,GAAG;AACzBzE,IAAAA,YAAAA;GACD,CAAA;AAED,EAAA,MAAM0E,kBAAkB,GAAGC,OAAO,CAChCJ,eAAe,EACfE,kBAAkB,CACnB,CAAClC,IAAI,CAAC4B,gBAAgB,CAAC,CAAC,CAAA;EAEzBO,kBAAkB,CAACN,WAAW,GAAI,CAAA,EAAEF,cAAc,CAACC,gBAAgB,CAAE,CAAC,CAAA,CAAA;AAEtE,EAAA,OAAOO,kBAAkB,CAAA;AAC3B;;;;"}
1
+ {"version":3,"file":"user.js","sources":["../src/user/hocs/withLogin.js","../src/user/hocs/withRegistration.js"],"sourcesContent":["import React from 'react';\nimport { useCookies } from 'react-cookie';\nimport { connect } from 'react-redux';\nimport { loginUser, logoutUser } from '../redux/actions';\nimport {\n selectUser,\n selectUserErrorMessage,\n selectUserIsAuthenticationError,\n selectUserIsError,\n selectUserIsAuthenticated,\n selectUserIsLoading,\n} from '../redux/selectors';\nimport { CookieHelper } from '../util/CookieHelper.class';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withLogin = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n errorMessage: selectUserErrorMessage(state),\n isAuthenticated: selectUserIsAuthenticated(state),\n isAuthenticationError: selectUserIsAuthenticationError(state),\n isError: selectUserIsError(state),\n isLoading: selectUserIsLoading(state),\n user: selectUser(state),\n // DEPRECATED: authenticationError is deprecated use isAuthenticationError instead\n authenticationError: selectUserIsAuthenticationError(state),\n // DEPRECATED: error is deprecated use isError instead\n error: selectUserIsError(state),\n };\n };\n\n const ConnectedComponent = () => {\n const cookies = new CookieHelper(...useCookies());\n\n const mapDispatchToProps = {\n loginUser: (username, password) => loginUser(username, password, cookies),\n logoutUser: redirectPath => logoutUser(redirectPath, cookies),\n };\n\n const FinalComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n return <FinalComponent />;\n };\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n ConnectedComponent.WrappedComponent = WrappedComponent;\n\n return ConnectedComponent;\n};\n\nexport default withLogin;\n","import { connect } from 'react-redux';\nimport { registerUser } from '../redux/actions';\nimport {\n selectUserRegistration,\n selectUserRegistrationError,\n selectUserRegistrationIsLoading,\n selectUserRegistrationIsSuccess,\n} from '../redux/selectors';\nimport { toJS } from '~/util/ToJs';\n\nconst getDisplayName = WrappedComponent => {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n};\n\nconst withRegistration = WrappedComponent => {\n const mapStateToProps = state => {\n return {\n error: selectUserRegistrationError(state),\n isLoading: selectUserRegistrationIsLoading(state),\n isSuccess: selectUserRegistrationIsSuccess(state),\n user: selectUserRegistration(state),\n };\n };\n\n const mapDispatchToProps = {\n registerUser,\n };\n\n const ConnectedComponent = connect(\n mapStateToProps,\n mapDispatchToProps\n )(toJS(WrappedComponent));\n\n ConnectedComponent.displayName = `${getDisplayName(WrappedComponent)}`;\n\n return ConnectedComponent;\n};\n\nexport default withRegistration;\n"],"names":["getDisplayName","WrappedComponent","displayName","name","withLogin","mapStateToProps","state","errorMessage","selectUserErrorMessage","isAuthenticated","selectUserIsAuthenticated","isAuthenticationError","selectUserIsAuthenticationError","isError","selectUserIsError","isLoading","selectUserIsLoading","user","selectUser","authenticationError","error","ConnectedComponent","cookies","CookieHelper","useCookies","mapDispatchToProps","loginUser","username","password","logoutUser","redirectPath","FinalComponent","connect","toJS","React","createElement","withRegistration","selectUserRegistrationError","selectUserRegistrationIsLoading","isSuccess","selectUserRegistrationIsSuccess","selectUserRegistration","registerUser"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAMA,gBAAc,GAAGC,gBAAgB,IAAI;EACzC,OAAOA,gBAAgB,CAACC,WAAW,IAAID,gBAAgB,CAACE,IAAI,IAAI,WAAW,CAAA;AAC7E,CAAC,CAAA;AAEKC,MAAAA,SAAS,GAAGH,gBAAgB,IAAI;EACpC,MAAMI,eAAe,GAAGC,KAAK,IAAI;IAC/B,OAAO;AACLC,MAAAA,YAAY,EAAEC,sBAAsB,CAACF,KAAK,CAAC;AAC3CG,MAAAA,eAAe,EAAEC,yBAAyB,CAACJ,KAAK,CAAC;AACjDK,MAAAA,qBAAqB,EAAEC,+BAA+B,CAACN,KAAK,CAAC;AAC7DO,MAAAA,OAAO,EAAEC,iBAAiB,CAACR,KAAK,CAAC;AACjCS,MAAAA,SAAS,EAAEC,mBAAmB,CAACV,KAAK,CAAC;AACrCW,MAAAA,IAAI,EAAEC,UAAU,CAACZ,KAAK,CAAC;AACvB;AACAa,MAAAA,mBAAmB,EAAEP,+BAA+B,CAACN,KAAK,CAAC;AAC3D;MACAc,KAAK,EA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AI,EAAEwB,sBAAsB,CAACnC,KAAK,CAAA;KACnC,CAAA;GACF,CAAA;AAED,EAAA,MAAMmB,kBAAkB,GAAG;AACzBiB,IAAAA,YAAAA;GACD,CAAA;AAED,EAAA,MAAMrB,kBAAkB,GAAGW,OAAO,CAChC3B,eAAe,EACfoB,kBAAkB,CACnB,CAACQ,IAAI,CAAChC,gBAAgB,CAAC,CAAC,CAAA;EAEzBoB,kBAAkB,CAACnB,WAAW,GAAI,CAAA,EAAEF,cAAc,CAACC,gBAAgB,CAAE,CAAC,CAAA,CAAA;AAEtE,EAAA,OAAOoB,kBAAkB,CAAA;AAC3B;;;;"}
package/esm/util.js CHANGED
@@ -1,20 +1,20 @@
1
1
  export { s as setCachingHeaders, u as urls } from './urls-eac9a747.js';
2
- export { c as cachedSearch, d as deliveryApi, g as getClientConfig } from './ContensisDeliveryApi-ad06857d.js';
2
+ export { c as cachedSearch, a as cachedSearchWithCookies, d as deliveryApi, b as deliveryApiWithCookies, g as getClientConfig } from './ContensisDeliveryApi-fe53fa10.js';
3
3
  import mapJson, { jpath } from 'jsonpath-mapper';
4
4
  export { jpath, default as mapJson } from 'jsonpath-mapper';
5
5
  import React from 'react';
6
6
  import { connect } from 'react-redux';
7
- import { b as selectCurrentProject } from './selectors-3f0d804d.js';
8
- import { f as selectCommitRef, g as selectBuildNumber, s as selectVersionStatus } from './version-dd31c7f0.js';
7
+ import { b as selectCurrentProject } from './selectors-0fe67d47.js';
8
+ import { f as selectCommitRef, g as selectBuildNumber, s as selectVersionStatus } from './version-7ea8bea8.js';
9
9
  import styled from 'styled-components';
10
10
  import 'contensis-delivery-api';
11
11
  import 'query-string';
12
+ import './CookieConstants-3d3b6531.js';
12
13
  import 'redux';
13
14
  import 'redux-thunk';
14
15
  import 'redux-saga';
15
16
  import 'redux-injectors';
16
17
  import 'immer';
17
- import 'deepmerge';
18
18
  import './reducers-3d5c37d1.js';
19
19
 
20
20
  /**
@@ -2,9 +2,8 @@ import { compose, applyMiddleware, createStore as createStore$1, combineReducers
2
2
  import thunkMiddleware from 'redux-thunk';
3
3
  import createSagaMiddleware, { END } from 'redux-saga';
4
4
  import { createInjectorsEnhancer } from 'redux-injectors';
5
- import { produce } from 'immer';
6
- import merge from 'deepmerge';
7
- import { B as SET_TARGET_PROJECT, C as SET_SURROGATE_KEYS, n as SET_SIBLINGS, d as SET_ROUTE, S as SET_NAVIGATION_PATH, U as UPDATE_LOADING_STATE, l as SET_ENTRY, m as SET_ANCESTORS, g as getImmutableOrJS } from './selectors-3f0d804d.js';
5
+ import { produce, original } from 'immer';
6
+ import { C as SET_TARGET_PROJECT, D as SET_SURROGATE_KEYS, n as SET_SIBLINGS, d as SET_ROUTE, S as SET_NAVIGATION_PATH, U as UPDATE_LOADING_STATE, l as SET_ENTRY, m as SET_ANCESTORS, g as getImmutableOrJS } from './selectors-0fe67d47.js';
8
7
  import { U as UserReducer } from './reducers-3d5c37d1.js';
9
8
 
10
9
  const ACTION_PREFIX = '@NAVIGATION/';
@@ -46,21 +45,8 @@ var NavigationReducer = produce((state, action) => {
46
45
  }
47
46
  }, initialState$2);
48
47
 
49
- const combineMerge = (target, source, options) => {
50
- const destination = target.slice();
51
- source.forEach((item, index) => {
52
- if (typeof destination[index] === 'undefined') {
53
- destination[index] = options.cloneUnlessOtherwiseSpecified(item, options);
54
- } else if (options.isMergeableObject(item)) {
55
- destination[index] = merge(target[index], item, options);
56
- } else if (target.indexOf(item) === -1) {
57
- destination.push(item);
58
- }
59
- });
60
- return destination;
61
- };
62
-
63
48
  const initialState$1 = {
49
+ canonicalPath: null,
64
50
  currentHostname: null,
65
51
  currentPath: '/',
66
52
  currentNode: {},
@@ -75,7 +61,8 @@ const initialState$1 = {
75
61
  mappedEntry: null,
76
62
  notFound: false,
77
63
  staticRoute: null,
78
- statusCode: 200
64
+ statusCode: 200,
65
+ apiCalls: []
79
66
  };
80
67
  var RoutingReducer = produce((state, action) => {
81
68
  switch (action.type) {
@@ -94,7 +81,8 @@ var RoutingReducer = produce((state, action) => {
94
81
  isError = false,
95
82
  isLoading = false,
96
83
  notFound = false,
97
- statusCode
84
+ statusCode,
85
+ currentPath
98
86
  } = action;
99
87
  let defaultStatus = 200;
100
88
  if (notFound === true && isError === false) defaultStatus = 404;else if (isError === true) defaultStatus = statusCode || 500;
@@ -107,6 +95,7 @@ var RoutingReducer = produce((state, action) => {
107
95
  state.isLoading = isLoading;
108
96
  state.notFound = notFound;
109
97
  state.statusCode = statusCode || defaultStatus;
98
+ state.canonicalPath = currentPath;
110
99
  } else {
111
100
  state.entryID = action.id;
112
101
  state.entry = entry;
@@ -115,6 +104,7 @@ var RoutingReducer = produce((state, action) => {
115
104
  state.isLoading = isLoading;
116
105
  state.notFound = notFound;
117
106
  state.statusCode = statusCode || defaultStatus;
107
+ state.canonicalPath = entry.sys.uri || currentPath;
118
108
  if (mappedEntry && Object.keys(mappedEntry).length > 0) {
119
109
  state.mappedEntry = mappedEntry;
120
110
  state.entry = {
@@ -195,10 +185,13 @@ var RoutingReducer = produce((state, action) => {
195
185
  }
196
186
  case SET_SURROGATE_KEYS:
197
187
  {
198
- // console.info(`SET_SURROGATE_KEYS: '${action.url}' keys: ${action.keys}`);
199
- state.surrogateKeys = merge(state.surrogateKeys, (action.keys || '').split(' '), {
200
- arrayMerge: combineMerge
201
- });
188
+ const newKeys = (action.keys || '').split(' ');
189
+ console.info(`[SET_SURROGATE_KEYS:${action.status}] ${newKeys.length} ${action.url}`);
190
+ state.apiCalls = [...original(state.apiCalls), [action.status, newKeys.length, action.url]];
191
+ const stateKeys = state.surrogateKeys ? original(state.surrogateKeys) : [];
192
+ const allKeys = [...stateKeys, ...newKeys];
193
+ const uniqueKeys = [...new Set(allKeys)];
194
+ state.surrogateKeys = uniqueKeys;
202
195
  return;
203
196
  }
204
197
  case SET_TARGET_PROJECT:
@@ -328,4 +321,4 @@ var version = /*#__PURE__*/Object.freeze({
328
321
  });
329
322
 
330
323
  export { GET_NODE_TREE as G, SET_NODE_TREE as S, GET_NODE_TREE_ERROR as a, SET_VERSION_STATUS as b, createStore as c, SET_VERSION as d, version as e, selectCommitRef as f, selectBuildNumber as g, navigation as n, reduxStore as r, selectVersionStatus as s, version$1 as v };
331
- //# sourceMappingURL=version-dd31c7f0.js.map
324
+ //# sourceMappingURL=version-7ea8bea8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-7ea8bea8.js","sources":["../src/redux/types/navigation.js","../src/redux/reducers/navigation.ts","../src/routing/redux/reducers.ts","../src/redux/types/version.js","../src/redux/reducers/version.ts","../src/redux/store/routerMiddleware.js","../src/redux/store/store.ts","../src/redux/selectors/version.js"],"sourcesContent":["const ACTION_PREFIX = '@NAVIGATION/';\nexport const GET_NODE_TREE = `${ACTION_PREFIX}_GET_NODE_TREE`;\nexport const SET_NODE_TREE = `${ACTION_PREFIX}_SET_NODE_TREE`;\nexport const GET_NODE_TREE_ERROR = `${ACTION_PREFIX}_GET_NODE_TREE_ERROR`;\n","import { Draft, produce } from 'immer';\nimport { SET_NODE_TREE, GET_NODE_TREE_ERROR } from '~/redux/types/navigation';\n\nconst initialState = {\n root: null,\n error: {\n isError: false,\n message: null,\n },\n isReady: false,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_NODE_TREE: {\n state.root = action.nodes;\n state.isReady = true;\n return;\n }\n case GET_NODE_TREE_ERROR: {\n state.error.isError = true;\n state.error.message = action.error || 'Unknown error occurred';\n return;\n }\n default:\n return;\n }\n}, initialState);\n","import { Draft, original, produce } from 'immer';\n\nimport {\n SET_ENTRY,\n SET_NAVIGATION_PATH,\n SET_ANCESTORS,\n SET_TARGET_PROJECT,\n SET_ROUTE,\n SET_SIBLINGS,\n SET_SURROGATE_KEYS,\n UPDATE_LOADING_STATE,\n} from './types';\n\nconst initialState = {\n canonicalPath: null,\n currentHostname: null,\n currentPath: '/',\n currentNode: {},\n currentNodeAncestors: [],\n currentProject: 'unknown',\n entryID: null,\n entry: null,\n error: undefined,\n isError: false,\n isLoading: false,\n location: {},\n mappedEntry: null,\n notFound: false,\n staticRoute: null,\n statusCode: 200,\n apiCalls: [],\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_ANCESTORS: {\n state.currentNodeAncestors = action.ancestors;\n return;\n }\n case SET_ENTRY: {\n const {\n entry,\n error,\n mappedEntry,\n node = {},\n isError = false,\n isLoading = false,\n notFound = false,\n statusCode,\n currentPath,\n } = action;\n\n let defaultStatus = 200;\n if (notFound === true && isError === false) defaultStatus = 404;\n else if (isError === true) defaultStatus = statusCode || 500;\n\n if (!entry) {\n state.entryID = null;\n state.entry = null;\n state.error = error;\n state.mappedEntry = null;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = currentPath;\n } else {\n state.entryID = action.id;\n state.entry = entry;\n state.error = error;\n state.isError = isError;\n state.isLoading = isLoading;\n state.notFound = notFound;\n state.statusCode = statusCode || defaultStatus;\n state.canonicalPath = entry.sys.uri || currentPath;\n\n if (mappedEntry && Object.keys(mappedEntry).length > 0) {\n state.mappedEntry = mappedEntry;\n state.entry = { sys: entry.sys };\n }\n }\n\n if (!node) {\n state.currentNode = null;\n } else {\n // On Set Node, we reset all dependants.\n state.currentNode = node;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { entry, ...nodeWithoutEntry } = node; // We have the entry stored elsewhere, so lets not keep it twice.\n state.currentNode = nodeWithoutEntry;\n }\n\n return;\n }\n case UPDATE_LOADING_STATE: {\n state.isLoading = action.isLoading;\n return;\n }\n case SET_NAVIGATION_PATH: {\n let staticRoute = {} as any;\n if (action.staticRoute) {\n staticRoute = { ...action.staticRoute };\n }\n if (action.path) {\n // Don't run a path update on initial load as we allready should have it in redux\n const entryUri = state?.entry?.sys?.uri;\n if (entryUri !== action.path) {\n state.currentPath = action.path;\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n state.isLoading = typeof window !== 'undefined';\n } else {\n state.location = action.location;\n state.staticRoute = {\n ...staticRoute,\n route: { ...staticRoute.route, component: null },\n };\n }\n }\n return;\n }\n case SET_ROUTE: {\n state.nextPath = action.path;\n return;\n }\n case SET_SIBLINGS: {\n // Can be null in some cases like the homepage.\n let currentNodeSiblingParent = null;\n if (action.siblings && action.siblings.length > 0) {\n currentNodeSiblingParent = action.siblings[0].parentId;\n }\n\n state.currentNodeSiblings = action.siblings;\n state.currentNodeSiblingsParent = currentNodeSiblingParent;\n return;\n }\n case SET_SURROGATE_KEYS: {\n const newKeys = (action.keys || '').split(' ');\n console.info(\n `[SET_SURROGATE_KEYS:${action.status}] ${newKeys.length} ${action.url}`\n );\n\n state.apiCalls = [\n ...original(state.apiCalls),\n [action.status, newKeys.length, action.url],\n ];\n const stateKeys = state.surrogateKeys\n ? original(state.surrogateKeys)\n : [];\n const allKeys = [...stateKeys, ...newKeys];\n const uniqueKeys = [...new Set(allKeys)];\n state.surrogateKeys = uniqueKeys;\n return;\n }\n case SET_TARGET_PROJECT: {\n state.currentProject = action.project;\n state.allowedGroups = action.allowedGroups;\n state.currentHostname = action.hostname;\n return;\n }\n default:\n return state;\n }\n}, initialState);\n","const VERSION_PREFIX = '@VERSION/';\nexport const SET_VERSION = `${VERSION_PREFIX}SET_VERSION`;\nexport const SET_VERSION_STATUS = `${VERSION_PREFIX}SET_VERSION_STATUS`;\n","import { Draft, produce } from 'immer';\nimport { SET_VERSION, SET_VERSION_STATUS } from '~/redux/types/version';\n\nconst initialState = {\n commitRef: null,\n buildNo: null,\n contensisVersionStatus: null as 'latest' | 'published' | null,\n};\n\nexport default produce((state: Draft<any>, action) => {\n switch (action.type) {\n case SET_VERSION_STATUS: {\n state.contensisVersionStatus = action.status;\n return;\n }\n case SET_VERSION: {\n state.commitRef = action.commitRef;\n state.buildNo = action.buildNo;\n return;\n }\n default:\n return;\n }\n}, initialState);\n","/**\n * This middleware captures 'CALL_HISTORY_METHOD' actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\n/* eslint-disable no-unused-vars */\nconst routerMiddleware = history => store => next => action => {\n if (action.type !== 'CALL_HISTORY_METHOD') {\n return next(action);\n }\n\n const {\n payload: { method, args },\n } = action;\n history[method](...args);\n};\n\nexport default routerMiddleware;\n","import {\n applyMiddleware,\n combineReducers,\n compose,\n createStore,\n Action,\n Store,\n StoreEnhancer,\n} from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport createSagaMiddleware, { END } from 'redux-saga';\nimport { createInjectorsEnhancer } from 'redux-injectors';\n\n// Core reducers\nimport NavigationReducer from '../reducers/navigation';\nimport RoutingReducer from '~/routing/redux/reducers';\nimport UserReducer from '~/user/redux/reducers';\nimport VersionReducer from '../reducers/version';\nimport routerMiddleware from './routerMiddleware';\nimport { AppState } from '../appstate';\nimport { History, MemoryHistory } from 'history';\nimport { StateType } from '~/config';\n\nexport let reduxStore;\n\n/* eslint-disable no-underscore-dangle */\ndeclare let window: Window &\n typeof globalThis & {\n __REDUX_DEVTOOLS_EXTENSION__: any;\n };\n\nexport default async (\n featureReducers: any,\n initialState: AppState,\n history: History | MemoryHistory,\n stateType: StateType\n) => {\n let reduxDevToolsMiddleware = f => f;\n\n if (typeof window != 'undefined') {\n reduxDevToolsMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : f => f;\n }\n\n const sagaMiddleware = createSagaMiddleware();\n\n const reducers = {\n navigation: NavigationReducer,\n routing: RoutingReducer,\n user: UserReducer,\n version: VersionReducer,\n ...featureReducers,\n };\n\n // Reassign the combiner and fromJS functions when\n // stateType is 'immutable' with dynamic imports\n let combiner = combineReducers;\n let fromJS: any = (obj: any) => obj;\n globalThis.STATE_TYPE = stateType;\n\n if (stateType === 'immutable') {\n globalThis.immutable = await import(\n /* webpackChunkName: \"immutable\" */ 'immutable'\n );\n\n fromJS = (\n await import(/* webpackChunkName: \"from-js\" */ '~/util/fromJSLeaveImmer')\n ).default;\n\n combiner = (\n await import(/* webpackChunkName: \"redux-immutable\" */ 'redux-immutable')\n ).combineReducers;\n }\n\n const createReducer = (injectedReducers = {}) => {\n const rootReducer = combiner<AppState>({\n ...injectedReducers,\n // other non-injected reducers go here\n ...reducers,\n });\n\n return rootReducer;\n };\n\n const store = (initialState: AppState) => {\n const runSaga = sagaMiddleware.run;\n\n const middleware: StoreEnhancer<\n {\n dispatch: unknown;\n },\n unknown\n > = compose(\n applyMiddleware(\n thunkMiddleware,\n sagaMiddleware,\n routerMiddleware(history)\n ),\n createInjectorsEnhancer({\n createReducer,\n runSaga,\n }),\n reduxDevToolsMiddleware\n );\n\n const store: Store<AppState, Action<any>> & {\n runSaga?: typeof runSaga;\n close?: () => void;\n } = createStore<AppState, Action<any>, unknown, unknown>(\n createReducer(),\n initialState,\n middleware\n );\n\n store.runSaga = runSaga;\n store.close = () => store.dispatch(END);\n\n return store;\n };\n\n reduxStore = store(fromJS(initialState));\n return reduxStore;\n};\n","import { getImmutableOrJS as getIn } from '~/redux/util';\n\nexport const selectCommitRef = state => getIn(state, ['version', 'commitRef']);\n\nexport const selectBuildNumber = state => getIn(state, ['version', 'buildNo']);\n\nexport const selectVersionStatus = state =>\n getIn(state, ['version', 'contensisVersionStatus']);\n"],"names":["ACTION_PREFIX","GET_NODE_TREE","SET_NODE_TREE","GET_NODE_TREE_ERROR","initialState","root","error","isError","message","isReady","produce","state","action","type","nodes","canonicalPath","currentHostname","currentPath","currentNode","currentNodeAncestors","currentProject","entryID","entry","undefined","isLoading","location","mappedEntry","notFound","staticRoute","statusCode","apiCalls","SET_ANCESTORS","ancestors","SET_ENTRY","node","defaultStatus","id","sys","uri","Object","keys","length","nodeWithoutEntry","UPDATE_LOADING_STATE","SET_NAVIGATION_PATH","path","_state$entry","_state$entry$sys","entryUri","route","component","window","SET_ROUTE","nextPath","SET_SIBLINGS","currentNodeSiblingParent","siblings","parentId","currentNodeSiblings","currentNodeSiblingsParent","SET_SURROGATE_KEYS","newKeys","split","console","info","status","url","original","stateKeys","surrogateKeys","allKeys","uniqueKeys","Set","SET_TARGET_PROJECT","project","allowedGroups","hostname","VERSION_PREFIX","SET_VERSION","SET_VERSION_STATUS","commitRef","buildNo","contensisVersionStatus","routerMiddleware","history","store","next","payload","method","args","reduxStore","featureReducers","stateType","reduxDevToolsMiddleware","f","__REDUX_DEVTOOLS_EXTENSION__","sagaMiddleware","createSagaMiddleware","reducers","navigation","NavigationReducer","routing","RoutingReducer","user","UserReducer","version","VersionReducer","combiner","combineReducers","fromJS","obj","globalThis","STATE_TYPE","immutable","default","createReducer","injectedReducers","rootReducer","runSaga","run","middleware","compose","applyMiddleware","thunkMiddleware","createInjectorsEnhancer","createStore","close","dispatch","END","selectCommitRef","getIn","selectBuildNumber","selectVersionStatus"],"mappings":";;;;;;;;AAAA,MAAMA,aAAa,GAAG,cAAc,CAAA;AACvBC,MAAAA,aAAa,GAAI,CAAA,EAAED,aAAc,CAAe,cAAA,EAAA;AAChDE,MAAAA,aAAa,GAAI,CAAA,EAAEF,aAAc,CAAe,cAAA,EAAA;AAChDG,MAAAA,mBAAmB,GAAI,CAAA,EAAEH,aAAc,CAAqB,oBAAA;;;;;;;;;ACAzE,MAAMI,cAAY,GAAG;AACnBC,EAAAA,IAAI,EAAE,IAAI;AACVC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,KAAK;AACdC,IAAAA,OAAO,EAAE,IAAA;GACV;AACDC,EAAAA,OAAO,EAAE,KAAA;AACX,CAAC,CAAA;AAED,wBAAeC,OAAO,CAAC,CAACC,KAAiB,EAAEC,MAAM,KAAK;EACpD,QAAQA,MAAM,CAACC,IAAI;AACjB,IAAA,KAAKX,aAAa;AAAE,MAAA;AAClBS,QAAAA,KAAK,CAACN,IAAI,GAAGO,MAAM,CAACE,KAAK,CAAA;QACzBH,KAAK,CAACF,OAAO,GAAG,IAAI,CAAA;AACpB,QAAA,OAAA;AACF,OAAA;AACA,IAAA,KAAKN,mB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,KAAK,EAAE,CAAC,SAAS,EAAE,wBAAwB,CAAC;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
- import { g as getImmutableOrJS, D as action } from './selectors-3f0d804d.js';
1
+ import { g as getImmutableOrJS, E as action } from './selectors-0fe67d47.js';
2
2
  import { all } from '@redux-saga/core/effects';
3
- import { r as reduxStore, b as SET_VERSION_STATUS, d as SET_VERSION } from './version-dd31c7f0.js';
3
+ import { r as reduxStore, b as SET_VERSION_STATUS, d as SET_VERSION } from './version-7ea8bea8.js';
4
4
 
5
5
  const hasNavigationTree = state => getImmutableOrJS(state, ['navigation', 'isReady']);
6
6
  const selectNavigationRoot = state => getImmutableOrJS(state, ['navigation', 'root']);
@@ -84,4 +84,4 @@ var version = /*#__PURE__*/Object.freeze({
84
84
  });
85
85
 
86
86
  export { setVersion as a, injectReducer as b, convertSagaArray as c, injectSaga as d, hasNavigationTree as h, injectRedux as i, navigation as n, setVersionStatus as s, useInjectRedux as u, version as v };
87
- //# sourceMappingURL=version-f4629693.js.map
87
+ //# sourceMappingURL=version-f42f7bdc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-f4629693.js","sources":["../src/redux/selectors/navigation.js","../src/redux/store/injectors.js","../src/redux/actions/version.js"],"sourcesContent":["import { getImmutableOrJS as getIn } from '~/redux/util';\n\nexport const hasNavigationTree = state =>\n getIn(state, ['navigation', 'isReady']);\n\nexport const selectNavigationRoot = state =>\n getIn(state, ['navigation', 'root']);\n\nexport const selectNavigationChildren = state =>\n getIn(state, ['navigation', 'root', 'children']);\n\nexport const selectNavigationDepends = () => [];\n","import { all } from 'redux-saga/effects';\nimport { reduxStore as DefaultStore } from './store';\n\nexport const convertSagaArray = sagas => {\n if (Array.isArray(sagas))\n return function* rootSaga() {\n yield all(sagas);\n };\n return sagas;\n};\n\nexport const injectReducer = ({ key, reducer }, store = DefaultStore) => {\n if (\n Reflect.has(store.injectedReducers, key) &&\n store.injectedReducers[key] === reducer\n )\n return;\n store.injectedReducers[key] = reducer;\n\n store.replaceReducer(store.createReducer(store.injectedReducers));\n};\n\nexport const injectSaga = ({ key, saga }, store = DefaultStore) => {\n const rootSaga = convertSagaArray(saga);\n let hasSaga = Reflect.has(store.injectedSagas, key);\n\n if (process.env.NODE_ENV !== 'production') {\n const oldDescriptor = store.injectedSagas[key]; // enable hot reloading of daemon and once-till-unmount sagas\n\n if (hasSaga && oldDescriptor.saga !== rootSaga) {\n oldDescriptor.task.cancel();\n hasSaga = false;\n }\n }\n console.info('injectSaga, key: ', key, 'hasSaga: ', hasSaga);\n\n if (!hasSaga) {\n store.injectedSagas[key] = {\n key,\n saga: rootSaga,\n task: store.runSaga(rootSaga),\n };\n }\n};\n\nexport const injectRedux = ({ key, reducer, saga }, store = DefaultStore) => {\n console.info('injectRedux, key: ', key);\n if (reducer) injectReducer({ key, reducer }, store);\n if (saga) injectSaga({ key, saga }, store);\n};\n\nexport const useInjectRedux = injectRedux;\n","import { action } from '../util';\nimport { SET_VERSION, SET_VERSION_STATUS } from '../types/version';\n\nexport const setVersion = (commitRef, buildNo) =>\n action(SET_VERSION, { commitRef, buildNo });\n\nexport const setVersionStatus = status =>\n action(SET_VERSION_STATUS, { status });\n"],"names":["hasNavigationTree","state","getIn","selectNavigationRoot","selectNavigationChildren","selectNavigationDepends","convertSagaArray","sagas","Array","isArray","rootSaga","all","injectReducer","key","reducer","store","DefaultStore","Reflect","has","injectedReducers","replaceReducer","createReducer","injectSaga","saga","hasSaga","injectedSagas","process","env","NODE_ENV","oldDescriptor","task","cancel","console","info","runSaga","injectRedux","useInjectRedux","setVersion","commitRef","buildNo","action","SET_VERSION","setVersionStatus","status","SET_VERSION_STATUS"],"mappings":";;;;AAEaA,MAAAA,iBAAiB,GAAGC,KAAK,IACpCC,gBAAK,CAACD,KAAK,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EAAC;AAElC,MAAME,oBAAoB,GAAGF,KAAK,IACvCC,gBAAK,CAACD,KAAK,EAAE,CAAC,YAAY,EAAE,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AAED,EAAAA,MAAAA;AAAO,CAAC;;;;;;;;;;"}
1
+ {"version":3,"file":"version-f42f7bdc.js","sources":["../src/redux/selectors/navigation.js","../src/redux/store/injectors.js","../src/redux/actions/version.js"],"sourcesContent":["import { getImmutableOrJS as getIn } from '~/redux/util';\n\nexport const hasNavigationTree = state =>\n getIn(state, ['navigation', 'isReady']);\n\nexport const selectNavigationRoot = state =>\n getIn(state, ['navigation', 'root']);\n\nexport const selectNavigationChildren = state =>\n getIn(state, ['navigation', 'root', 'children']);\n\nexport const selectNavigationDepends = () => [];\n","import { all } from 'redux-saga/effects';\nimport { reduxStore as DefaultStore } from './store';\n\nexport const convertSagaArray = sagas => {\n if (Array.isArray(sagas))\n return function* rootSaga() {\n yield all(sagas);\n };\n return sagas;\n};\n\nexport const injectReducer = ({ key, reducer }, store = DefaultStore) => {\n if (\n Reflect.has(store.injectedReducers, key) &&\n store.injectedReducers[key] === reducer\n )\n return;\n store.injectedReducers[key] = reducer;\n\n store.replaceReducer(store.createReducer(store.injectedReducers));\n};\n\nexport const injectSaga = ({ key, saga }, store = DefaultStore) => {\n const rootSaga = convertSagaArray(saga);\n let hasSaga = Reflect.has(store.injectedSagas, key);\n\n if (process.env.NODE_ENV !== 'production') {\n const oldDescriptor = store.injectedSagas[key]; // enable hot reloading of daemon and once-till-unmount sagas\n\n if (hasSaga && oldDescriptor.saga !== rootSaga) {\n oldDescriptor.task.cancel();\n hasSaga = false;\n }\n }\n console.info('injectSaga, key: ', key, 'hasSaga: ', hasSaga);\n\n if (!hasSaga) {\n store.injectedSagas[key] = {\n key,\n saga: rootSaga,\n task: store.runSaga(rootSaga),\n };\n }\n};\n\nexport const injectRedux = ({ key, reducer, saga }, store = DefaultStore) => {\n console.info('injectRedux, key: ', key);\n if (reducer) injectReducer({ key, reducer }, store);\n if (saga) injectSaga({ key, saga }, store);\n};\n\nexport const useInjectRedux = injectRedux;\n","import { action } from '../util';\nimport { SET_VERSION, SET_VERSION_STATUS } from '../types/version';\n\nexport const setVersion = (commitRef, buildNo) =>\n action(SET_VERSION, { commitRef, buildNo });\n\nexport const setVersionStatus = status =>\n action(SET_VERSION_STATUS, { status });\n"],"names":["hasNavigationTree","state","getIn","selectNavigationRoot","selectNavigationChildren","selectNavigationDepends","convertSagaArray","sagas","Array","isArray","rootSaga","all","injectReducer","key","reducer","store","DefaultStore","Reflect","has","injectedReducers","replaceReducer","createReducer","injectSaga","saga","hasSaga","injectedSagas","process","env","NODE_ENV","oldDescriptor","task","cancel","console","info","runSaga","injectRedux","useInjectRedux","setVersion","commitRef","buildNo","action","SET_VERSION","setVersionStatus","status","SET_VERSION_STATUS"],"mappings":";;;;AAEaA,MAAAA,iBAAiB,GAAGC,KAAK,IACpCC,gBAAK,CAACD,KAAK,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EAAC;AAElC,MAAME,oBAAoB,GAAGF,KAAK,IACvCC,gBAAK,CAACD,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;AAE/B,MAAMG,wBAAwB,GAAGH,KAAK,IAC3CC,gBAAK,CAACD,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;AAE3C,MAAMI,uBAAuB,GAAGA,MAAM,EAAE;;;;;;;;;;ACRlCC,MAAAA,gBAAgB,GAAGC,KAAK,IAAI;EACvC,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EACtB,OAAO,UAAUG,QAAQA,GAAG;IAC1B,MAAMC,GAAG,CAACJ,KAAK,CAAC,CAAA;GACjB,CAAA;AACH,EAAA,OAAOA,KAAK,CAAA;AACd,EAAC;AAEM,MAAMK,aAAa,GAAGA,CAAC;EAAEC,GAAG;AAAEC,EAAAA,OAAAA;AAAQ,CAAC,EAAEC,KAAK,GAAGC,UAAY,KAAK;AACvE,EAAA,IACEC,OAAO,CAACC,GAAG,CAACH,KAAK,CAACI,gBAAgB,EAAEN,GAAG,CAAC,IACxCE,KAAK,CA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AAES,EAAAA,IAAAA;AAAK,CAAC,EAAER,KAAK,GAAGC,UAAY,KAAK;AAC3EgB,EAAAA,OAAO,CAACC,IAAI,CAAC,oBAAoB,EAAEpB,GAAG,CAAC,CAAA;EACvC,IAAIC,OAAO,EAAEF,aAAa,CAAC;IAAEC,GAAG;AAAEC,IAAAA,OAAAA;GAAS,EAAEC,KAAK,CAAC,CAAA;EACnD,IAAIQ,IAAI,EAAED,UAAU,CAAC;IAAET,GAAG;AAAEU,IAAAA,IAAAA;GAAM,EAAER,KAAK,CAAC,CAAA;AAC5C,EAAC;AAEM,MAAMqB,cAAc,GAAGD;;AChDvB,MAAME,UAAU,GAAGA,CAACC,SAAS,EAAEC,OAAO,KAC3CC,MAAM,CAACC,WAAW,EAAE;EAAEH,SAAS;AAAEC,EAAAA,OAAAA;AAAQ,CAAC,EAAC;AAEtC,MAAMG,gBAAgB,GAAGC,MAAM,IACpCH,MAAM,CAACI,kBAAkB,EAAE;AAAED,EAAAA,MAAAA;AAAO,CAAC;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import 'isomorphic-fetch';
2
2
  import React from 'react';
3
3
  import { AppConfig } from "../config";
4
- declare type ReactAppProps = {
4
+ type ReactAppProps = {
5
5
  routes: any;
6
6
  withEvents: any;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { AppRoutes, WithEvents } from './routing/routes';
2
2
  import handleResponse from './server/features/response-handler';
3
- export declare type StateType = 'immutable' | 'js';
4
- export declare type AppConfig = {
3
+ export type StateType = 'immutable' | 'js';
4
+ export type AppConfig = {
5
5
  stateType?: StateType;
6
6
  routes: AppRoutes;
7
7
  withReducers: {
@@ -10,11 +10,11 @@ export declare type AppConfig = {
10
10
  withSagas: any[];
11
11
  withEvents: WithEvents;
12
12
  };
13
- export declare type ServerConfig = AppConfig & {
13
+ export type ServerConfig = AppConfig & {
14
14
  appRootPath?: string;
15
15
  disableSsrRedux?: boolean;
16
16
  handleResponses?: typeof handleResponse;
17
- handleExceptions?: boolean;
17
+ handleExceptions?: boolean | string[];
18
18
  reverseProxyPaths?: string[];
19
19
  packagejson: any;
20
20
  proxyDeliveryApi?: boolean;
@@ -3,13 +3,14 @@ import { Entry, Node } from 'contensis-delivery-api/lib/models';
3
3
  import { Group, User } from 'contensis-management-api/lib/models';
4
4
  import { MatchedRoute } from 'react-router-config';
5
5
  import { StaticRoute } from "../routing/routes";
6
- export declare type AppState = {
6
+ export type AppState = {
7
7
  navigation: {
8
8
  root: Node | null;
9
9
  isError: boolean;
10
10
  isReady: boolean;
11
11
  };
12
12
  routing: {
13
+ canonicalPath: string | null;
13
14
  currentHostname: null;
14
15
  currentPath: string;
15
16
  currentNode: Node & {
@@ -1,6 +1,10 @@
1
- export declare const setNotFound: (notFound: any) => any;
2
- export declare const setNavigationPath: (path: any, location: any, staticRoute: any, withEvents: any, statePath: any, routes: any) => any;
3
- export declare const setCurrentProject: (project: any, allowedGroups: any, hostname: any) => any;
4
- export declare const setRoute: (path: any, state: any) => any;
5
- export declare const setRouteEntry: (entry: any) => any;
6
- export declare const setSurrogateKeys: (keys: any, url: any) => any;
1
+ import { useLocation } from 'react-router-dom';
2
+ import { Entry } from 'contensis-delivery-api/lib/models';
3
+ import { MatchedRoute, RouteConfig } from 'react-router-config';
4
+ import { AppRoutes, WithEvents } from '../routes';
5
+ import { CookieHelper } from "../../user/util/CookieHelper.class";
6
+ export declare const setNavigationPath: (path: string, location: ReturnType<typeof useLocation>, staticRoute: MatchedRoute<any, RouteConfig> | undefined, withEvents: WithEvents, statePath: string, routes: AppRoutes, cookies: CookieHelper) => any;
7
+ export declare const setCurrentProject: (project: string, allowedGroups: any, hostname: string) => any;
8
+ export declare const setRoute: (path: string, state?: any) => any;
9
+ export declare const setRouteEntry: (entry: Entry) => any;
10
+ export declare const setSurrogateKeys: (keys: string, url: string, status: number) => any;
@@ -1,7 +1,7 @@
1
1
  import { StateType } from "../../config";
2
2
  import { AppState } from "../../redux/appstate";
3
- export declare const selectRouteEntry: (state: AppState, returnType?: StateType | undefined) => any;
4
- export declare const selectMappedEntry: (state: AppState, returnType?: StateType | undefined) => any;
3
+ export declare const selectRouteEntry: (state: AppState, returnType?: StateType) => any;
4
+ export declare const selectMappedEntry: (state: AppState, returnType?: StateType) => any;
5
5
  export declare const selectSurrogateKeys: (state: AppState) => any;
6
6
  export declare const selectCurrentHostname: (state: AppState) => any;
7
7
  export declare const selectCurrentTreeID: (state: AppState) => any;
@@ -10,6 +10,7 @@ export declare const selectRouteEntryContentTypeId: (state: AppState) => any;
10
10
  export declare const selectRouteEntryLanguage: (state: AppState) => any;
11
11
  export declare const selectRouteEntrySlug: (state: AppState) => any;
12
12
  export declare const selectRouteEntryID: (state: AppState) => any;
13
+ export declare const selectCanonicalPath: (state: AppState) => any;
13
14
  export declare const selectCurrentPath: (state: AppState) => any;
14
15
  export declare const selectCurrentLocation: (state: AppState) => any;
15
16
  export declare const selectCurrentSearch: (state: AppState) => any;
@@ -19,9 +20,9 @@ export declare const selectCurrentProject: (state: AppState) => any;
19
20
  export declare const selectIsNotFound: (state: AppState) => any;
20
21
  export declare const selectCurrentAncestors: (state: AppState) => any;
21
22
  export declare const selectCurrentSiblings: (state: AppState) => any;
22
- export declare const selectCurrentNode: (state: AppState, returnType?: StateType | undefined) => any;
23
+ export declare const selectCurrentNode: (state: AppState, returnType?: StateType) => any;
23
24
  export declare const selectCurrentChildren: (state: any) => any;
24
- export declare const selectBreadcrumb: (state: AppState) => any;
25
+ export declare const selectBreadcrumb: (state: AppState) => any[];
25
26
  export declare const selectRouteErrorMessage: (state: AppState) => any;
26
27
  export declare const selectRouteIsError: (state: AppState) => any;
27
28
  export declare const selectRouteLoading: (state: AppState) => any;
@@ -5,7 +5,6 @@ export declare const SET_ANCESTORS: string;
5
5
  export declare const SET_SIBLINGS: string;
6
6
  export declare const SET_ENTRY_ID: string;
7
7
  export declare const SET_SURROGATE_KEYS: string;
8
- export declare const SET_NAVIGATION_NOT_FOUND: string;
9
8
  export declare const SET_NAVIGATION_PATH: string;
10
9
  export declare const SET_TARGET_PROJECT: string;
11
10
  export declare const SET_ROUTE: string;