@zengenti/contensis-react-base 2.4.1-beta.6 → 2.5.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 (221) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +77 -0
  3. package/cjs/{App-2334f3e0.js → App-79703372.js} +213 -8
  4. package/cjs/App-79703372.js.map +1 -0
  5. package/cjs/{RouteLoader-5c44f039.js → RouteLoader-f67bbf9e.js} +8 -39
  6. package/cjs/RouteLoader-f67bbf9e.js.map +1 -0
  7. package/cjs/{ToJs-ca9bea03.js → ToJs-d72e5b10.js} +58 -2
  8. package/cjs/ToJs-d72e5b10.js.map +1 -0
  9. package/cjs/{actions-e22726ed.js → actions-e9f69947.js} +1 -1
  10. package/cjs/actions-e9f69947.js.map +1 -0
  11. package/cjs/client.js +13 -15
  12. package/cjs/client.js.map +1 -1
  13. package/cjs/contensis-react-base.js +38 -38
  14. package/cjs/contensis-react-base.js.map +1 -1
  15. package/cjs/forms.js +1 -2
  16. package/cjs/forms.js.map +1 -1
  17. package/cjs/{login-6eb5e46d.js → login-4f274c6a.js} +8 -5
  18. package/cjs/login-4f274c6a.js.map +1 -0
  19. package/cjs/reducers-cb531715.js +207 -0
  20. package/cjs/reducers-cb531715.js.map +1 -0
  21. package/cjs/redux.js +4 -4
  22. package/cjs/redux.js.map +1 -1
  23. package/cjs/routing.js +4 -5
  24. package/cjs/routing.js.map +1 -1
  25. package/cjs/search.js +6 -4
  26. package/cjs/search.js.map +1 -1
  27. package/cjs/{selectors-69c3d37c.js → selectors-1295124a.js} +9 -1
  28. package/cjs/selectors-1295124a.js.map +1 -0
  29. package/cjs/user.js +82 -27
  30. package/cjs/user.js.map +1 -1
  31. package/cjs/util.js +21 -91
  32. package/cjs/util.js.map +1 -1
  33. package/cjs/{version-d8f5b436.js → version-3a808c12.js} +4 -4
  34. package/cjs/version-3a808c12.js.map +1 -0
  35. package/esm/{App-b2b80182.js → App-452c2ab3.js} +213 -8
  36. package/esm/App-452c2ab3.js.map +1 -0
  37. package/esm/{RouteLoader-2cfdfc5c.js → RouteLoader-dedcc835.js} +8 -38
  38. package/esm/RouteLoader-dedcc835.js.map +1 -0
  39. package/esm/{ToJs-19a3244a.js → ToJs-6e7b247c.js} +47 -3
  40. package/esm/ToJs-6e7b247c.js.map +1 -0
  41. package/esm/{actions-fda5e103.js → actions-ddd9c623.js} +1 -1
  42. package/esm/actions-ddd9c623.js.map +1 -0
  43. package/esm/client.js +15 -16
  44. package/esm/client.js.map +1 -1
  45. package/esm/contensis-react-base.js +37 -37
  46. package/esm/contensis-react-base.js.map +1 -1
  47. package/esm/forms.js +1 -2
  48. package/esm/forms.js.map +1 -1
  49. package/esm/{login-866fe64c.js → login-1f9ad133.js} +8 -6
  50. package/esm/login-1f9ad133.js.map +1 -0
  51. package/esm/reducers-feab84fc.js +183 -0
  52. package/esm/reducers-feab84fc.js.map +1 -0
  53. package/esm/redux.js +5 -5
  54. package/esm/redux.js.map +1 -1
  55. package/esm/routing.js +4 -5
  56. package/esm/routing.js.map +1 -1
  57. package/esm/search.js +6 -4
  58. package/esm/search.js.map +1 -1
  59. package/esm/{selectors-170581d2.js → selectors-68799788.js} +9 -1
  60. package/esm/selectors-68799788.js.map +1 -0
  61. package/esm/user.js +80 -29
  62. package/esm/user.js.map +1 -1
  63. package/esm/util.js +20 -90
  64. package/esm/util.js.map +1 -1
  65. package/esm/{version-8d757fb4.js → version-64906b26.js} +5 -4
  66. package/esm/version-64906b26.js.map +1 -0
  67. package/models/app/App.d.ts +4 -0
  68. package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +40 -0
  69. package/models/app/pages/VersionInfo/components/VersionInfo.styled.d.ts +1 -0
  70. package/models/app/pages/VersionInfo/index.d.ts +2 -0
  71. package/models/app/pages/VersionInfo/transformations/state-to-versioninfoprops.mapper.d.ts +3 -0
  72. package/models/client/client.d.ts +11 -0
  73. package/models/client/index.d.ts +3 -0
  74. package/models/config.d.ts +33 -0
  75. package/models/forms/index.d.ts +1 -0
  76. package/models/index.d.ts +5 -0
  77. package/models/redux/actions/index.d.ts +9 -0
  78. package/models/redux/actions/navigation.d.ts +1 -0
  79. package/models/redux/actions/version.d.ts +2 -0
  80. package/models/redux/index.d.ts +17 -0
  81. package/models/redux/reducers/navigation.d.ts +3 -0
  82. package/models/redux/reducers/version.d.ts +3 -0
  83. package/models/redux/sagas/index.d.ts +1 -0
  84. package/models/redux/sagas/navigation.d.ts +4 -0
  85. package/models/redux/selectors/index.d.ts +9 -0
  86. package/models/redux/selectors/navigation.d.ts +3 -0
  87. package/models/redux/selectors/version.d.ts +3 -0
  88. package/models/redux/store/history.d.ts +2 -0
  89. package/models/redux/store/injectors.d.ts +19 -0
  90. package/models/redux/store/routerMiddleware.d.ts +7 -0
  91. package/models/redux/store/store.d.ts +3 -0
  92. package/models/redux/types/index.d.ts +9 -0
  93. package/models/redux/types/navigation.d.ts +3 -0
  94. package/models/redux/types/version.d.ts +2 -0
  95. package/models/redux/util.d.ts +1 -0
  96. package/models/routing/components/Loading.d.ts +5 -0
  97. package/models/routing/components/NotFound.d.ts +6 -0
  98. package/models/routing/components/RouteLoader.d.ts +3 -0
  99. package/models/routing/components/Status.d.ts +4 -0
  100. package/models/routing/index.d.ts +4 -0
  101. package/models/routing/redux/actions.d.ts +6 -0
  102. package/models/routing/redux/reducers.d.ts +4 -0
  103. package/models/routing/redux/sagas.d.ts +1 -0
  104. package/models/routing/redux/selectors.d.ts +25 -0
  105. package/models/routing/redux/types.d.ts +12 -0
  106. package/models/routing/routes.d.ts +99 -0
  107. package/models/routing/util/expressions.d.ts +2 -0
  108. package/models/routing/util/find-contenttype-mapping.d.ts +2 -0
  109. package/models/routing/util/queries.d.ts +2 -0
  110. package/models/search/containers/withListing.d.ts +4 -0
  111. package/models/search/containers/withSearch.d.ts +4 -0
  112. package/models/search/hooks/useMinilist.hook.d.ts +23 -0
  113. package/models/search/index.d.ts +16 -0
  114. package/models/search/models/Enums.d.ts +5 -0
  115. package/models/search/models/Queries.d.ts +43 -0
  116. package/models/search/models/Search.d.ts +180 -0
  117. package/models/search/models/SearchActions.d.ts +127 -0
  118. package/models/search/models/SearchProps.d.ts +45 -0
  119. package/models/search/models/SearchState.d.ts +83 -0
  120. package/models/search/models/SearchUtil.d.ts +6 -0
  121. package/models/search/models/index.d.ts +3 -0
  122. package/models/search/redux/actions.d.ts +39 -0
  123. package/models/search/redux/queries.d.ts +3 -0
  124. package/models/search/redux/reducers.d.ts +4 -0
  125. package/models/search/redux/sagas.d.ts +20 -0
  126. package/models/search/redux/schema.d.ts +9 -0
  127. package/models/search/redux/selectors.d.ts +112 -0
  128. package/models/search/redux/types.d.ts +20 -0
  129. package/models/search/redux/util.d.ts +25 -0
  130. package/models/search/search/ContensisDeliveryApi.d.ts +32 -0
  131. package/models/search/search/ToJs.d.ts +4 -0
  132. package/models/search/search/expressions.d.ts +29 -0
  133. package/models/search/search/performance.d.ts +1 -0
  134. package/models/search/search/schema.d.ts +28 -0
  135. package/models/search/search/util.d.ts +21 -0
  136. package/models/search/transformations/entry-to-filteritem.mapper.d.ts +2 -0
  137. package/models/search/transformations/filters-to-filterexpression.d.ts +1 -0
  138. package/models/search/transformations/filters-to-filterexpression.mapper.d.ts +2 -0
  139. package/models/search/transformations/searchresult-to-state.mapper.d.ts +6 -0
  140. package/models/search/transformations/state-to-queryparams.mapper.d.ts +12 -0
  141. package/models/search/transformations/state-to-searchuri.d.ts +14 -0
  142. package/models/server/features/caching/cacheDuration.schema.d.ts +7 -0
  143. package/models/server/features/caching/cacheHashing.d.ts +1 -0
  144. package/models/server/features/caching/setCachingHeaders.d.ts +6 -0
  145. package/models/server/features/response-handler/index.d.ts +12 -0
  146. package/models/server/features/response-handler/types.d.ts +5 -0
  147. package/models/server/features/reverse-proxy/index.d.ts +4 -0
  148. package/models/server/features/static-assets/index.d.ts +14 -0
  149. package/models/server/internalServer.d.ts +10 -0
  150. package/models/server/middleware/bundleManipulation.d.ts +6 -0
  151. package/models/server/middleware/resolveStartup.d.ts +13 -0
  152. package/models/server/util/displayStartupConfiguration.d.ts +2 -0
  153. package/models/server/util/staticPaths.d.ts +1 -0
  154. package/models/server/util/stringifyAttributes.d.ts +2 -0
  155. package/models/server/webApp.d.ts +9 -0
  156. package/models/testImmer/redux/reducer.d.ts +8 -0
  157. package/models/testImmer/redux/selectors.d.ts +3 -0
  158. package/models/user/components/Login.d.ts +2 -0
  159. package/models/user/components/LoginForm.d.ts +16 -0
  160. package/models/user/components/LogoutForm.d.ts +12 -0
  161. package/models/user/components.styled/Login.styled.d.ts +2 -0
  162. package/models/user/components.styled/LoginForm.styled.d.ts +2 -0
  163. package/models/user/containers/ChangePassword.container.d.ts +2 -0
  164. package/models/user/containers/ForgotPassword.container.d.ts +2 -0
  165. package/models/user/containers/Login.container.d.ts +2 -0
  166. package/models/user/containers/Registration.container.d.ts +2 -0
  167. package/models/user/hocs/withLogin.d.ts +2 -0
  168. package/models/user/hocs/withRegistration.d.ts +2 -0
  169. package/models/user/hooks/useChangePassword.d.ts +9 -0
  170. package/models/user/hooks/useForgotPassword.d.ts +14 -0
  171. package/models/user/hooks/useLogin.d.ts +12 -0
  172. package/models/user/hooks/useRegistration.d.ts +8 -0
  173. package/models/user/index.d.ts +16 -0
  174. package/models/user/redux/actions.d.ts +6 -0
  175. package/models/user/redux/reducers.d.ts +4 -0
  176. package/models/user/redux/sagas/index.d.ts +1 -0
  177. package/models/user/redux/sagas/login.d.ts +36 -0
  178. package/models/user/redux/sagas/register.d.ts +1 -0
  179. package/models/user/redux/sagas/resetPassword.d.ts +1 -0
  180. package/models/user/redux/selectors.d.ts +27 -0
  181. package/models/user/redux/types.d.ts +21 -0
  182. package/models/user/transformations/mapClientCredentials.d.ts +2 -0
  183. package/models/user/util/ContensisManagementApi.d.ts +9 -0
  184. package/models/user/util/CookieHelper.class.d.ts +5 -0
  185. package/models/user/util/LoginHelper.class.d.ts +52 -0
  186. package/models/user/util/OidcUserManager.d.ts +18 -0
  187. package/models/user/util/matchGroups.d.ts +3 -0
  188. package/models/user/util/userHelper.d.ts +12 -0
  189. package/models/util/ContensisDeliveryApi.d.ts +40 -0
  190. package/models/util/ToJs.d.ts +1 -0
  191. package/models/util/fromJSLeaveImmer.d.ts +2 -0
  192. package/models/util/fromJSOrdered.d.ts +2 -0
  193. package/models/util/index.d.ts +5 -0
  194. package/models/util/json-mapper.d.ts +81 -0
  195. package/models/util/navHelper.d.ts +7 -0
  196. package/models/util/navigation.d.ts +4 -0
  197. package/models/util/performance.d.ts +1 -0
  198. package/models/util/pickProject.d.ts +2 -0
  199. package/models/util/schema.d.ts +25 -0
  200. package/models/util/stringifyStrings.d.ts +2 -0
  201. package/models/util/urls.d.ts +9 -0
  202. package/package-lock.json +7920 -7722
  203. package/package.json +17 -11
  204. package/cjs/App-2334f3e0.js.map +0 -1
  205. package/cjs/RouteLoader-5c44f039.js.map +0 -1
  206. package/cjs/ToJs-ca9bea03.js.map +0 -1
  207. package/cjs/actions-e22726ed.js.map +0 -1
  208. package/cjs/login-6eb5e46d.js.map +0 -1
  209. package/cjs/reducers-c42035ab.js +0 -120
  210. package/cjs/reducers-c42035ab.js.map +0 -1
  211. package/cjs/selectors-69c3d37c.js.map +0 -1
  212. package/cjs/version-d8f5b436.js.map +0 -1
  213. package/esm/App-b2b80182.js.map +0 -1
  214. package/esm/RouteLoader-2cfdfc5c.js.map +0 -1
  215. package/esm/ToJs-19a3244a.js.map +0 -1
  216. package/esm/actions-fda5e103.js.map +0 -1
  217. package/esm/login-866fe64c.js.map +0 -1
  218. package/esm/reducers-b426d14a.js +0 -108
  219. package/esm/reducers-b426d14a.js.map +0 -1
  220. package/esm/selectors-170581d2.js.map +0 -1
  221. package/esm/version-8d757fb4.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,64 @@
1
+ #### 2.5.0 (2021-09-20)
2
+
3
+ ##### New Features
4
+
5
+ - Removed useUser hook and created hooks for change password, forgot password (c65d6dd7)
6
+ - add entryMapper to /util utility function to clean up code when mapping route entries with jsonpath-mapper style templates and default arguments (3b6132d9)
7
+
8
+ ##### Bug Fixes
9
+
10
+ - Error messages not displaying on the various password forms when operations fail (341bc827)
11
+ - issue with a default value set in typescript refactor (822da5c9)
12
+ - added two missing routing selectors (2ddc26e6)
13
+ - server side debugging requires an old version of babel-plugin to define the set globals in the app (09566a99)
14
+ - changes in latest immutable js typings break existing selectors by changing their return value from any to unknown, update search package to fix bug with ToJS component. Use typescript eslint import resolver (9da62533)
15
+ - update search package to set projectId in listings (098ea40f)
16
+ - small issue with SSR and dynamic bundles need to filter out some undefined array items from the loadable modules (c9fa233f)
17
+
18
+ ##### Build System / Dependencies
19
+
20
+ - install latest search package and uninstall unused packages (81f1c1eb)
21
+ - update search package to add missing types, add rules-of-hooks back to eslintrc, correct staticRoute type in OnRouteLoadArgs (c7d1a9ce)
22
+ - add follow-tags to git push in release script so we caputure the tag created by npm version command (7030a4fd)
23
+ - adding further types to app config (d5da430c)
24
+ - add types to AppConfig keys (2c0d3447)
25
+ - search index.d.ts is not being copied in CI (0f6b7137)
26
+ - copy typescript models for search package as existing d.ts files are ignored by tsc (5f1ce21f)
27
+ - add missing @types packages (0f54a201)
28
+ - update search package to fix build (5223e118)
29
+ - update package-lock to fix build (a2f40c58)
30
+ - fix no default export in /client (9e10dc24)
31
+ - most models not published to npm (1b2eea17)
32
+ - try remove now redundant build stage (87d68755)
33
+ - handle all exports via index file, use ts-patch to be able to use tsconfig plugins to transform alias paths in d.ts files to usable paths for consumers (7fd52af6)
34
+ - update packages (dcc3cbd4)
35
+ - change npm script in CI to clean assets and build models with tsc (32c61de8)
36
+ - further TypeScript work (e91452d8)
37
+ - TypeScript with rollup and babel initial commit (2c737ed9)##### Other Changes
38
+
39
+ ##### Performance Improvements
40
+
41
+ - remove excess code from bundles (03773ece)
42
+ - update zengenti packages (f654d22a)
43
+
44
+ ##### Refactors
45
+
46
+ - further typescript conversions (9c88cd52)
47
+ - further typescript conversions (d7010813)
48
+ - typescript conversion progress, all models exported through default package, convert client entrypoint and types for routes and routing events (2a15b4c6)
49
+ - typescript conversion progress, types added for globals and server start config (12e17c53)
50
+
51
+ ##### Documentation Changes
52
+
53
+ - add TypeScript notes to README (0a8bcabd)
54
+ - tweak package description text (4f713d5a)
55
+ - update CHANGELOG (b8b1b488)
56
+
57
+ #### Other changes
58
+
59
+ - zengenti/contensis-react-base into dom-auth-changes-merge (7d6e7ed9)
60
+ - //github.com/zengenti/contensis-react-base into contensis-14-forgot-change-password (c6775cf1)
61
+
1
62
  #### 2.4.0 (2021-08-19)
2
63
 
3
64
  ##### Build System / Dependencies
package/README.md CHANGED
@@ -46,6 +46,8 @@ Default export `ZengentiAppServer` which has a `.start()` function attached for
46
46
 
47
47
  Named export `{ ReactApp }` provides a ready-made instance of a root `<App>` component to provide as the first argument to `ZengentiAppServer.start()`
48
48
 
49
+ All TypeScript models are exported from here and should be imported in your app from the default package `@zengenti/contensis-react-base`
50
+
49
51
  ### /client
50
52
 
51
53
  Default export `ClientApp` which is a class when instantiated with `new ClientApp` accepts two constructor arguments similar to `ZengentiAppServer.start()` except for use when loading the application via the client-side entrypoint
@@ -79,6 +81,20 @@ Some simple utility functions to save repetion of common functions in our app co
79
81
  - mapping functions when working with certain Contensis api results or data types
80
82
  - a copy of `ZenInfo` page to show certain build and expose configuration parameters. Something we usually include with every deployed site and served at `/zenInfo` route.
81
83
 
84
+ ### Using imports in your app
85
+
86
+ You should not import files from any other place than the packages / subpackages mentioned in this README. e.g. using imports like `@zengenti/contensis-react-base/cjs/client` or `@zengenti/contensis-react-base/models/*` is not recommended as it will not provide you with the best build output and they could change in future and would not be reflected in the semantic versioning having the potential to cause problems in future.
87
+
88
+ Sometimes VSCode may import the reference automatically from an unsupported place. You should check when committing your code that all imports are referenced correctly.
89
+
90
+ ## TypeScript support
91
+
92
+ As of v2.5.0 TypeScript declarations are available to use, and will also benefit applications written in JavaScript
93
+
94
+ All models are exported with the default package `@zengenti/contensis-react-base`
95
+
96
+ When importing Types to use in your own TypeScript project, try to always use the root import path e.g. `import { ModelName } from '@zengenti/contensis-react-base';`
97
+
82
98
  ## Key scripts to build from source 🚦 📃
83
99
 
84
100
  - `npm install` - install dependencies so we can get started
@@ -92,6 +108,67 @@ https://www.conventionalcommits.org/en/v1.0.0/#summary
92
108
 
93
109
  # Changelog
94
110
 
111
+ #### 2.5.0 (2021-09-20)
112
+
113
+ ##### New Features
114
+
115
+ - Removed useUser hook and created hooks for change password, forgot password (c65d6dd7)
116
+ - add entryMapper to /util utility function to clean up code when mapping route entries with jsonpath-mapper style templates and default arguments (3b6132d9)
117
+
118
+ ##### Bug Fixes
119
+
120
+ - Error messages not displaying on the various password forms when operations fail (341bc827)
121
+ - issue with a default value set in typescript refactor (822da5c9)
122
+ - added two missing routing selectors (2ddc26e6)
123
+ - server side debugging requires an old version of babel-plugin to define the set globals in the app (09566a99)
124
+ - changes in latest immutable js typings break existing selectors by changing their return value from any to unknown, update search package to fix bug with ToJS component. Use typescript eslint import resolver (9da62533)
125
+ - update search package to set projectId in listings (098ea40f)
126
+ - small issue with SSR and dynamic bundles need to filter out some undefined array items from the loadable modules (c9fa233f)
127
+
128
+ ##### Build System / Dependencies
129
+
130
+ - install latest search package and uninstall unused packages (81f1c1eb)
131
+ - update search package to add missing types, add rules-of-hooks back to eslintrc, correct staticRoute type in OnRouteLoadArgs (c7d1a9ce)
132
+ - add follow-tags to git push in release script so we caputure the tag created by npm version command (7030a4fd)
133
+ - adding further types to app config (d5da430c)
134
+ - add types to AppConfig keys (2c0d3447)
135
+ - search index.d.ts is not being copied in CI (0f6b7137)
136
+ - copy typescript models for search package as existing d.ts files are ignored by tsc (5f1ce21f)
137
+ - add missing @types packages (0f54a201)
138
+ - update search package to fix build (5223e118)
139
+ - update package-lock to fix build (a2f40c58)
140
+ - fix no default export in /client (9e10dc24)
141
+ - most models not published to npm (1b2eea17)
142
+ - try remove now redundant build stage (87d68755)
143
+ - handle all exports via index file, use ts-patch to be able to use tsconfig plugins to transform alias paths in d.ts files to usable paths for consumers (7fd52af6)
144
+ - update packages (dcc3cbd4)
145
+ - change npm script in CI to clean assets and build models with tsc (32c61de8)
146
+ - further TypeScript work (e91452d8)
147
+ - TypeScript with rollup and babel initial commit (2c737ed9)##### Other Changes
148
+
149
+ ##### Performance Improvements
150
+
151
+ - remove excess code from bundles (03773ece)
152
+ - update zengenti packages (f654d22a)
153
+
154
+ ##### Refactors
155
+
156
+ - further typescript conversions (9c88cd52)
157
+ - further typescript conversions (d7010813)
158
+ - typescript conversion progress, all models exported through default package, convert client entrypoint and types for routes and routing events (2a15b4c6)
159
+ - typescript conversion progress, types added for globals and server start config (12e17c53)
160
+
161
+ ##### Documentation Changes
162
+
163
+ - add TypeScript notes to README (0a8bcabd)
164
+ - tweak package description text (4f713d5a)
165
+ - update CHANGELOG (b8b1b488)
166
+
167
+ #### Other changes
168
+
169
+ - zengenti/contensis-react-base into dom-auth-changes-merge (7d6e7ed9)
170
+ - //github.com/zengenti/contensis-react-base into contensis-14-forgot-change-password (c6775cf1)
171
+
95
172
  #### 2.4.0 (2021-08-19)
96
173
 
97
174
  ##### Build System / Dependencies
@@ -7,20 +7,21 @@ require('redux-immutable');
7
7
  require('redux-thunk');
8
8
  require('redux-saga');
9
9
  require('redux-injectors');
10
- var version = require('./version-d8f5b436.js');
11
- var actions = require('./actions-e22726ed.js');
12
- var reducers = require('./reducers-c42035ab.js');
10
+ var version = require('./version-3a808c12.js');
11
+ var actions = require('./actions-e9f69947.js');
12
+ var reducers = require('./reducers-cb531715.js');
13
13
  var history$1 = require('history');
14
14
  var effects = require('@redux-saga/core/effects');
15
15
  var contensisDeliveryApi = require('contensis-delivery-api');
16
16
  var version$1 = require('./version-2193b4a2.js');
17
17
  require('query-string');
18
- var selectors = require('./selectors-69c3d37c.js');
18
+ var selectors = require('./selectors-1295124a.js');
19
19
  var log = require('loglevel');
20
- var login = require('./login-6eb5e46d.js');
20
+ var ToJs = require('./ToJs-d72e5b10.js');
21
+ var login = require('./login-4f274c6a.js');
21
22
  var awaitToJs = require('await-to-js');
22
23
  require('react-hot-loader');
23
- var RouteLoader = require('./RouteLoader-5c44f039.js');
24
+ var RouteLoader = require('./RouteLoader-f67bbf9e.js');
24
25
 
25
26
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
26
27
 
@@ -786,7 +787,211 @@ function* redirectSaga() {
786
787
  if (redirectUri) yield effects.put(actions.setRoute(redirectUri));
787
788
  }
788
789
 
789
- const userSagas = [...login.loginSagas, ...registerSagas];
790
+ const PAP_URL = 'https://pap.zengenti.com';
791
+ const USER_ENVS_URI = 'my-environments';
792
+ const USER_RESEND_VERIFICATION_URI = 'account/verify/resend';
793
+ const USER_REQUEST_PASSWORD_RESET_URI = 'account/reset';
794
+ const USER_RESET_PASSWORD_URI = 'account/reset/password';
795
+ const USER_ENVS_URL = `${PAP_URL}/${USER_ENVS_URI}`;
796
+ const BASE_OPTIONS = {
797
+ method: 'GET',
798
+ headers: {
799
+ 'Content-Type': 'application/json'
800
+ }
801
+ };
802
+ class UserHelper {
803
+ static async GetUsersEnvironments(securityToken) {
804
+ const options = { ...BASE_OPTIONS,
805
+ headers: {
806
+ 'x-security-token': securityToken
807
+ }
808
+ };
809
+ return await UserHelper.get(USER_ENVS_URL, options);
810
+ }
811
+
812
+ static async ResendUserVerification(userEmail) {
813
+ const options = { ...BASE_OPTIONS
814
+ };
815
+ return await UserHelper.get(`/${USER_RESEND_VERIFICATION_URI}?user=${userEmail}`, options);
816
+ }
817
+
818
+ static async RequestPasswordReset(userEmailObject) {
819
+ const options = { ...BASE_OPTIONS,
820
+ body: JSON.stringify(userEmailObject)
821
+ };
822
+ options.method = 'POST';
823
+ return await UserHelper.get(`/${USER_REQUEST_PASSWORD_RESET_URI}`, options);
824
+ }
825
+
826
+ static async ResetPassword(resetPasswordObject) {
827
+ const options = { ...BASE_OPTIONS,
828
+ body: JSON.stringify(resetPasswordObject)
829
+ };
830
+ options.method = 'POST';
831
+ return await UserHelper.get(`/${USER_RESET_PASSWORD_URI}`, options);
832
+ }
833
+
834
+ static async get(url, options = BASE_OPTIONS) {
835
+ try {
836
+ const responseBody = await api(url, options);
837
+ return responseBody;
838
+ } catch (err) {
839
+ return {
840
+ error: {
841
+ message: err.message
842
+ }
843
+ };
844
+ }
845
+ }
846
+
847
+ }
848
+
849
+ async function api(url, options) {
850
+ return fetch(url, options).then(async response => {
851
+ return response.json().then(data => data);
852
+ }).catch(error => {
853
+ throw error;
854
+ });
855
+ }
856
+
857
+ const resetPasswordSagas = [effects.takeEvery(reducers.REQUEST_USER_PASSWORD_RESET, requestPasswordResetSaga), effects.takeEvery(reducers.RESET_USER_PASSWORD, resetPasswordSaga), effects.takeEvery(reducers.CHANGE_USER_PASSWORD, changePasswordSaga)];
858
+
859
+ function* requestPasswordResetSaga(action) {
860
+ const userEmailObject = action.userEmailObject;
861
+ yield effects.put({
862
+ type: reducers.REQUEST_USER_PASSWORD_RESET_SENDING
863
+ });
864
+
865
+ if (userEmailObject && userEmailObject.userEmail) {
866
+ try {
867
+ const passwordResetRequestResponse = yield UserHelper.RequestPasswordReset(userEmailObject);
868
+
869
+ if (passwordResetRequestResponse) {
870
+ if (!passwordResetRequestResponse.error) {
871
+ yield effects.put({
872
+ type: reducers.REQUEST_USER_PASSWORD_RESET_SUCCESS
873
+ });
874
+ } else {
875
+ yield effects.put({
876
+ type: reducers.REQUEST_USER_PASSWORD_RESET_ERROR,
877
+ error: passwordResetRequestResponse.error.message
878
+ });
879
+ }
880
+ } else {
881
+ yield effects.put({
882
+ type: reducers.REQUEST_USER_PASSWORD_RESET_ERROR,
883
+ error: 'No response from server'
884
+ });
885
+ }
886
+ } catch (error) {
887
+ yield effects.put({
888
+ type: reducers.REQUEST_USER_PASSWORD_RESET_ERROR,
889
+ error: error && error.toString()
890
+ });
891
+ }
892
+ } else {
893
+ yield effects.put({
894
+ type: reducers.REQUEST_USER_PASSWORD_RESET_ERROR,
895
+ error: 'Invalid object'
896
+ });
897
+ }
898
+ }
899
+
900
+ function* resetPasswordSaga(action) {
901
+ const resetPasswordObject = action.resetPasswordObject;
902
+ yield effects.put({
903
+ type: reducers.RESET_USER_PASSWORD_SENDING
904
+ });
905
+
906
+ if (resetPasswordObject.token && resetPasswordObject.password) {
907
+ try {
908
+ const resetPasswordResponse = yield UserHelper.ResetPassword(resetPasswordObject);
909
+
910
+ if (resetPasswordResponse) {
911
+ if (!resetPasswordResponse.error) {
912
+ yield effects.put({
913
+ type: reducers.RESET_USER_PASSWORD_SUCCESS
914
+ });
915
+ } else {
916
+ const error = resetPasswordResponse.error.data && resetPasswordResponse.error.data.length > 0 && resetPasswordResponse.error.data[0].message || resetPasswordResponse.error.message;
917
+ yield effects.put({
918
+ type: reducers.RESET_USER_PASSWORD_ERROR,
919
+ error
920
+ });
921
+ }
922
+ } else {
923
+ yield effects.put({
924
+ type: reducers.RESET_USER_PASSWORD_ERROR,
925
+ error: 'No response from server'
926
+ });
927
+ }
928
+ } catch (error) {
929
+ yield effects.put({
930
+ type: reducers.RESET_USER_PASSWORD_ERROR,
931
+ error: error && error.toString()
932
+ });
933
+ }
934
+ } else {
935
+ yield effects.put({
936
+ type: reducers.RESET_USER_PASSWORD_ERROR,
937
+ error: 'Invalid object'
938
+ });
939
+ }
940
+ } // userId
941
+ // existingPassword
942
+ // newPassword
943
+
944
+
945
+ function* changePasswordSaga(action) {
946
+ if (!action || !action.userId || !action.currentPassword || !action.newPassword) {
947
+ yield effects.put({
948
+ type: reducers.CHANGE_USER_PASSWORD_ERROR,
949
+ error: 'Invalid action object sent to changePassword saga'
950
+ });
951
+ return;
952
+ }
953
+
954
+ try {
955
+ const changePasswordObject = {
956
+ userId: action.userId,
957
+ existing: action.currentPassword,
958
+ new: action.newPassword
959
+ };
960
+ yield effects.put({
961
+ type: reducers.CHANGE_USER_PASSWORD_SENDING
962
+ });
963
+ const clientCredentials = (yield effects.select(ToJs.selectClientCredentials)).toJS();
964
+ const client = yield login.getManagementApiClient({ ...clientCredentials
965
+ });
966
+ const [err, res] = yield awaitToJs.to(client.security.users.updatePassword(changePasswordObject));
967
+
968
+ if (err) {
969
+ var _err$data, _err$data$data, _err$data2;
970
+
971
+ const error = (err === null || err === void 0 ? void 0 : (_err$data = err.data) === null || _err$data === void 0 ? void 0 : (_err$data$data = _err$data.data) === null || _err$data$data === void 0 ? void 0 : _err$data$data.length) > 0 && err.data.data[0].message || (err === null || err === void 0 ? void 0 : (_err$data2 = err.data) === null || _err$data2 === void 0 ? void 0 : _err$data2.message);
972
+ yield effects.put({
973
+ type: reducers.CHANGE_USER_PASSWORD_ERROR,
974
+ error
975
+ });
976
+ return;
977
+ } // // eslint-disable-next-line no-console
978
+ // console.log(changePasswordObject);
979
+ // // eslint-disable-next-line no-console
980
+ // console.log(userCredentialsObject);
981
+
982
+
983
+ yield effects.put({
984
+ type: reducers.CHANGE_USER_PASSWORD_SUCCESS
985
+ });
986
+ } catch (error) {
987
+ yield effects.put({
988
+ type: reducers.CHANGE_USER_PASSWORD_ERROR,
989
+ error: error && error.toString()
990
+ });
991
+ }
992
+ }
993
+
994
+ const userSagas = [...login.loginSagas, ...registerSagas, ...resetPasswordSagas];
790
995
 
791
996
  // index.js
792
997
  function rootSaga (featureSagas = []) {
@@ -849,4 +1054,4 @@ exports.deliveryApi = deliveryApi;
849
1054
  exports.history = history;
850
1055
  exports.pickProject = pickProject;
851
1056
  exports.rootSaga = rootSaga;
852
- //# sourceMappingURL=App-2334f3e0.js.map
1057
+ //# sourceMappingURL=App-79703372.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App-79703372.js","sources":["../src/redux/store/history.js","../src/util/ContensisDeliveryApi.js","../src/redux/sagas/navigation.js","../src/util/schema.ts","../src/routing/util/expressions.ts","../src/routing/util/queries.ts","../src/routing/redux/sagas.js","../src/user/redux/sagas/register.js","../src/user/util/userHelper.js","../src/user/redux/sagas/resetPassword.js","../src/user/redux/sagas/index.js","../src/redux/sagas/index.js","../src/util/pickProject.js","../src/app/App.tsx"],"sourcesContent":["import { createBrowserHistory, createMemoryHistory } from 'history';\n\n// Create a history depending on the environment\nconst selectedHistory =\n typeof window !== 'undefined' ? createBrowserHistory : createMemoryHistory;\n\nexport const history = (options = {}) => selectedHistory(options);\nexport const browserHistory = selectedHistory();\n","import { Client } from 'contensis-delivery-api';\nimport { setSurrogateKeys } from '../routing/redux/actions';\nimport { reduxStore } from '~/redux/store/store';\n\nconst storeSurrogateKeys = response => {\n const keys = response.headers.get\n ? response.headers.get('surrogate-key')\n : response.headers.map['surrogate-key'];\n if (keys) reduxStore.dispatch(setSurrogateKeys(keys));\n};\n\nconst getClientConfig = project => {\n let config = DELIVERY_API_CONFIG; /* global DELIVERY_API_CONFIG */\n config.responseHandler = {};\n\n if (project) {\n config.projectId = project;\n }\n\n // // we only want the surrogate key header in a server context\n if (typeof window === 'undefined') {\n config.defaultHeaders = {\n 'x-require-surrogate-key': true,\n };\n config.responseHandler[200] = storeSurrogateKeys;\n }\n\n if (\n typeof window !== 'undefined' &&\n PROXY_DELIVERY_API /* global PROXY_DELIVERY_API */\n ) {\n // ensure a relative url is used to bypass the need for CORS (separate OPTIONS calls)\n config.rootUrl = '';\n config.responseHandler[404] = () => null;\n }\n return config;\n};\n\nexport * from 'contensis-delivery-api';\n\nclass DeliveryApi {\n getClientSideVersionStatus = () => {\n if (typeof window != 'undefined') {\n const currentHostname = window.location.hostname;\n return this.getVersionStatusFromHostname(currentHostname);\n }\n return null;\n };\n getVersionStatusFromHostname = currentHostname => {\n if (currentHostname.indexOf('localhost') > -1) return 'latest';\n\n if (currentHostname.endsWith('contensis.cloud')) {\n if (currentHostname.indexOf('preview.') > -1) {\n return 'latest';\n } else {\n return 'published';\n }\n }\n\n if (currentHostname.endsWith('cloud.contensis.com')) {\n if (currentHostname.indexOf('preview-') > -1) {\n return 'latest';\n } else {\n return 'published';\n }\n }\n\n return 'published';\n };\n search = (query, linkDepth, project, env) => {\n const client = Client.create(getClientConfig(project, env));\n return client.entries.search(\n query,\n typeof linkDepth !== 'undefined' ? linkDepth : 1\n );\n };\n getClient = (deliveryApiStatus = 'published', project, env) => {\n const baseConfig = getClientConfig(project, env);\n baseConfig.versionStatus = deliveryApiStatus;\n return Client.create(baseConfig);\n };\n getEntry = (\n id,\n linkDepth = 0,\n deliveryApiStatus = 'published',\n project,\n env\n ) => {\n const baseConfig = getClientConfig(project, env);\n baseConfig.versionStatus = deliveryApiStatus;\n const client = Client.create(baseConfig);\n // return client.entries.get(id, linkDepth);\n return client.entries.get({ id, linkDepth });\n };\n}\n\nexport const deliveryApi = new DeliveryApi();\n\nclass CacheNode {\n constructor(key, value) {\n this.key = key;\n this.value = value;\n this.next = null;\n this.prev = null;\n }\n}\n\nclass LruCache {\n constructor(limit = 100) {\n this.map = {};\n this.head = null;\n this.tail = null;\n this.limit = limit || 100;\n this.size = 0;\n }\n\n get(key) {\n if (this.map[key]) {\n let value = this.map[key].value;\n let node = new CacheNode(key, value);\n this.remove(key);\n this.setHead(node);\n return value;\n }\n }\n\n set(key, value) {\n let node = new CacheNode(key, value);\n if (this.map[key]) {\n this.remove(key);\n } else {\n if (this.size >= this.limit) {\n delete this.map[this.tail.key];\n this.size--;\n this.tail = this.tail.prev;\n this.tail.next = null;\n }\n }\n this.setHead(node);\n }\n\n setHead(node) {\n node.next = this.head;\n node.prev = null;\n if (this.head) {\n this.head.prev = node;\n }\n this.head = node;\n if (!this.tail) {\n this.tail = node;\n }\n this.size++;\n this.map[node.key] = node;\n }\n\n remove(key) {\n let node = this.map[key];\n if (node.prev) {\n node.prev.next = node.next;\n } else {\n this.head = node.next;\n }\n if (node.next) {\n node.next.prev = node.prev;\n } else {\n this.tail = node.prev;\n }\n delete this.map[key];\n this.size--;\n }\n}\n\nclass CachedSearch {\n cache = new LruCache();\n taxonomyLookup = {};\n\n search(query, linkDepth, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(\n project + JSON.stringify(query) + linkDepth.toString(),\n () => client.entries.search(query, linkDepth)\n );\n }\n\n get(id, linkDepth, versionStatus, project, env) {\n const client = Client.create(getClientConfig(project, env));\n client.clientConfig.versionStatus = versionStatus;\n return this.request(id, () => client.entries.get({ id, linkDepth }));\n }\n\n getContentType(id, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(`[CONTENT TYPE] ${id} ${project}`, () =>\n client.contentTypes.get(id)\n );\n }\n\n getTaxonomyNode(key, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(`[TAXONOMY NODE] ${key}`, () =>\n client.taxonomy\n .resolveChildren(key)\n .then(node => this.extendTaxonomyNode(node))\n );\n }\n\n getRootNode(options, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(`${project} / ${JSON.stringify(options)}`, () =>\n client.nodes.getRoot(options)\n );\n }\n\n getNode(options, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(\n `${project} ${(options && options.path) || options} ${JSON.stringify(\n options\n )}`,\n () => client.nodes.get(options)\n );\n }\n\n getAncestors(options, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(\n `${project} [A] ${(options && options.id) || options} ${JSON.stringify(\n options\n )}`,\n () => client.nodes.getAncestors(options)\n );\n }\n\n getChildren(options, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(\n `${project} [C] ${(options && options.id) || options} ${JSON.stringify(\n options\n )}`,\n () => client.nodes.getChildren(options)\n );\n }\n\n getSiblings(options, project, env) {\n const client = Client.create(getClientConfig(project, env));\n return this.request(\n `${project} [S] ${(options && options.id) || options} ${JSON.stringify(\n options\n )}`,\n () => client.nodes.getSiblings(options)\n );\n }\n\n request(key, execute) {\n if (!this.cache.get(key) || typeof window == 'undefined') {\n let promise = execute();\n this.cache.set(key, promise);\n promise.catch(() => {\n this.cache.remove(key);\n });\n }\n return this.cache.get(key);\n }\n\n extendTaxonomyNode(node) {\n let id = this.getTaxonomyId(node);\n this.taxonomyLookup[id] = node.key;\n return {\n ...node,\n id,\n children: node.children\n ? node.children.map(n => this.extendTaxonomyNode(n))\n : null,\n };\n }\n\n getTaxonomyId(node) {\n if (node.key) {\n let parts = node.key.split('/');\n return parts[parts.length - 1];\n }\n return '';\n }\n\n getTaxonomyKey(id) {\n return this.taxonomyLookup[id];\n }\n}\n\nexport const cachedSearch = new CachedSearch();\n","import { takeEvery, put, select } from 'redux-saga/effects';\n\nimport { deliveryApi } from '~/util/ContensisDeliveryApi';\nimport {\n GET_NODE_TREE,\n SET_NODE_TREE,\n GET_NODE_TREE_ERROR,\n} from '~/redux/types/navigation';\nimport { hasNavigationTree } from '~/redux/selectors/navigation';\nimport { selectVersionStatus } from '~/redux/selectors/version';\nimport { selectCurrentProject } from '~/routing/redux/selectors';\n\nexport const navigationSagas = [takeEvery(GET_NODE_TREE, ensureNodeTreeSaga)];\n\nexport function* ensureNodeTreeSaga(action) {\n const state = yield select();\n try {\n if (!hasNavigationTree(state)) {\n const deliveryApiVersionStatus = yield select(selectVersionStatus);\n const project = yield select(selectCurrentProject);\n const nodes = yield deliveryApi\n .getClient(deliveryApiVersionStatus, project)\n .nodes.getRoot({\n depth: action.treeDepth || 0,\n });\n if (nodes) {\n yield put({ type: SET_NODE_TREE, nodes });\n } else {\n yield put({ type: GET_NODE_TREE_ERROR });\n }\n }\n } catch (ex) {\n yield put({ type: GET_NODE_TREE_ERROR, error: ex.toString() });\n }\n}\n","export const DataFormats = {\n entry: 'entry',\n webpage: 'webpage',\n};\n\nconst sys = {\n contentTypeId: 'sys.contentTypeId',\n dataFormat: 'sys.dataFormat',\n filename: 'sys.properties.filename',\n id: 'sys.id',\n includeInSearch: 'sys.metadata.includeInSearch',\n slug: 'sys.slug',\n uri: 'sys.uri',\n versionStatus: 'sys.versionStatus',\n};\n\nexport const Fields = {\n entryTitle: 'entryTitle',\n entryDescription: 'entryDescription',\n keywords: 'keywords',\n sys,\n contentTypeId: 'sys.contentTypeId',\n wildcard: '*',\n};\n\nexport const VersionStatus = {\n published: 'published',\n latest: 'latest',\n};\n","import { Op } from 'contensis-delivery-api';\nimport { Fields } from '~/util/schema';\n\nexport const fieldExpression = (\n field,\n value,\n operator = 'equalTo',\n weight = null\n) => {\n if (!field || !value) return [];\n if (Array.isArray(value)) return equalToOrIn(field, value, operator);\n else\n return !weight\n ? [Op[operator](field, value)]\n : [Op[operator](field, value).weight(weight)];\n};\n\nexport const defaultExpressions = versionStatus => {\n return [Op.equalTo(Fields.sys.versionStatus, versionStatus)];\n};\n\nconst equalToOrIn = (field, arr, operator = 'equalTo') =>\n arr.length === 0\n ? []\n : arr.length === 1\n ? [Op[operator](field, arr[0])]\n : [Op.in(field, ...arr)];\n","import { Query } from '~/util/ContensisDeliveryApi';\nimport { fieldExpression, defaultExpressions } from './expressions';\n\nexport const routeEntryByFieldsQuery = (\n id: string,\n language = 'en-GB',\n fields: string[] = [],\n versionStatus = 'published'\n) => {\n const query = new Query(\n ...[\n ...fieldExpression('sys.id', id),\n ...fieldExpression('sys.language', language),\n ...defaultExpressions(versionStatus),\n ]\n );\n query.fields = fields;\n return query;\n};\n","import * as log from 'loglevel';\nimport { takeEvery, put, select, call, all } from 'redux-saga/effects';\nimport { Map } from 'immutable';\n\nimport {\n SET_ENTRY,\n SET_ANCESTORS,\n SET_NAVIGATION_PATH,\n SET_ROUTE,\n SET_SIBLINGS,\n UPDATE_LOADING_STATE,\n} from './types';\nimport { GET_NODE_TREE } from '~/redux/types/navigation';\nimport {\n selectCurrentAncestors,\n selectCurrentNode,\n selectCurrentProject,\n selectMappedEntry,\n selectRouteEntry,\n selectRouteEntryEntryId,\n selectRouteEntryLanguage,\n} from './selectors';\nimport { hasNavigationTree } from '~/redux/selectors/navigation';\nimport { selectVersionStatus } from '~/redux/selectors/version';\nimport { ensureNodeTreeSaga } from '~/redux/sagas/navigation';\nimport { handleRequiresLoginSaga } from '~/user/redux/sagas/login';\n\nimport { findContentTypeMapping } from '../util/find-contenttype-mapping';\nimport { routeEntryByFieldsQuery } from '../util/queries';\nimport { cachedSearch, deliveryApi } from '~/util/ContensisDeliveryApi';\nimport { injectRedux as reduxInjector } from '~/redux/store/injectors';\n\nexport const routingSagas = [\n takeEvery(SET_NAVIGATION_PATH, getRouteSaga),\n takeEvery(SET_ROUTE, setRouteSaga),\n];\n\n/**\n * To navigate / push a specific route via redux middleware\n * @param {path, state} action\n */\nfunction* setRouteSaga(action) {\n yield put({\n type: 'CALL_HISTORY_METHOD',\n payload: {\n method: 'push',\n args: [action.path, action.state],\n },\n });\n}\n\nfunction* getRouteSaga(action) {\n let entry = null;\n try {\n const {\n withEvents,\n routes: { ContentTypeMappings = {} } = {},\n staticRoute,\n } = action;\n\n // Inject redux { key, reducer, saga } provided by staticRoute\n if (staticRoute && staticRoute.route.injectRedux)\n yield call(reduxInjectorSaga, staticRoute.route.injectRedux);\n\n // Variables we will pass to setRouteEntry\n let pathNode = null,\n ancestors = null,\n siblings = null;\n\n // These variables are the return values from\n // calls to withEvents.onRouteLoad and onRouteLoaded\n let appsays,\n requireLogin = false;\n\n if (withEvents && withEvents.onRouteLoad) {\n appsays = yield withEvents.onRouteLoad(action);\n }\n // if appsays customNavigation: true, we will set doNavigation to false\n // if appsays customNavigation: { ... }, we will set doNavigation to the customNavigation object and check for child elements\n // if appsays nothing we will set doNavigation to true and continue to do navigation calls\n const doNavigation =\n !appsays ||\n (appsays && appsays.customNavigation === true\n ? false\n : (appsays && appsays.customNavigation) || true);\n\n const entryLinkDepth = (appsays && appsays.entryLinkDepth) || 3;\n const setContentTypeLimits = !!ContentTypeMappings.find(\n ct => ct.fields || ct.linkDepth || ct.nodeOptions\n );\n\n const state = yield select();\n const routeEntry = selectRouteEntry(state);\n const routeNode = selectCurrentNode(state);\n const currentPath = action.path; //selectCurrentPath(state);\n const deliveryApiStatus = selectVersionStatus(state);\n const project = selectCurrentProject(state);\n const isHome = currentPath === '/';\n const isPreview = currentPath && currentPath.startsWith('/preview/');\n const defaultLang = (appsays && appsays.defaultLang) || 'en-GB';\n\n if (\n !isPreview &&\n ((appsays && appsays.customRouting) ||\n (staticRoute && !staticRoute.route.fetchNode) ||\n (routeEntry &&\n action.statePath === action.path &&\n (appsays && appsays.refetchNode) !== true))\n ) {\n // To prevent erroneous 404s and wasted network calls, this covers\n // - appsays customRouting and does SET_ENTRY etc. via the consuming app\n // - all staticRoutes (where custom 'route.fetchNode' attribute is falsey)\n // - standard Contensis SiteView Routing where we already have that entry in state\n if (\n routeEntry &&\n (!staticRoute || (staticRoute.route && staticRoute.route.fetchNode))\n ) {\n pathNode = routeNode.toJS();\n pathNode.entry = entry = routeEntry.toJS();\n //Do nothing, the entry is allready the right one.\n // yield put({\n // type: SET_ENTRY,\n // entry,\n // node: routeNode,\n // isLoading: false,\n // });\n yield put({\n type: UPDATE_LOADING_STATE,\n isLoading: false,\n });\n } else\n yield call(\n setRouteEntry,\n routeEntry && routeEntry.toJS(),\n yield select(selectCurrentNode),\n yield select(selectCurrentAncestors)\n );\n } else {\n // Handle homepage\n if (isHome) {\n pathNode = yield cachedSearch.getRootNode(\n {\n depth: 0,\n entryFields: '*',\n entryLinkDepth,\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n },\n project\n );\n ({ entry } = pathNode || {});\n } else {\n // Handle preview routes\n if (isPreview) {\n let splitPath = currentPath.split('/');\n let entryGuid = splitPath[2];\n let language = defaultLang;\n if (splitPath.length >= 3) {\n //set lang key if available in the path, else use default lang\n //assumes preview url on content type is: http://preview.ALIAS.contensis.cloud/preview/{GUID}/{LANG}\n if (splitPath.length == 4) language = splitPath[3];\n // According to product dev we cannot use Node API\n // for previewing entries as it gives a response of []\n // -- apparently it is not correct to request latest content\n // with Node API\n\n let previewEntry = yield deliveryApi\n .getClient(deliveryApiStatus, project)\n .entries.get({\n id: entryGuid,\n language,\n linkDepth: entryLinkDepth,\n });\n if (previewEntry) {\n pathNode = { entry: previewEntry };\n ({ entry } = pathNode || {});\n }\n }\n } else {\n // Handle all other routes\n const childrenDepth =\n doNavigation === true || doNavigation.children === true\n ? 1\n : (doNavigation && doNavigation.children) || 0;\n pathNode = yield cachedSearch.getNode(\n {\n depth: childrenDepth,\n path: currentPath,\n entryFields: setContentTypeLimits\n ? ['sys.contentTypeId', 'sys.id']\n : '*',\n entryLinkDepth: setContentTypeLimits ? 0 : entryLinkDepth,\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n },\n project\n );\n ({ entry } = pathNode || {});\n\n if (\n setContentTypeLimits &&\n pathNode &&\n pathNode.entry &&\n pathNode.entry.sys &&\n pathNode.entry.sys.id\n ) {\n // Get fields[] and linkDepth from ContentTypeMapping to get the entry data\n // at a specified depth with specified fields\n const {\n fields,\n linkDepth,\n nodeOptions = {},\n } = findContentTypeMapping(\n ContentTypeMappings,\n pathNode.entry.sys.contentTypeId\n ) || {};\n const query = routeEntryByFieldsQuery(\n pathNode.entry.sys.id,\n pathNode.entry.sys.language,\n fields,\n deliveryApiStatus\n );\n const payload = yield cachedSearch.search(\n query,\n linkDepth || entryLinkDepth || 0,\n project\n );\n if (payload && payload.items && payload.items.length > 0) {\n pathNode.entry = entry = payload.items[0];\n }\n\n if (childrenDepth > 0 || nodeOptions.children) {\n const childrenOptions = nodeOptions.children || {};\n // We need to make a separate call for child nodes if the first node query has been\n // limited by linkDepth or fields[]\n const childNodes = yield cachedSearch.getChildren({\n id: pathNode.id,\n entryFields: childrenOptions.fields || fields || '*',\n entryLinkDepth:\n childrenOptions.linkDepth || linkDepth || entryLinkDepth || 0,\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n });\n if (childNodes) {\n pathNode.children = childNodes;\n }\n }\n }\n }\n\n if (pathNode && pathNode.id) {\n if (doNavigation === true || doNavigation.ancestors) {\n try {\n ancestors = yield cachedSearch.getAncestors(\n {\n id: pathNode.id,\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n },\n project\n );\n } catch (ex) {\n log.info('Problem fetching ancestors', ex);\n }\n }\n\n if (doNavigation === true || doNavigation.siblings) {\n try {\n siblings = yield cachedSearch.getSiblings(\n {\n id: pathNode.id,\n language: defaultLang,\n versionStatus: deliveryApiStatus,\n },\n project\n );\n } catch (ex) {\n log.info('Problem fetching siblings', ex);\n }\n }\n }\n }\n }\n\n const contentTypeMapping =\n findContentTypeMapping(\n ContentTypeMappings,\n pathNode?.entry?.sys?.contentTypeId\n ) || {};\n\n // Inject redux { key, reducer, saga } provided by ContentTypeMapping\n if (contentTypeMapping.injectRedux)\n yield call(reduxInjectorSaga, contentTypeMapping.injectRedux);\n\n if (withEvents && withEvents.onRouteLoaded) {\n // Check if the app has provided a requireLogin boolean flag or groups array\n // in addition to checking if requireLogin is set in the route definition\n ({ requireLogin } =\n (yield withEvents.onRouteLoaded({ ...action, entry })) || {});\n }\n\n if (requireLogin !== false) {\n // Do not call the login feature saga if requireLogin is false\n yield call(handleRequiresLoginSaga, {\n ...action,\n entry,\n requireLogin,\n });\n }\n\n if (\n pathNode &&\n pathNode.entry &&\n pathNode.entry.sys &&\n pathNode.entry.sys.id\n ) {\n entry = pathNode.entry;\n const { entryMapper } = contentTypeMapping;\n\n yield call(\n setRouteEntry,\n entry,\n pathNode,\n ancestors,\n siblings,\n entryMapper,\n false,\n appsays && appsays.refetchNode\n );\n } else {\n if (pathNode)\n yield call(setRouteEntry, null, pathNode, ancestors, siblings);\n else if (!staticRoute) yield call(do404);\n }\n if (!appsays || !appsays.preventScrollTop) {\n // Scroll into View\n if (typeof window !== 'undefined') {\n window.scroll({\n top: 0,\n });\n }\n }\n\n if (\n !hasNavigationTree(state) &&\n (doNavigation === true || doNavigation.tree)\n )\n if (typeof window !== 'undefined') {\n yield put({\n type: GET_NODE_TREE,\n treeDepth:\n doNavigation === true ||\n !doNavigation.tree ||\n doNavigation.tree === true\n ? 2\n : doNavigation.tree,\n });\n } else {\n yield call(ensureNodeTreeSaga);\n }\n } catch (e) {\n log.error(...['Error running route saga:', e, e.stack]);\n yield call(do500, e);\n }\n}\n\nfunction* setRouteEntry(\n entry,\n node,\n ancestors,\n siblings,\n entryMapper,\n notFound = false,\n remapEntry = false\n) {\n const entrySys = (entry && entry.sys) || {};\n\n const currentEntryId = yield select(selectRouteEntryEntryId);\n const currentEntryLang = yield select(selectRouteEntryLanguage);\n const mappedEntry =\n currentEntryId === entrySys.id &&\n currentEntryLang === entrySys.language &&\n remapEntry === false\n ? ((yield select(selectMappedEntry)) || Map()).toJS()\n : yield mapRouteEntry(entryMapper, {\n ...node,\n entry,\n ancestors,\n siblings,\n });\n\n yield all([\n put({\n type: SET_ENTRY,\n id: entrySys.id,\n entry,\n mappedEntry,\n node,\n notFound,\n }),\n ancestors &&\n put({\n type: SET_ANCESTORS,\n ancestors,\n }),\n siblings &&\n put({\n type: SET_SIBLINGS,\n siblings,\n }),\n ]);\n}\n\nfunction* mapRouteEntry(entryMapper, node) {\n try {\n if (typeof entryMapper === 'function') {\n const state = yield select();\n const mappedEntry = yield call(entryMapper, node, state);\n return mappedEntry;\n }\n } catch (e) {\n log.error(...['Error running entryMapper:', e, e.stack]);\n }\n return;\n}\n\nfunction* do404() {\n yield call(clientReloadHitServer);\n yield put({\n type: SET_ENTRY,\n id: null,\n entry: null,\n notFound: true,\n });\n}\n\nfunction* clientReloadHitServer() {\n const stateEntry = yield select(selectRouteEntry);\n\n // If in client and there is a stateEntry.sys field reload the page,\n // on the 2nd load stateEntry.sys should be null at this point,\n // we do not wish to reload again and get stuck in an infinite reloading loop\n if (\n typeof window !== 'undefined' &&\n stateEntry &&\n stateEntry.get('sys', null)\n ) {\n window.location.reload();\n }\n}\n\nfunction* do500(error) {\n yield put({\n type: SET_ENTRY,\n id: null,\n entry: null,\n notFound: true,\n isError: true,\n error,\n statusCode: error && error.status ? error.status : 500,\n });\n}\n\nfunction* reduxInjectorSaga(injectorFn) {\n if (typeof injectorFn === 'function') {\n const { key, reducer, saga } = yield injectorFn();\n reduxInjector({ key, reducer, saga });\n }\n}\n","import { to } from 'await-to-js';\nimport { put, select, takeEvery } from 'redux-saga/effects';\nimport { setRoute } from '~/routing/redux/actions';\nimport { selectCurrentSearch } from '~/routing/redux/selectors';\nimport { queryParams } from '~/util/navigation';\nimport {\n REGISTER_USER,\n REGISTER_USER_SUCCESS,\n REGISTER_USER_FAILED,\n} from '../types';\n\nexport const registerSagas = [\n takeEvery(REGISTER_USER, registerSaga),\n takeEvery(REGISTER_USER_SUCCESS, redirectSaga),\n];\n\nfunction* registerSaga({ user, mappers }) {\n let requestBody = user;\n // Allow use of request mapper to take a user object\n // of any format and return the payload for the api request\n if (mappers && mappers.request && typeof mappers.request === 'function') {\n requestBody = yield mappers.request(user);\n }\n\n // Make POST call to register API\n const response = yield fetch('/account/register', {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(requestBody),\n });\n\n if (response.ok) {\n let mappedResponse;\n const [, responseBody] = yield to(response.json());\n if (responseBody) {\n // Allow use of response mapper to convert the successful user object\n // from the api response body into a user object of any format\n if (\n mappers &&\n mappers.response &&\n typeof mappers.response === 'function'\n ) {\n mappedResponse = yield mappers.response(responseBody);\n }\n // Update user object with mappedResponse or responseBody\n yield put({\n type: REGISTER_USER_SUCCESS,\n user: mappedResponse || responseBody,\n });\n } else {\n // OK response but unable to parse the response body\n yield put({\n type: REGISTER_USER_FAILED,\n error: {\n message:\n 'Unable to parse the created user from the register service response',\n },\n });\n }\n } else {\n // Not OK responses, these can be due to service availability\n // or status codes echoed from the responses received from\n // management api when registering the user\n const [, errorResponse] = yield to(response.json());\n const error = (errorResponse && errorResponse.error) || errorResponse || {};\n // Get something meaningful from the response if there is no message in the body\n if (!error.message) {\n error.message = `Registration service: ${response.statusText}`;\n error.status = response.status;\n }\n yield put({\n type: REGISTER_USER_FAILED,\n error,\n });\n }\n}\n\nfunction* redirectSaga() {\n // Check if querystring contains a redirect_uri\n const currentQs = queryParams(yield select(selectCurrentSearch));\n const redirectUri = currentQs.redirect_uri || currentQs.redirect;\n\n // We must use redux based navigation to preserve the registration state\n if (redirectUri) yield put(setRoute(redirectUri));\n}\n","const PAP_URL = 'https://pap.zengenti.com';\n\nconst USER_ENVS_URI = 'my-environments';\nconst USER_RESEND_VERIFICATION_URI = 'account/verify/resend';\nconst USER_REQUEST_PASSWORD_RESET_URI = 'account/reset';\nconst USER_RESET_PASSWORD_URI = 'account/reset/password';\n\nconst USER_ENVS_URL = `${PAP_URL}/${USER_ENVS_URI}`;\n\nconst BASE_OPTIONS = {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' },\n};\n\nexport class UserHelper {\n static async GetUsersEnvironments(securityToken) {\n const options = {\n ...BASE_OPTIONS,\n headers: {\n 'x-security-token': securityToken,\n },\n };\n return await UserHelper.get(USER_ENVS_URL, options);\n }\n static async ResendUserVerification(userEmail) {\n const options = {\n ...BASE_OPTIONS,\n };\n return await UserHelper.get(\n `/${USER_RESEND_VERIFICATION_URI}?user=${userEmail}`,\n options\n );\n }\n static async RequestPasswordReset(userEmailObject) {\n const options = {\n ...BASE_OPTIONS,\n body: JSON.stringify(userEmailObject),\n };\n options.method = 'POST';\n\n return await UserHelper.get(`/${USER_REQUEST_PASSWORD_RESET_URI}`, options);\n }\n static async ResetPassword(resetPasswordObject) {\n const options = {\n ...BASE_OPTIONS,\n body: JSON.stringify(resetPasswordObject),\n };\n options.method = 'POST';\n\n return await UserHelper.get(`/${USER_RESET_PASSWORD_URI}`, options);\n }\n\n static async get(url, options = BASE_OPTIONS) {\n try {\n const responseBody = await api(url, options);\n return responseBody;\n } catch (err) {\n return { error: { message: err.message } };\n }\n }\n}\n\nasync function api(url, options) {\n return fetch(url, options)\n .then(async response => {\n return response.json().then(data => data);\n })\n .catch(error => {\n throw error;\n });\n}\n","import { put, takeEvery, select } from 'redux-saga/effects';\nimport { to } from 'await-to-js';\nimport { getManagementApiClient } from '~/user/util/ContensisManagementApi';\nimport { UserHelper } from '~/user/util/userHelper';\nimport { selectClientCredentials } from '../selectors';\nimport {\n REQUEST_USER_PASSWORD_RESET,\n RESET_USER_PASSWORD,\n REQUEST_USER_PASSWORD_RESET_ERROR,\n REQUEST_USER_PASSWORD_RESET_SENDING,\n REQUEST_USER_PASSWORD_RESET_SUCCESS,\n RESET_USER_PASSWORD_ERROR,\n RESET_USER_PASSWORD_SENDING,\n RESET_USER_PASSWORD_SUCCESS,\n CHANGE_USER_PASSWORD,\n CHANGE_USER_PASSWORD_SENDING,\n CHANGE_USER_PASSWORD_SUCCESS,\n CHANGE_USER_PASSWORD_ERROR,\n} from '../types';\n\nexport const resetPasswordSagas = [\n takeEvery(REQUEST_USER_PASSWORD_RESET, requestPasswordResetSaga),\n takeEvery(RESET_USER_PASSWORD, resetPasswordSaga),\n takeEvery(CHANGE_USER_PASSWORD, changePasswordSaga),\n];\n\nfunction* requestPasswordResetSaga(action) {\n const userEmailObject = action.userEmailObject;\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_SENDING,\n });\n if (userEmailObject && userEmailObject.userEmail) {\n try {\n const passwordResetRequestResponse =\n yield UserHelper.RequestPasswordReset(userEmailObject);\n\n if (passwordResetRequestResponse) {\n if (!passwordResetRequestResponse.error) {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_SUCCESS,\n });\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: passwordResetRequestResponse.error.message,\n });\n }\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: 'No response from server',\n });\n }\n } catch (error) {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: error && error.toString(),\n });\n }\n } else {\n yield put({\n type: REQUEST_USER_PASSWORD_RESET_ERROR,\n error: 'Invalid object',\n });\n }\n}\n\nfunction* resetPasswordSaga(action) {\n const resetPasswordObject = action.resetPasswordObject;\n\n yield put({\n type: RESET_USER_PASSWORD_SENDING,\n });\n if (resetPasswordObject.token && resetPasswordObject.password) {\n try {\n const resetPasswordResponse = yield UserHelper.ResetPassword(\n resetPasswordObject\n );\n\n if (resetPasswordResponse) {\n if (!resetPasswordResponse.error) {\n yield put({\n type: RESET_USER_PASSWORD_SUCCESS,\n });\n } else {\n const error =\n (resetPasswordResponse.error.data &&\n resetPasswordResponse.error.data.length > 0 &&\n resetPasswordResponse.error.data[0].message) ||\n resetPasswordResponse.error.message;\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error,\n });\n }\n } else {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: 'No response from server',\n });\n }\n } catch (error) {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: error && error.toString(),\n });\n }\n } else {\n yield put({\n type: RESET_USER_PASSWORD_ERROR,\n error: 'Invalid object',\n });\n }\n}\n\n// userId\n// existingPassword\n// newPassword\nfunction* changePasswordSaga(action) {\n if (\n !action ||\n !action.userId ||\n !action.currentPassword ||\n !action.newPassword\n ) {\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error: 'Invalid action object sent to changePassword saga',\n });\n return;\n }\n\n try {\n const changePasswordObject = {\n userId: action.userId,\n existing: action.currentPassword,\n new: action.newPassword,\n };\n\n yield put({\n type: CHANGE_USER_PASSWORD_SENDING,\n });\n const clientCredentials = (yield select(selectClientCredentials)).toJS();\n const client = yield getManagementApiClient({ ...clientCredentials });\n\n const [err, res] = yield to(\n client.security.users.updatePassword(changePasswordObject)\n );\n\n if (err) {\n const error =\n (err?.data?.data?.length > 0 && err.data.data[0].message) ||\n err?.data?.message;\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error,\n });\n return;\n }\n\n // // eslint-disable-next-line no-console\n // console.log(changePasswordObject);\n // // eslint-disable-next-line no-console\n // console.log(userCredentialsObject);\n yield put({\n type: CHANGE_USER_PASSWORD_SUCCESS,\n });\n } catch (error) {\n yield put({\n type: CHANGE_USER_PASSWORD_ERROR,\n error: error && error.toString(),\n });\n }\n}\n","import { loginSagas } from './login';\nimport { registerSagas } from './register';\nimport { resetPasswordSagas } from './resetPassword';\n\nexport const userSagas = [\n ...loginSagas,\n ...registerSagas,\n ...resetPasswordSagas,\n];\n","// index.js\nimport { all } from 'redux-saga/effects';\nimport { navigationSagas } from './navigation';\nimport { routingSagas } from '~/routing/redux/sagas';\nimport { userSagas } from '~/user/redux/sagas';\n\nexport default function (featureSagas = []) {\n return function* rootSaga() {\n const subSagas = [...routingSagas, ...navigationSagas, ...userSagas];\n yield all([...subSagas, ...featureSagas]);\n };\n}\n","const servers = SERVERS; /* global SERVERS */\nconst alias = servers.alias.toLowerCase();\nconst publicUri = PUBLIC_URI; /* global PUBLIC_URI */\nconst projects = PROJECTS; /* global PROJECTS */\n\n// return a projectId via the request hostname\nconst pickProject = (hostname, query) => {\n // if localhost we can only infer via a querystring, and take your word for it\n if (hostname == 'localhost') {\n return (query && query.p) || projects[0].id;\n }\n\n // if hostname is the actual public uri we can return the first project from the list\n if (hostname == publicUri) {\n return projects[0].id;\n }\n\n let project = 'unknown';\n\n // // go through all the defined projects\n // Object.entries(projects).map(([, p]) => {\n const p = projects[0];\n\n // check if we're accessing via the project's public uri\n if (hostname.includes(p.publicUri)) project = p.id;\n\n // the url structure is different for website (we don't prefix)\n if (p.id.startsWith('website')) {\n // check for internal and external hostnames\n // we check live and preview distinctly so our rule does not clash with\n // hostnames that use a project prefix\n if (\n hostname.includes(`live-${alias}.cloud.contensis.com`) ||\n hostname.includes(`live.${alias}.contensis.cloud`) ||\n hostname.includes(`preview-${alias}.cloud.contensis.com`) ||\n hostname.includes(`preview.${alias}.contensis.cloud`)\n )\n project = p.id;\n } else {\n // check for internal and external hostnames, prefixed with the projectId\n if (\n hostname.includes(`${p.id.toLowerCase()}-${alias}.cloud.contensis.com`) ||\n hostname.includes(`${p.id.toLowerCase()}.${alias}.contensis.cloud`)\n )\n project = p.id;\n }\n // });\n return project === 'unknown' ? p.id : project;\n};\n\nexport default pickProject;\n","import React from 'react';\nimport { hot } from 'react-hot-loader';\nimport { AppRootProps } from '../routing/routes';\nimport { RouteLoader } from '../routing';\n\nconst AppRoot = (props: AppRootProps) => {\n return <RouteLoader {...props} />;\n};\n\nexport default hot(module)(AppRoot);\n"],"names":["selectedHistory","window","createBrowserHistory","createMemoryHistory","history","options","browserHistory","storeSurrogateKeys","response","keys","headers","get","map","reduxStore","dispatch","setSurrogateKeys","getClientConfig","project","config","DELIVERY_API_CONFIG","responseHandler","projectId","defaultHeaders","PROXY_DELIVERY_API","rootUrl","DeliveryApi","getClientSideVersionStatus","currentHostname","location","hostname","getVersionStatusFromHostname","indexOf","endsWith","search","query","linkDepth","env","client","Client","create","entries","getClient","deliveryApiStatus","baseConfig","versionStatus","getEntry","id","deliveryApi","CacheNode","constructor","key","value","next","prev","LruCache","limit","head","tail","size","node","remove","setHead","set","CachedSearch","cache","taxonomyLookup","request","JSON","stringify","toString","clientConfig","getContentType","contentTypes","getTaxonomyNode","taxonomy","resolveChildren","then","extendTaxonomyNode","getRootNode","nodes","getRoot","getNode","path","getAncestors","getChildren","getSiblings","execute","promise","catch","getTaxonomyId","children","n","parts","split","length","getTaxonomyKey","cachedSearch","navigationSagas","takeEvery","GET_NODE_TREE","ensureNodeTreeSaga","action","state","select","hasNavigationTree","deliveryApiVersionStatus","selectVersionStatus","selectCurrentProject","depth","treeDepth","put","type","SET_NODE_TREE","GET_NODE_TREE_ERROR","ex","error","sys","contentTypeId","dataFormat","filename","includeInSearch","slug","uri","Fields","entryTitle","entryDescription","keywords","wildcard","fieldExpression","field","operator","weight","Array","isArray","equalToOrIn","Op","defaultExpressions","equalTo","arr","in","routeEntryByFieldsQuery","language","fields","Query","routingSagas","SET_NAVIGATION_PATH","getRouteSaga","SET_ROUTE","setRouteSaga","payload","method","args","entry","withEvents","routes","ContentTypeMappings","staticRoute","route","injectRedux","call","reduxInjectorSaga","pathNode","ancestors","siblings","appsays","requireLogin","onRouteLoad","doNavigation","customNavigation","entryLinkDepth","setContentTypeLimits","find","ct","nodeOptions","routeEntry","selectRouteEntry","routeNode","selectCurrentNode","currentPath","isHome","isPreview","startsWith","defaultLang","customRouting","fetchNode","statePath","refetchNode","toJS","UPDATE_LOADING_STATE","isLoading","setRouteEntry","selectCurrentAncestors","entryFields","splitPath","entryGuid","previewEntry","childrenDepth","findContentTypeMapping","items","childrenOptions","childNodes","log","contentTypeMapping","onRouteLoaded","handleRequiresLoginSaga","entryMapper","do404","preventScrollTop","scroll","top","tree","e","stack","do500","notFound","remapEntry","entrySys","currentEntryId","selectRouteEntryEntryId","currentEntryLang","selectRouteEntryLanguage","mappedEntry","selectMappedEntry","Map","mapRouteEntry","all","SET_ENTRY","SET_ANCESTORS","SET_SIBLINGS","clientReloadHitServer","stateEntry","reload","isError","statusCode","status","injectorFn","reducer","saga","reduxInjector","registerSagas","REGISTER_USER","registerSaga","REGISTER_USER_SUCCESS","redirectSaga","user","mappers","requestBody","fetch","Accept","body","ok","mappedResponse","responseBody","to","json","REGISTER_USER_FAILED","message","errorResponse","statusText","currentQs","queryParams","selectCurrentSearch","redirectUri","redirect_uri","redirect","setRoute","PAP_URL","USER_ENVS_URI","USER_RESEND_VERIFICATION_URI","USER_REQUEST_PASSWORD_RESET_URI","USER_RESET_PASSWORD_URI","USER_ENVS_URL","BASE_OPTIONS","UserHelper","GetUsersEnvironments","securityToken","ResendUserVerification","userEmail","RequestPasswordReset","userEmailObject","ResetPassword","resetPasswordObject","url","api","err","data","resetPasswordSagas","REQUEST_USER_PASSWORD_RESET","requestPasswordResetSaga","RESET_USER_PASSWORD","resetPasswordSaga","CHANGE_USER_PASSWORD","changePasswordSaga","REQUEST_USER_PASSWORD_RESET_SENDING","passwordResetRequestResponse","REQUEST_USER_PASSWORD_RESET_SUCCESS","REQUEST_USER_PASSWORD_RESET_ERROR","RESET_USER_PASSWORD_SENDING","token","password","resetPasswordResponse","RESET_USER_PASSWORD_SUCCESS","RESET_USER_PASSWORD_ERROR","userId","currentPassword","newPassword","CHANGE_USER_PASSWORD_ERROR","changePasswordObject","existing","new","CHANGE_USER_PASSWORD_SENDING","clientCredentials","selectClientCredentials","getManagementApiClient","res","security","users","updatePassword","CHANGE_USER_PASSWORD_SUCCESS","userSagas","loginSagas","featureSagas","rootSaga","subSagas","servers","SERVERS","alias","toLowerCase","public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