@zengenti/contensis-react-base 4.0.0-beta.2 → 4.0.0-beta.3

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 (209) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +18 -478
  3. package/cjs/{App-b56aca04.js → App-BNcmM8rN.js} +215 -234
  4. package/cjs/App-BNcmM8rN.js.map +1 -0
  5. package/cjs/{ChangePassword.container-ae35785e.js → ChangePassword.container-642SYfpS.js} +209 -286
  6. package/cjs/ChangePassword.container-642SYfpS.js.map +1 -0
  7. package/cjs/CookieHelper.class-BoY5TrIi.js +562 -0
  8. package/cjs/CookieHelper.class-BoY5TrIi.js.map +1 -0
  9. package/cjs/{RouteLoader-c06dccd5.js → RouteLoader-DvyYYyIE.js} +55 -68
  10. package/cjs/RouteLoader-DvyYYyIE.js.map +1 -0
  11. package/cjs/{ContensisDeliveryApi-4fcf049d.js → SSRContext-D66GKlH7.js} +165 -119
  12. package/cjs/SSRContext-D66GKlH7.js.map +1 -0
  13. package/cjs/{ToJs-a8d8f3f0.js → ToJs-C9jwV7YB.js} +26 -80
  14. package/cjs/ToJs-C9jwV7YB.js.map +1 -0
  15. package/cjs/{_commonjsHelpers-b3309d7b.js → _commonjsHelpers-BJu3ubxk.js} +1 -1
  16. package/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
  17. package/cjs/client.js +67 -65
  18. package/cjs/client.js.map +1 -1
  19. package/cjs/contensis-react-base.js +386 -3293
  20. package/cjs/contensis-react-base.js.map +1 -1
  21. package/cjs/{fromJSLeaveImmer-e74c673c.js → fromJSLeaveImmer-Blvlk4t2.js} +3 -7
  22. package/{esm/fromJSLeaveImmer-0114ffcf.js.map → cjs/fromJSLeaveImmer-Blvlk4t2.js.map} +1 -1
  23. package/cjs/redux.js +18 -19
  24. package/cjs/redux.js.map +1 -1
  25. package/cjs/routing.js +13 -6
  26. package/cjs/routing.js.map +1 -1
  27. package/cjs/sagas-CbZhaRNd.js +6010 -0
  28. package/cjs/sagas-CbZhaRNd.js.map +1 -0
  29. package/cjs/search.js +105 -305
  30. package/cjs/search.js.map +1 -1
  31. package/cjs/selectors-wCs5fHD4.js +460 -0
  32. package/cjs/selectors-wCs5fHD4.js.map +1 -0
  33. package/cjs/{version-34d91f68.js → store-CADDS7cV.js} +44 -111
  34. package/cjs/store-CADDS7cV.js.map +1 -0
  35. package/cjs/{urls-6fcaf4c6.js → urls-DVIwGZmd.js} +1 -1
  36. package/{esm/urls-eac9a747.js.map → cjs/urls-DVIwGZmd.js.map} +1 -1
  37. package/cjs/user.js +12 -20
  38. package/cjs/user.js.map +1 -1
  39. package/cjs/util.js +108 -115
  40. package/cjs/util.js.map +1 -1
  41. package/cjs/{version-a410c88e.js → version-ASZx0NDG.js} +19 -22
  42. package/{esm/version-9f29becb.js.map → cjs/version-ASZx0NDG.js.map} +1 -1
  43. package/cjs/version-CM-bJ62L.js +20 -0
  44. package/cjs/version-CM-bJ62L.js.map +1 -0
  45. package/esm/{App-83107d7e.js → App-CfIZbvU9.js} +176 -195
  46. package/esm/App-CfIZbvU9.js.map +1 -0
  47. package/esm/{ChangePassword.container-76fd5e9b.js → ChangePassword.container-Q7bElOVz.js} +191 -250
  48. package/esm/ChangePassword.container-Q7bElOVz.js.map +1 -0
  49. package/esm/CookieHelper.class-DzleKOOc.js +555 -0
  50. package/esm/CookieHelper.class-DzleKOOc.js.map +1 -0
  51. package/esm/{RouteLoader-29fd689a.js → RouteLoader-qJA3UqTM.js} +40 -53
  52. package/esm/RouteLoader-qJA3UqTM.js.map +1 -0
  53. package/esm/{ContensisDeliveryApi-fe57a037.js → SSRContext-C743Oeli.js} +159 -120
  54. package/esm/SSRContext-C743Oeli.js.map +1 -0
  55. package/esm/{ToJs-df57f31d.js → ToJs-CpPNdcXS.js} +24 -77
  56. package/esm/ToJs-CpPNdcXS.js.map +1 -0
  57. package/esm/{_commonjsHelpers-1789f0cf.js → _commonjsHelpers-BFTU3MAI.js} +1 -1
  58. package/esm/_commonjsHelpers-BFTU3MAI.js.map +1 -0
  59. package/esm/client.js +55 -53
  60. package/esm/client.js.map +1 -1
  61. package/esm/contensis-react-base.js +317 -3222
  62. package/esm/contensis-react-base.js.map +1 -1
  63. package/esm/{fromJSLeaveImmer-0114ffcf.js → fromJSLeaveImmer-C_YACmOf.js} +2 -6
  64. package/{cjs/fromJSLeaveImmer-e74c673c.js.map → esm/fromJSLeaveImmer-C_YACmOf.js.map} +1 -1
  65. package/esm/redux.js +9 -8
  66. package/esm/redux.js.map +1 -1
  67. package/esm/routing.js +13 -4
  68. package/esm/routing.js.map +1 -1
  69. package/esm/sagas-xJU-zOpn.js +5916 -0
  70. package/esm/sagas-xJU-zOpn.js.map +1 -0
  71. package/esm/search.js +113 -311
  72. package/esm/search.js.map +1 -1
  73. package/esm/selectors-CBdCY0u3.js +396 -0
  74. package/esm/selectors-CBdCY0u3.js.map +1 -0
  75. package/esm/{version-3d9911e2.js → store-uQZKjfA8.js} +36 -81
  76. package/esm/store-uQZKjfA8.js.map +1 -0
  77. package/esm/{urls-eac9a747.js → urls-DfCisos-.js} +1 -1
  78. package/{cjs/urls-6fcaf4c6.js.map → esm/urls-DfCisos-.js.map} +1 -1
  79. package/esm/user.js +7 -13
  80. package/esm/user.js.map +1 -1
  81. package/esm/util.js +66 -74
  82. package/esm/util.js.map +1 -1
  83. package/esm/{version-9f29becb.js → version-B9nPx4IF.js} +6 -9
  84. package/{cjs/version-a410c88e.js.map → esm/version-B9nPx4IF.js.map} +1 -1
  85. package/esm/version-D773TD9j.js +15 -0
  86. package/esm/version-D773TD9j.js.map +1 -0
  87. package/models/app/App.d.ts +1 -1
  88. package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +1 -1
  89. package/models/app/pages/VersionInfo/components/VersionInfo.styled.d.ts +2 -1
  90. package/models/client/client.d.ts +1 -1
  91. package/models/index.d.ts +1 -2
  92. package/models/models/AppRouteProps.d.ts +11 -0
  93. package/models/models/ContentTypeMapping.d.ts +89 -0
  94. package/models/models/EntryMapper.d.ts +3 -0
  95. package/models/models/GetRouteActionArgs.d.ts +15 -0
  96. package/models/models/MatchedRoute.d.ts +4 -0
  97. package/models/models/ReduxInjector.d.ts +5 -0
  98. package/models/models/RequireLogin.d.ts +6 -0
  99. package/models/models/RouteComponent.d.ts +4 -0
  100. package/models/models/RouteComponentProps.d.ts +9 -0
  101. package/models/models/RouteLoaderProps.d.ts +9 -0
  102. package/models/models/RouteNode.d.ts +5 -0
  103. package/models/models/SSRContext.d.ts +11 -0
  104. package/models/models/StaticRoute.d.ts +60 -0
  105. package/models/models/WithEvents.d.ts +58 -0
  106. package/models/models/config/AppConfig.d.ts +12 -0
  107. package/models/{config.d.ts → models/config/ServerConfig.d.ts} +3 -12
  108. package/models/models/config/StateType.d.ts +1 -0
  109. package/models/models/config/index.d.ts +3 -0
  110. package/models/models/index.d.ts +16 -0
  111. package/models/redux/actions/index.d.ts +2 -2
  112. package/models/redux/sagas/navigation.d.ts +1 -3
  113. package/models/redux/selectors/index.d.ts +2 -2
  114. package/models/redux/store/injectors.d.ts +16 -4
  115. package/models/redux/store/store.d.ts +10 -4
  116. package/models/redux/types/index.d.ts +2 -2
  117. package/models/redux/types/navigation.d.ts +3 -3
  118. package/models/redux/types/version.d.ts +2 -2
  119. package/models/routing/components/Redirect.d.ts +1 -1
  120. package/models/routing/components/RouteLoader.d.ts +1 -1
  121. package/models/routing/components/StaticRouteLoader.d.ts +1 -1
  122. package/models/routing/components/Status.d.ts +1 -1
  123. package/models/routing/redux/actions.d.ts +3 -4
  124. package/models/routing/redux/selectors.d.ts +2 -2
  125. package/models/routing/redux/types.d.ts +11 -11
  126. package/models/routing/routes.d.ts +1 -1
  127. package/models/routing/util/find-contenttype-mapping.d.ts +1 -1
  128. package/models/routing/util/queries.d.ts +2 -2
  129. package/models/search/models/Queries.d.ts +4 -2
  130. package/models/search/models/Search.d.ts +8 -1
  131. package/models/search/models/SearchActions.d.ts +3 -2
  132. package/models/search/models/SearchState.d.ts +5 -1
  133. package/models/search/redux/reducers.d.ts +2 -257
  134. package/models/search/redux/schema.d.ts +1 -1
  135. package/models/search/redux/selectors.d.ts +5 -5
  136. package/models/search/search/ContensisDeliveryApi.d.ts +2 -2
  137. package/models/search/search/ToJs.d.ts +1 -1
  138. package/models/search/search/expressions.d.ts +3 -3
  139. package/models/search/search/util.d.ts +17 -2
  140. package/models/search/transformations/searchresult-to-state.mapper.d.ts +1 -2
  141. package/models/server/features/caching/cacheDuration.schema.d.ts +1 -0
  142. package/models/server/features/linkdepth-api/search.d.ts +1 -1
  143. package/models/server/features/static-assets/index.d.ts +1 -1
  144. package/models/server/internalServer.d.ts +1 -1
  145. package/models/server/util/bundles.d.ts +1 -1
  146. package/models/server/util/headers.d.ts +1 -1
  147. package/models/server/webApp.d.ts +1 -1
  148. package/models/user/components/Login.d.ts +1 -1
  149. package/models/user/components/LoginForm.d.ts +6 -6
  150. package/models/user/components/LogoutForm.d.ts +4 -4
  151. package/models/user/components.styled/Login.styled.d.ts +1 -1
  152. package/models/user/components.styled/LoginForm.styled.d.ts +1 -1
  153. package/models/user/hocs/withLogin.d.ts +4 -4
  154. package/models/user/hooks/useLogin.d.ts +4 -4
  155. package/models/user/redux/actions.d.ts +7 -6
  156. package/models/user/redux/sagas/index.d.ts +1 -1
  157. package/models/user/redux/sagas/login.d.ts +5 -17
  158. package/models/user/redux/selectors.d.ts +1 -2
  159. package/models/user/redux/types.d.ts +21 -21
  160. package/models/user/state.d.ts +12 -0
  161. package/models/user/transformations/mapClientCredentials.d.ts +3 -1
  162. package/models/user/util/ContensisManagementApi.d.ts +10 -9
  163. package/models/user/util/CookieConstants.d.ts +1 -0
  164. package/models/user/util/CookieHelper.class.d.ts +8 -4
  165. package/models/user/util/LoginHelper.class.d.ts +25 -37
  166. package/models/user/util/OidcUserManager.d.ts +1 -1
  167. package/models/user/util/matchGroups.d.ts +1 -1
  168. package/models/util/CachedDeliveryApi.d.ts +11 -10
  169. package/models/util/ContensisDeliveryApi.d.ts +11 -7
  170. package/models/util/SSRContext.d.ts +29 -0
  171. package/models/util/index.d.ts +1 -0
  172. package/models/util/json-mapper.d.ts +4 -5
  173. package/package.json +71 -92
  174. package/cjs/App-b56aca04.js.map +0 -1
  175. package/cjs/ChangePassword.container-ae35785e.js.map +0 -1
  176. package/cjs/ContensisDeliveryApi-4fcf049d.js.map +0 -1
  177. package/cjs/CookieConstants-000427db.js +0 -10
  178. package/cjs/CookieConstants-000427db.js.map +0 -1
  179. package/cjs/RouteLoader-c06dccd5.js.map +0 -1
  180. package/cjs/ToJs-a8d8f3f0.js.map +0 -1
  181. package/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
  182. package/cjs/forms.js +0 -5998
  183. package/cjs/forms.js.map +0 -1
  184. package/cjs/reducers-73a03ef4.js +0 -257
  185. package/cjs/reducers-73a03ef4.js.map +0 -1
  186. package/cjs/sagas-570f23ba.js +0 -2175
  187. package/cjs/sagas-570f23ba.js.map +0 -1
  188. package/cjs/selectors-14caa813.js +0 -228
  189. package/cjs/selectors-14caa813.js.map +0 -1
  190. package/cjs/version-34d91f68.js.map +0 -1
  191. package/esm/App-83107d7e.js.map +0 -1
  192. package/esm/ChangePassword.container-76fd5e9b.js.map +0 -1
  193. package/esm/ContensisDeliveryApi-fe57a037.js.map +0 -1
  194. package/esm/CookieConstants-3d3b6531.js +0 -6
  195. package/esm/CookieConstants-3d3b6531.js.map +0 -1
  196. package/esm/RouteLoader-29fd689a.js.map +0 -1
  197. package/esm/ToJs-df57f31d.js.map +0 -1
  198. package/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
  199. package/esm/forms.js +0 -5984
  200. package/esm/forms.js.map +0 -1
  201. package/esm/reducers-aa8cef1e.js +0 -234
  202. package/esm/reducers-aa8cef1e.js.map +0 -1
  203. package/esm/sagas-07e82e18.js +0 -2083
  204. package/esm/sagas-07e82e18.js.map +0 -1
  205. package/esm/selectors-691caf02.js +0 -186
  206. package/esm/selectors-691caf02.js.map +0 -1
  207. package/esm/version-3d9911e2.js.map +0 -1
  208. package/models/forms/index.d.ts +0 -1
  209. /package/models/{redux/appstate.d.ts → models/AppState.d.ts} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2025 Zengenti Ltd.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -6,6 +6,18 @@ Handles web app routing with Contensis Site View and component rendering based o
6
6
 
7
7
  ## Upgrade notes (older projects)
8
8
 
9
+ ### Styled Components 6 (v3.3+)
10
+
11
+ Some projects may see console warnings in the web app like the example below after upgrading to v3.3+ which updates Styled Components from version 5 to 6
12
+
13
+ ```
14
+ styled-components: it looks like an unknown prop "maxWidth" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)
15
+
16
+ React does not recognize the `maxWidth` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `maxwidth` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
17
+ ```
18
+
19
+ To fix these warnings we can opt-in to certain behaviours from Styled Components v5 by wrapping the top-level components in `App` in a `StyleSheetManager` component and handlers for suppressing the necessary warnings. [Further reading](https://styled-components.com/docs/faqs#shouldforwardprop-is-no-longer-provided-by-default)
20
+
9
21
  ### React 17 (v3.0+)
10
22
 
11
23
  This version introduces React v17. React is very sensitive to having multiple versions installed at the same time.
@@ -66,7 +78,7 @@ All TypeScript models are exported from here and should be imported in your app
66
78
 
67
79
  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
68
80
 
69
- ### /forms
81
+ ### /forms (deprecated)
70
82
 
71
83
  For use when using the newer Content Types and Entries based forms module
72
84
 
@@ -105,7 +117,7 @@ Sometimes VSCode may import the reference automatically from an unsupported plac
105
117
 
106
118
  As of v2.5.0 TypeScript declarations are available to use, and will also benefit applications written in JavaScript
107
119
 
108
- All models are exported with the default package `@zengenti/contensis-react-base`
120
+ All models are exported with the default package `@zengenti/contensis-react-base`
109
121
 
110
122
  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';`
111
123
 
@@ -124,482 +136,10 @@ Conventional commit messages are expected.
124
136
 
125
137
  https://www.conventionalcommits.org/en/v1.0.0/#summary
126
138
 
127
- # Changelog
128
-
129
- #### 3.1.0 (2024-01-18)
130
-
131
- ##### New Features
132
-
133
- * Handle 401/403 response from Delivery API (27628a7)
134
- * add referer header to delivery api requests in ssr (27628a7)
135
- * able to specify an array of specific exception types to add listeners and exception handlers for and fixes server not exiting cleanly (27628a7)
136
- * Canonical Path support (033e212c)
137
- * Upgraded to Styled Components v6 beta (breaking change for Styled Components) (19c114ce)
138
- * /search package support for setting dynamic pageSize and fix for /forms subpackage after recent refactoring of imports (1b04662d)
139
-
140
- ##### Bug Fixes
141
-
142
- * ensure `surrogate-key` response header does not exceed 2000 keys and dedupe surrogate keys as they are collected and aggregated (e50c3583)
143
- * update forms package - accessible country searchable dropdown (ab1bd37d)
144
- * manually update version to align with another branch so that the ci versioning doesn't fail. (ef0cf3ba)
145
- * prefer x-orig-host over host header for currentHostname (6f34c5e2)
146
- * ensureNodeTreeSaga now respects language setting (1e67e8fb)
147
- * forms package import fix (e847ceca)
148
- * `object is not extensible` error when using `selectBreadcrumb` with immer state (59ca555b)
149
- * Revert update of Styled Components due to babel compiling issues. (23ef4ab4)
150
- * Increase number of user groups returned when requesting user details. (7d9e59a0)
151
- * allow use of exported delivery api methods which inherit cache invalidation features (2eeaed7b)
152
- * User reducer - Create object copy instead of referencing directly (1dad589b)
153
- * preview toolbar cannot edit the correct entry after client-side navigation (4df782cc)
154
- * exported `server` object is not working as expected (b3ce8a81)
155
-
156
- ##### Refactors
157
-
158
- * delivery api utilities now in TypeScript (0b1e8911)
159
-
160
- ##### Build System / Dependencies
161
-
162
- * fix error in release action (c03516c9)
163
- * fix issue with path transformations not applied to alias imports in d.ts files (27628a7)
164
-
165
- #### 3.0.1 (2023-01-27)
166
-
167
- ##### Bug Fixes
168
-
169
- - search package update supporting 'fuzzy' search (67bf14f3)
170
- - revert package `chalk@4` as v5 requires total ESM environment which is incompatible with the Node.js app server today (4dcd478d)
171
- - node process terminating on unhandled exception / promise rejection when running on node.js 15+, implement default behaviour as in <15 with the option to turn this off. Export express `server` for package consumers who need to access server methods in app handlers (677cd00a)
172
- - search package null errors when replacing entire search state with a fresh config, remove redundant nav code (b74a526b)
173
- - state-to-searchuri - fix crash when app state is immutable (f4e265eb)
174
- - search package issue with APPLY_CONFIG after immer conversion (a827d075)
175
- - Update from Search Package to use ?pageIndex over /pageIndex by default (99e42b90)
176
- - search package fix resolving customApi response in ssr causes thread to hang (c4bed5e8)
177
- - always use `api-` uri for delivery api proxy requests (6887e440)
178
- - useMinilist hook, handle undefined arguments. (12d906d7)
179
- - ContensisDeliveryApi.js -Add null check in LruCache.remove method (95cb63bf)
180
-
181
- ##### Refactors
182
-
183
- - convert some files to typescript (5c3b74e2)
184
- - Split deliveryApi and asset proxy servers into separate instances (7ae1e007)
185
-
186
- #### 3.0.0 (2022-10-06)
187
-
188
- ##### New Features
189
-
190
- - Allow choosing 301/302 for trailing slash redirect. (49921fcb)
191
- - new feature which allows you to pass params to the site view query that fetches the static node, also you can now specify linkDepth, fields and a entry mapper in the static routes file (6dbf1517)
192
- - support setting versionStatus via new header 'x-entry-versionstatus' (b867bb04)
193
- - initial commit for final implementation of LinkDepthApi (6e581a43)
194
- - additional exports from search package, `routeParams` helper util for use with react-router@6 or 5 (2cf19338)
195
- - initial commit for linkdepth-api for use with search package (802a7edc)
196
- - add CookiesProvider JSX from react-cookie to support use of useCookie() hook inside components which should return any cookies in a keyed object and optionally other cookie manipulation methods (5e0c3184)
197
- - expose new navigation selector and remove redundant keys from routing and navigation state (1ae609ee)
198
- - search feature filter config added logicOperator support (9a0d83d0)
199
- - add routing selectors selectCurrentLocation and selectStaticRoute (23d45292)
200
- - add additional mapping fields to mapComposer, \_index and $root, make all additional fields availalbe in item mappings returning only \_type and \_index with each mapped result (15acc8d0)
201
- - add AppState typing, add stateType as an app start option to specify whether the app will load with an immer or an immutable state, with immutable references dynamically imported. createStore becomes async to support dynamic imports. remove toJS wrapper component and ensure selectors are reurned in plain JS instead (f9dd353e)
202
- - upgrade dependency to support react 17 (c2843beb)
203
-
204
- ##### Bug Fixes
205
-
206
- - incorrectly setting versionStatus to published in localhost after recent change (ef9fd02a)
207
- - use scrollTo instead of scroll window function as this was causing inconsistent scroll behaviour on FF (364f1744)
208
- - build add --legacy-peer-deps flag when installing node_modules (cd865b87)
209
- - missing legacy build stats does not affect the server-side ChunkExtractor, add missing typings and update project to use node 16 / npm 8 (dce347a2)
210
- - add error handling when reading /static/version.json in server startup (aef8d3a5)
211
- - render script, noscript and base tags as well as meta and link in SSR (b899547a)
212
- - give `nomodule` attribute in script tag an acceptable value (786a6366)
213
- - invalid nomodule attribute on script tags, must be lower case (2dac2cff)
214
- - update search package for better handling of customApi usage (7241e243)
215
- - enable use of boolean in nodeOptions in ContentTypeMappings to override any global setting from onRouteLoad, add missing keys to ContentTypeMapping type (82960b5a)
216
- - add forms key to convert this part of state to immer when used with immutable store (74f5a017)
217
- - default export formv2 (fe1a4eae)
218
- - missing return from double slash fix (b5601e37)
219
- - preserve empty objects when cleaning serialised redux state in SSR (194bd8e7)
220
- - resolve double-slash redirect vulnerability and remove non JSON-safe undefined and empty values from the serialised redux state in SSR (5618df7d)
221
- - setting staticFolderPath outside of env files causing runtime file not found and 404 errors (c704682d)
222
- - custom staticRoutePath not taking effect with loadable chunkExtractor in SSR (d9f63ae3)
223
- - mapComposer will return empty object for any composeritem.type that isn't resolved to a keyed mapper (5202a5a5)
224
- - search APPLY_CONFIG not persisting state in SSR (aa410755)
225
- - between operator works with dates (11977f69)
226
- - don't treat homepage differently from a normally routed page in routing saga so we can apply the same api loading sequence for any route when applying field and node restrictions for example, fix issue with entryLinkDepth 0 treated as falsy (19b4b5e3)
227
- - search package expression tweaks and filter enhancement (267a0eeb)
228
- - mapComposer util converting arrays into indexed object unintentionally, add some missing types for entryMapper and expose RouteNode type for writing entry mapping functions (9f4a5e3d)
229
- - correctly set isLoading user prop when validating a security token from an Azure login or stored contensis credentials, LOGOUT_USER action without a redirect does not adequately remove the user from state (3e2e1b36)
230
- - search package project switching issue (006905a6)
231
- - log the url when calling SET_SURROGATE_KEYS to assist debugging (b5d6a0fc)
232
- - incorrect fallback type for setting surrogate keys (39db75d2)
233
- - retire nodeDepends from routing state and fix issue with not all surrogateKeys being provided in the SSR page response (f748ac24)
234
- - update search package to resolve filtering issue (03bb7479)
235
- - issues with consuming immutable selectors in user sagas after recent immer change (50bb525e)
236
- - user selectors not working, return an object in an immer reducer, possibly to cover an immer faux pas? (fe24547b)
237
- - allow <link> tags from react helmet to be added in to the <head /> server side (0fce150a)
238
- - Enable retrieving arbitrary depth of children in contentTypeMapping node settings (36eecf5b)
239
- - use memoised selector in RouteLoader to stop needless re-renders when using immutable app state (94132300)
240
- - add form to fromJSLeaveImmer as this is now converted to use immer reducers (6fd2c9ab)
241
- - broken version and user selectors (90c30ad9)
242
- - ssr error due to serialize syntax after package upgrade (009a788a)
243
- - back button gives 404 as we have mutated the cached node response by deleting the entry key in the routing reducer (95a41ab0)
244
- - update search package to receive immer fixes (21fa682f)
245
- - `loadableReady()` requires state error on hydrate (d9b4e685)
246
- - undefined appearing in render after recent loadable changes (ff6eaf30)
247
- - siteview nodes with no entry attached will now 404, unless the node has been requested via a defined staticRoute (258a169e)
248
- - provide a way of providing consistent selector return types to internal sagas (8b1a970e)
249
- - missing fromJS in return from getIn (a1b45be4)
250
- - convert selectors to use new getIn function (56e5c903)
251
- - dynamically load immutable library into global scope when immutable state type is used, set global var STATE_TYPE during async createStore (d0154681)
252
- - typo in new function, better checking that input object is actually an object (2c91aefe)
253
- - avoid calling toJS() inside selectors, create utility method to replace immutable's getIn (ea58df45)
254
- - reinstate toJS HoC (6f37fe2a)
255
- - getIn is not defined in selectors (81c80cbe)
256
- - fromJS is not a function error (d5adfb34)
257
- - react17 not getting installed in consumer project (48e2bacc)
258
-
259
- ##### Other Changes
260
-
261
- - add a error message section in the navigation redux state so this is easier to debug in the future (e2cf6638)
262
- - SideEffect(NullComponent)" error in development, update other packages checking for breaking changes, Helmet no longer has a default export (42f374c8)
263
- - zengenti/contensis-react-base into feat/react17 (3ae0f5e6)
264
- - converting redux store to immer and most reducers and selectors (d77ca793)
265
-
266
- ##### Performance Improvements
267
-
268
- - refactor siteview api calls so they are all made at the same time, reduce footprint of network calls if nodes options have been set carelessly, fix issue with linkDepth 0 treated as falsy and expose nodeOptions.siblings in ContentTypeMappings (fc8900e5)
269
- - only add additional composer fields to first array item in mapComposer instead of every field (6b443144)
270
- - avoid referencing immutable library in ToJS component (3574319a)
271
-
272
- ##### Refactors
273
-
274
- - add missing typings and exports for search mappers (3b9de097)
275
- - use "is" naming convention for boolean values in user state (d9d4cb87)
276
- - deprecate authenticationErrorMessage from authenticationState, instead use errorMessage (4658461e)
277
- - add type for RouteComponentProps (eec4ef45)
278
- - Remove react-loadable dependancies. Complete loadable-components implementation (99acc6fe)
279
- - replace immutable getin when setting headers in ssr, preserve plain JS for parts of immutable state to maintain compatibility with immer reducers (ecbba1a2)
280
- - tidy up webApp and load startup script from getBundleTags function (e4e2bfb4)
281
- - remove react-loadable bundle generation from webApp as it is not working and use the loadable/server chunk extractors instead. This should fail gracefully if loadable-stats.json cannot be found (1dfc5199)
282
- - move utility code out of webApp, wip for loadable/server implementation (08443957)
283
-
284
- ##### Build System / Dependencies
285
-
286
- - resolve patch-package error (03a4198e)
287
- - resolve ci error `package-lock.json file was created with an old version of npm` (36114b30)
288
- - rebuild /forms subpackage from source code with each build (bc9f5a76)
289
- - update dependency redux-injectors to resolve react 16 peerDependency error in npm 8 (eabe8d57)
290
- - update contensis packages to latest and update outdated npm packages, fix build error with RouteLoader returning an unintelligable type due to the way it is exported (3ea987ab)
291
- - remove excess console.info (5c72037f)
292
- - update contensis packages to latest versions, add missing typings to fix broken build (e79c9dbe)
293
- - change immer version to be greater than to resolve multiple versions getting installed with consumers, remove peerDependencies as they were not the required fix (5a4baf6b)
294
- - introduce peerDependencies to allow npm to not separate key dependency installations such as immer when multiple conflicting versions exist to install (e5c2f390)
295
- - add missing prod dependencies (065423f2)
296
- - fix rollup error (d4d9cf81)
297
- - replace deprecated babel-eslint (748fc4f1)
298
- - remove postcss from build (0c547f03)
299
- - update all known safe outdated dependencies (ec2a9417)
300
- - update nodemon dev dependency to latest (d36c125c)
301
- - add back react-loadable dependency to help out users who are yet to upgrade to loadable/components (8a83e367)
302
- - update search package to use immer branch (5bdef918)
303
- - export getImmutableOrJS utility function as /redux/getIn (4787b447)
304
-
305
- ##### Documentation Changes
306
-
307
- - fix typo in readme [skip ci] (842faa3c)
308
- - update README to be for v3.0 not v2.6 (343e9001)
309
- - add loadable components to README (15ba287c)
310
- - add further installation notes to fix Storybook errors when upgrading to react@17 (920a66b1)
311
- - add v2.6 react17 upgrade installation notes (b569df73)
312
-
313
- #### 2.5.0 (2021-09-20)
314
-
315
- ##### New Features
316
-
317
- - Removed useUser hook and created hooks for change password, forgot password (c65d6dd7)
318
- - add entryMapper to /util utility function to clean up code when mapping route entries with jsonpath-mapper style templates and default arguments (3b6132d9)
319
-
320
- ##### Bug Fixes
321
-
322
- - Error messages not displaying on the various password forms when operations fail (341bc827)
323
- - issue with a default value set in typescript refactor (822da5c9)
324
- - added two missing routing selectors (2ddc26e6)
325
- - server side debugging requires an old version of babel-plugin to define the set globals in the app (09566a99)
326
- - 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)
327
- - update search package to set projectId in listings (098ea40f)
328
- - small issue with SSR and dynamic bundles need to filter out some undefined array items from the loadable modules (c9fa233f)
329
-
330
- ##### Build System / Dependencies
331
-
332
- - install latest search package and uninstall unused packages (81f1c1eb)
333
- - update search package to add missing types, add rules-of-hooks back to eslintrc, correct staticRoute type in OnRouteLoadArgs (c7d1a9ce)
334
- - add follow-tags to git push in release script so we caputure the tag created by npm version command (7030a4fd)
335
- - adding further types to app config (d5da430c)
336
- - add types to AppConfig keys (2c0d3447)
337
- - search index.d.ts is not being copied in CI (0f6b7137)
338
- - copy typescript models for search package as existing d.ts files are ignored by tsc (5f1ce21f)
339
- - add missing @types packages (0f54a201)
340
- - update search package to fix build (5223e118)
341
- - update package-lock to fix build (a2f40c58)
342
- - fix no default export in /client (9e10dc24)
343
- - most models not published to npm (1b2eea17)
344
- - try remove now redundant build stage (87d68755)
345
- - 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)
346
- - update packages (dcc3cbd4)
347
- - change npm script in CI to clean assets and build models with tsc (32c61de8)
348
- - further TypeScript work (e91452d8)
349
- - TypeScript with rollup and babel initial commit (2c737ed9)##### Other Changes
350
-
351
- ##### Performance Improvements
352
-
353
- - remove excess code from bundles (03773ece)
354
- - update zengenti packages (f654d22a)
355
-
356
- ##### Refactors
357
-
358
- - further typescript conversions (9c88cd52)
359
- - further typescript conversions (d7010813)
360
- - typescript conversion progress, all models exported through default package, convert client entrypoint and types for routes and routing events (2a15b4c6)
361
- - typescript conversion progress, types added for globals and server start config (12e17c53)
362
-
363
- ##### Documentation Changes
364
-
365
- - add TypeScript notes to README (0a8bcabd)
366
- - tweak package description text (4f713d5a)
367
- - update CHANGELOG (b8b1b488)
368
-
369
- #### Other changes
370
-
371
- - zengenti/contensis-react-base into dom-auth-changes-merge (7d6e7ed9)
372
- - //github.com/zengenti/contensis-react-base into contensis-14-forgot-change-password (c6775cf1)
373
-
374
- #### 2.4.0 (2021-08-19)
375
-
376
- ##### Build System / Dependencies
377
-
378
- - search package had gone back to old non TS version, now merged into master and back on correct version (5de95dfc)
379
-
380
- ##### Documentation Changes
381
-
382
- - update README with some clarity on the available subpackages and their purpose also key scripts reduced to remove references to an included web app (29f284af)
383
-
384
- ##### New Features
385
-
386
- - support saga and reducer injection, new key in ContentTypeMappings and StaticRoutes injectRedux async function when provided expects a returned object containing { key, reducer, saga } allowing adding dynamic imports into the redux store (d9786fda)
387
-
388
- ##### Bug Fixes
389
-
390
- - global not defined error in dev mode (c650266c)
391
- - update versionInfo page props to support github repositories (325992a4)
392
- - entryMapper does not fire if the route path hasn't changed, we sometimes need the route entry remapped based on query params change for example, add return key to "onRouteLoad" event to ask the routing saga to not reuse the entry/mappedEntry from routing state and instead refetch and remap the route node if refetchNode is returned from the calling app as true (90f1fc7e)
393
-
394
- ##### Performance Improvements
395
-
396
- - oidc-client appearing in consumer bundles despite the package being externalized in webpack. change to dynamic import and allow webpack splitChunksPlugin to handle the separation of this element and lazy loading (if it's ever called upon). webpackChunkName does not work at this time although the webpack hint comment has been left in should this work in future (13e3cb94)
397
-
398
- ##### Refactors
399
-
400
- - call reduxInjector for static route separately (b4941837)
401
- - implement new ./src/{lib} folder structure and remove inappropriate leftover folders (797c8bd1)
402
- - delete webapp source and dependencies, update babel and eslint dependencies (40c320fb)
403
-
404
- #### 2.3.0 (2021-08-06)
405
-
406
- ##### New Features
407
-
408
- - add StaticRoute option "fetchNodeLevel" to be used with "fetchNode" to control how many url parts are sent to the siteview node api to resolve a route entry (f9e90ce0)
409
- - new search package queryParams options "assetTypes" and "includeInSearch" (7cd86adb)
410
- - scripts server start option. attributes option to add custom attributes to all rendered script tags. startup is now specified under new 'scripts' option (912625a9)
411
- - add VersionInfo page as a named export of /util sub package, add globals from server startup options, keep this all server-side (9290561c)
412
- - add new server start option "appRootPath", add support for any "startupScriptFilename" to be provided, added "resolveStartupMiddleware" to resolve requests for this static file to be served up from /dist/static/startup.js [skip ci](12d7f298)
413
- - hostname in routing redux (17ed17f7)
414
-
415
- ##### Bug Fixes
416
-
417
- - support new scripts.startup server config option (c53b96af)
418
- - oidc-client import returning "UserMAnager is not a constructor" error when not importing the library version (b18b331f)
419
- - build error around undefined global var (bdb0fc91)
420
- - ensure in-app 404s hit the load balancer to allow load balancer take over and do any required rerouting (56dc8f12)
421
- - add defaultLang to all api calls in routing saga (1fc57ba3)
422
-
423
- ##### Code Style Changes
424
-
425
- - a new lick of paint for vscode (27c9a40d)
426
-
427
- ##### Tests
428
-
429
- - add console.info when writing login cookies (de51a605)
430
-
431
- ##### Build System / Dependencies
432
-
433
- - update search package to typescript branch (249ea515)
434
- - remove /forms dir from global .npmignore (7bbb85e4)
435
- - fix ci error due to out of date package-lock.json [skip ci](942b50a2)
436
- - change release action to use github hosted runner (5a5d95c1)
437
- - change local dev watch folders [skip ci](11d57430)
438
- - change local dev watch folders [skip ci](2855d023)
439
- - start script rollup watch [skip ci](615b4284)
440
- - changes to scripts to work in monorepo scripts [skip ci](c294c27f)
441
- - update package.json details (d287b258)
442
- - remove pr from build ci [skip ci](2c8644d3)
443
- - fix release script inputs [skip ci](b98804cf)
444
- - fix syntax in release script [skip ci](42595aee)
445
- - fix workflow syntax error, add master branch to build (c56c3d41)
446
- - add new release action to be manually triggered, limit build and publish to branches (5c17ced5)
447
- - fix issue with npm config (4112915c)
448
- - fix problem with git actions (1031accd)
449
- - move git interaction away from npm version scripts and into the action yml (c22665a1)
450
- - don't tag ci prereleases (a5c55cb0)
451
- - add git config to ci (871ed3c0)
452
- - further testing ways of incrementing version and publishing prerelease package with actions (7c7b9f86)
453
- - remove faulty test stage from preversion (91f3e248)
454
- - add npm version to ci to increment a prerelease version and publish on each build (182a1a74)
455
- - try fix cwebp compile from source in build (bfc61f6f)
456
- - fix broken build with sudo (301f21fb)
457
- - remove compiling from source error in npm ci (4d0196e1)
458
- - suppress logging on npm ci build step (bde3cda0)
459
- - update package name (4c1a43d6)
460
- - update workflow action to use self-hosted runner (846b65bf)
461
- - update search package to fix patch error in ci (caebac49)
462
- - update package to remove missing patch error causing build to fail (0ffec891)
463
- - add build github workflow action (a36f36a5)
464
- - fix pull rate limit error (8efdf084)
465
- - update search package to latest (a6447008)
466
-
467
- ##### Documentation Changes
468
-
469
- - README update (#1) (8db8e8a1)
470
- - tiny README update (54db40c5)
471
- - update changelog (129081ca)
472
-
473
- #### 2.2.3 (2021-05-10)
474
-
475
- ##### Bug Fixes
476
-
477
- - entry object in routing saga not being passed to onRouteLoaded when doing field-limited entry search for a found siteview node (ce5d5df9)
478
- - Empty currentNode value in routing when doing SSR (3a6cecd2)
479
- - remove hostname from the ReturnURL querystring provided in the login redirect from classic web servers (e124ef11)
480
- - issue around expired contensisClassicToken sending app on a redirect loop due to app reading refreshToken as valid but IIS requiring the contensisClassicToken / ContensisCMSUserName cookie which is not valid/not present, always write the latest client credentials to cookie when validating stored credentials (64cb6194)
481
-
482
- ##### Tests
483
-
484
- - add new forms sub package (1393b479)
485
-
486
- #### 2.2.2 (2021-04-08)
487
-
488
- ##### Documentation Changes
489
-
490
- - update changelog (724f1727)
491
-
492
- ##### Bug Fixes
493
-
494
- - change user props firstName, lastName to match new Management API format of camelcase (8433553b)
495
- - Add contensis "ReturnURL" support to login redirects (b5c39814)
496
-
497
- #### 2.2.1 (2021-04-06)
498
-
499
- ##### Documentation Changes
500
-
501
- - update changelog (27eb6c35)
502
-
503
- ##### Bug Fixes
504
-
505
- - issue in search package when using a customApi to retrieve search results (bf1cb0b7)
506
- - issue with reading mappedEntry from the state not short circuiting to the fallback Immutable.Map() before calling .toJS() on a null value (36b62e55)
507
-
508
- #### 2.2.0 (2021-04-01)
509
-
510
- ##### Build System / Dependencies
511
-
512
- - disable warning (158a635d)
513
- - add zenhub-dev as default .env (0308f34f)
514
- - set zengenti-search-package to install from master branch (a90778fd)
515
- - update contensis dependency packages (8a7e49f0)
516
- - lib to ensure latest search package is installed (fec721ef)
517
-
518
- ##### Documentation Changes
519
-
520
- - create changelog.md (859c4ae1)
521
-
522
- ##### New Features
523
-
524
- - record and bubble up errors from the routing saga into the redux state, webApp middleware respects the context.status returned from the React StaticRouter and will render all status codes > 400 with the same rules as a plain 404 (b9f1dcc1)
525
-
526
- ##### Bug Fixes
527
-
528
- - change user props userName, firstName, lastName to match new Management API format of all lowercase (8dbe7c3d)
529
- - alter cache duration for 404 response to 5s down from 500s (f14a60a8)
530
- - bug introduced with last fix causing dynamic=true to throw a server side error and return an error page (e81470df)
531
- - Commit updated search bundles (cfa6b0ac)
532
- - LoginHelper class - Loop through ApplicationData to find refresh token rather than assuming it's always at the same index (ade9ac53)
533
-
534
- ##### Other Changes
535
-
536
- - track the current statusCode by setting it in the response object when it changes instead of primitive var (42dfd243)
537
-
538
- #### 2.1.1
539
-
540
- ##### Bug Fixes
541
-
542
- - issue with manipulated bundles from static not having cache headers on their response (9e59ca8d)
543
- - prevent using relative paths to locate assets in a consumer project (d8cbe564)
544
-
545
- ##### Performance Improvements
546
-
547
- - smaller bundles for release (db0a917f)
548
-
549
- #### 2.1.0
550
-
551
- ##### Chores
552
-
553
- ##### New Features
554
-
555
- - export redux store object in /redux subpackage (82db686e)
556
- - new server startup options staticRoutePath and staticRoutePaths[] so an array of static route paths can be defined to serve up static assets from staticFolderPath. STATIC_PATH and STATIC_ROUTE_PATH are recommended in .env file can be used exclusively or together (df990169)
557
- - adds new server start option to allow custom folder path and filename for static/startup.js (2c9ad565)
558
- - support for a new server startup option of "staticFolderPath" this is not required initially as everything should default to 'static' path (b4356e17)
559
- - use react-helmet to generate the html tag server side if htmlAttributes are specified in the consuming app (ad466706)
560
- - introduced html attributes - If the app uses react-helmet html attributes they will now work server side. (ef7b89a3)
561
- - add UPDATE_LOADING_STATE action to reset isLoading state when app has entry (79377ab0)
562
- - add language control to routing preview and add defaultLang var (b7dbac18)
563
-
564
- ##### Bug Fixes
565
-
566
- - add node.entry.language to the routing query (5247fb75)
567
- - linkDepth in ContentTypeMappings not taking effect (f78c8507)
568
- - issue with SSR not hydrating properly/flash alternative way of handling immer features (3b193fb2)
569
- - set default folder path when serving static assets (cb9b2aef)
570
- - variable access issue (a61bd07e)
571
- - update search package to latest containing fixes and other tweaks (e8703763)
572
- - removed unused comment (1401dbdd)
573
- - multilingual entries not getting mapped when visiting the same entry but after switching language (ebcea379)
574
- - removed some non-illegal characters from fixFreeTextForElastic func in search package (eeb2fe94)
575
- - issue with mappedEntry not being written to the redux state in v2 only due to iffy Object.keys check (24fd300c)
576
- - remove uneeded toJs (975a17b5)
577
- - remove module-alias package reference causing server start to fail in release package (7261b155)
578
-
579
- ##### Other Changes
580
-
581
- - add support for a nodeOptions object supplied with a ContentTypeMapping to specify details for fetching children for a route entry's contentTypeId (87a1302d)
582
- - You have reached your pull rate limit. (4a2e76b7)
583
- - attempt to nest immer reducers under one key (809e49be)
584
- - testImmer bit more of an example (c4cab4d5)
585
- - emulated sometimes using fromJS sometimes fromJSOrdered in the fromJSLeaveImmer (d54530bb)
586
- - examples/doc to show how to use immer reducers and selectors (92712b0b)
587
- - immer functionality/testing (8ce191d7)
588
- - immer redux features (e16dfa3f)
589
- - opportunity to reduce some of the excess code and add additional comments to webApp.js, remove redundant patch (0b7e0269)
590
- - remove feature to automatically exclude the current route entry id in any minilist search, instead expect the consumer to provide the current route entry id in the options if they require the current page to be excluded from minilist results (98282648)
591
-
592
- ##### Performance Improvements
593
-
594
- - changing the way we import login code and contensis-management-api package, to give consumer projects the potential to externalise this library from their vendor.js bundle if the login features are not required (055e4d43)
595
- - remove unused packages, remove old webpack build script, update jsonpath-mapper to latest version (22323612)
596
-
597
- ##### Refactors
598
-
599
- - remve superfluos header with Neil’s guidance (918d2e22)
139
+ ## License
600
140
 
601
- #### 2.0.1
141
+ This project is licensed under the [ISC License](https://opensource.org/licenses/ISC).
602
142
 
603
- ##### Bug Fixes
143
+ ### Attribution
604
144
 
605
- - issue in release package casuing prod server to fail to start, remove previous fix for @lse/component-library package (cbf61d96)
145
+ This project indirectly utilizes data from [`caniuse-lite`](https://github.com/browserslist/caniuse-lite) as part of its build tooling. The data, sourced from [caniuse.com](https://caniuse.com), is made available under the **Creative Commons Attribution 4.0 International [(CC BY 4.0)](http://creativecommons.org/licenses/by/4.0/)** license. For more information about this data or its use, please refer to [the author's repository](https://github.com/browserslist/caniuse-lite?tab=readme-ov-file#license).