@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
@@ -2,7 +2,7 @@ import { PagedList } from 'contensis-core-api';
2
2
  import { Entry, TaxonomyNode } from 'contensis-delivery-api/lib/models';
3
3
  import { Context } from '../models/Enums';
4
4
  import { SearchFacet, Listing, Mappers } from '../models/Search';
5
- import { AppState } from './SearchState';
5
+ import { AppState, Facet } from './SearchState';
6
6
  import { QueryParams } from './Queries';
7
7
  import { TimedSearchResponse } from './SearchUtil';
8
8
  type Action = {
@@ -56,6 +56,7 @@ export type LoadFiltersSearchResults = Action & {
56
56
  selectedKeys: string[];
57
57
  context: Context;
58
58
  mapper: Mappers['filterItems'];
59
+ facet: Facet;
59
60
  };
60
61
  export type SearchResults = {
61
62
  action: ExecuteSearchAction;
@@ -87,7 +88,7 @@ export type SetSearchEntriesParams = {
87
88
  defaultLang: string;
88
89
  facet: string;
89
90
  mappers: Mappers;
90
- nextFacet: SearchFacet;
91
+ nextFacet: Facet;
91
92
  preload: boolean;
92
93
  ogState: AppState;
93
94
  debug: DebugFlags;
@@ -1,3 +1,4 @@
1
+ import { PagedSearchList } from 'contensis-core-api';
1
2
  import { Context } from './Enums';
2
3
  import { CustomWhereClause } from './Search';
3
4
  export type AppState = Record<'search', SearchState> & Record<string, any>;
@@ -12,10 +13,12 @@ export type SearchState = {
12
13
  tabs: Tab[];
13
14
  config: Record<string, boolean>;
14
15
  };
16
+ export type Aggregations = Required<PagedSearchList<unknown>>['aggregations'];
15
17
  export type Facets = {
16
18
  [key: string]: Facet;
17
19
  };
18
20
  export type Facet = {
21
+ aggregations?: Aggregations;
19
22
  entries: {
20
23
  isLoading: boolean;
21
24
  isError: boolean;
@@ -60,7 +63,7 @@ export type Filter = {
60
63
  contentTypeId?: string;
61
64
  customWhere?: CustomWhereClause;
62
65
  defaultValue?: string;
63
- fieldId?: string;
66
+ fieldId?: string | string[];
64
67
  isGrouped?: boolean;
65
68
  isSingleSelect?: boolean;
66
69
  isLoading: boolean;
@@ -77,6 +80,7 @@ export type FilterItem = {
77
80
  key: string;
78
81
  path?: string;
79
82
  isSelected: boolean;
83
+ aggregate?: number;
80
84
  };
81
85
  export type SelectedFilters = {
82
86
  [k: string]: string[];
@@ -1,267 +1,12 @@
1
1
  import { SearchConfig } from '../models/Search';
2
2
  import { Context } from '../models/Enums';
3
3
  import { SearchState } from '../models/SearchState';
4
- declare const _default: (config: SearchConfig) => <Base extends {
5
- readonly context: "facets" | "listings" | "minilist";
6
- readonly currentFacet: string;
7
- readonly currentListing: string;
8
- readonly term: string;
9
- readonly facets: {
10
- readonly [x: string]: {
11
- readonly entries: {
12
- readonly isLoading: boolean;
13
- readonly isError: boolean;
14
- readonly error?: any;
15
- };
16
- readonly featuredEntries: {
17
- readonly isLoading: boolean;
18
- readonly isError: boolean;
19
- readonly error?: any;
20
- };
21
- readonly featuredResults: readonly any[];
22
- readonly filters: {
23
- readonly [x: string]: {
24
- readonly contentTypeId?: string | undefined;
25
- readonly customWhere?: readonly ({
26
- readonly [x: string]: any;
27
- readonly field: string;
28
- } | {
29
- readonly not: {
30
- readonly [x: string]: any;
31
- readonly field: string;
32
- };
33
- } | {
34
- readonly and: readonly {
35
- readonly [x: string]: any;
36
- readonly field: string;
37
- }[];
38
- } | {
39
- readonly or: readonly {
40
- readonly [x: string]: any;
41
- readonly field: string;
42
- }[];
43
- })[] | undefined;
44
- readonly defaultValue?: string | undefined;
45
- readonly fieldId?: string | undefined;
46
- readonly isGrouped?: boolean | undefined;
47
- readonly isSingleSelect?: boolean | undefined;
48
- readonly isLoading: boolean;
49
- readonly isError: boolean;
50
- readonly items?: readonly {
51
- readonly contentTypeId?: string | undefined;
52
- readonly title?: string | undefined;
53
- readonly type?: string | undefined;
54
- readonly key: string;
55
- readonly path?: string | undefined;
56
- readonly isSelected: boolean;
57
- }[] | undefined;
58
- readonly path?: string | undefined;
59
- readonly renderable?: boolean | undefined;
60
- readonly title?: string | undefined;
61
- };
62
- };
63
- readonly pagingInfo: {
64
- readonly isLoading: boolean;
65
- readonly pageCount: number;
66
- readonly pageSize: number;
67
- readonly pageIndex: number;
68
- readonly pagesLoaded: readonly number[];
69
- readonly prevPageIndex: number;
70
- readonly totalCount: number;
71
- };
72
- readonly preloaded: boolean;
73
- readonly projectId: string;
74
- readonly queryDuration: number;
75
- readonly queryParams: {
76
- readonly contentTypeIds: readonly string[];
77
- readonly dynamicOrderBy: readonly string[];
78
- readonly pageSize: number;
79
- readonly excludeIds: readonly string[];
80
- readonly internalPaging: boolean;
81
- readonly loadMorePaging: boolean;
82
- readonly useSearchTerm: boolean;
83
- };
84
- readonly results: readonly any[];
85
- readonly tabId: number;
86
- readonly title: string;
87
- };
88
- };
89
- readonly listings: {
90
- readonly [x: string]: {
91
- readonly entries: {
92
- readonly isLoading: boolean;
93
- readonly isError: boolean;
94
- readonly error?: any;
95
- };
96
- readonly featuredEntries: {
97
- readonly isLoading: boolean;
98
- readonly isError: boolean;
99
- readonly error?: any;
100
- };
101
- readonly featuredResults: readonly any[];
102
- readonly filters: {
103
- readonly [x: string]: {
104
- readonly contentTypeId?: string | undefined;
105
- readonly customWhere?: readonly ({
106
- readonly [x: string]: any;
107
- readonly field: string;
108
- } | {
109
- readonly not: {
110
- readonly [x: string]: any;
111
- readonly field: string;
112
- };
113
- } | {
114
- readonly and: readonly {
115
- readonly [x: string]: any;
116
- readonly field: string;
117
- }[];
118
- } | {
119
- readonly or: readonly {
120
- readonly [x: string]: any;
121
- readonly field: string;
122
- }[];
123
- })[] | undefined;
124
- readonly defaultValue?: string | undefined;
125
- readonly fieldId?: string | undefined;
126
- readonly isGrouped?: boolean | undefined;
127
- readonly isSingleSelect?: boolean | undefined;
128
- readonly isLoading: boolean;
129
- readonly isError: boolean;
130
- readonly items?: readonly {
131
- readonly contentTypeId?: string | undefined;
132
- readonly title?: string | undefined;
133
- readonly type?: string | undefined;
134
- readonly key: string;
135
- readonly path?: string | undefined;
136
- readonly isSelected: boolean;
137
- }[] | undefined;
138
- readonly path?: string | undefined;
139
- readonly renderable?: boolean | undefined;
140
- readonly title?: string | undefined;
141
- };
142
- };
143
- readonly pagingInfo: {
144
- readonly isLoading: boolean;
145
- readonly pageCount: number;
146
- readonly pageSize: number;
147
- readonly pageIndex: number;
148
- readonly pagesLoaded: readonly number[];
149
- readonly prevPageIndex: number;
150
- readonly totalCount: number;
151
- };
152
- readonly preloaded: boolean;
153
- readonly projectId: string;
154
- readonly queryDuration: number;
155
- readonly queryParams: {
156
- readonly contentTypeIds: readonly string[];
157
- readonly dynamicOrderBy: readonly string[];
158
- readonly pageSize: number;
159
- readonly excludeIds: readonly string[];
160
- readonly internalPaging: boolean;
161
- readonly loadMorePaging: boolean;
162
- readonly useSearchTerm: boolean;
163
- };
164
- readonly results: readonly any[];
165
- readonly tabId: number;
166
- readonly title: string;
167
- };
168
- };
169
- readonly minilist: {
170
- readonly [x: string]: {
171
- readonly entries: {
172
- readonly isLoading: boolean;
173
- readonly isError: boolean;
174
- readonly error?: any;
175
- };
176
- readonly featuredEntries: {
177
- readonly isLoading: boolean;
178
- readonly isError: boolean;
179
- readonly error?: any;
180
- };
181
- readonly featuredResults: readonly any[];
182
- readonly filters: {
183
- readonly [x: string]: {
184
- readonly contentTypeId?: string | undefined;
185
- readonly customWhere?: readonly ({
186
- readonly [x: string]: any;
187
- readonly field: string;
188
- } | {
189
- readonly not: {
190
- readonly [x: string]: any;
191
- readonly field: string;
192
- };
193
- } | {
194
- readonly and: readonly {
195
- readonly [x: string]: any;
196
- readonly field: string;
197
- }[];
198
- } | {
199
- readonly or: readonly {
200
- readonly [x: string]: any;
201
- readonly field: string;
202
- }[];
203
- })[] | undefined;
204
- readonly defaultValue?: string | undefined;
205
- readonly fieldId?: string | undefined;
206
- readonly isGrouped?: boolean | undefined;
207
- readonly isSingleSelect?: boolean | undefined;
208
- readonly isLoading: boolean;
209
- readonly isError: boolean;
210
- readonly items?: readonly {
211
- readonly contentTypeId?: string | undefined;
212
- readonly title?: string | undefined;
213
- readonly type?: string | undefined;
214
- readonly key: string;
215
- readonly path?: string | undefined;
216
- readonly isSelected: boolean;
217
- }[] | undefined;
218
- readonly path?: string | undefined;
219
- readonly renderable?: boolean | undefined;
220
- readonly title?: string | undefined;
221
- };
222
- };
223
- readonly pagingInfo: {
224
- readonly isLoading: boolean;
225
- readonly pageCount: number;
226
- readonly pageSize: number;
227
- readonly pageIndex: number;
228
- readonly pagesLoaded: readonly number[];
229
- readonly prevPageIndex: number;
230
- readonly totalCount: number;
231
- };
232
- readonly preloaded: boolean;
233
- readonly projectId: string;
234
- readonly queryDuration: number;
235
- readonly queryParams: {
236
- readonly contentTypeIds: readonly string[];
237
- readonly dynamicOrderBy: readonly string[];
238
- readonly pageSize: number;
239
- readonly excludeIds: readonly string[];
240
- readonly internalPaging: boolean;
241
- readonly loadMorePaging: boolean;
242
- readonly useSearchTerm: boolean;
243
- };
244
- readonly results: readonly any[];
245
- readonly tabId: number;
246
- readonly title: string;
247
- };
248
- };
249
- readonly tabs: readonly {
250
- readonly currentFacet: string;
251
- readonly defaultFacet: string;
252
- readonly id: number;
253
- readonly label: string;
254
- readonly totalCount: number;
255
- }[];
256
- readonly config: {
257
- readonly [x: string]: boolean;
258
- };
259
- }>(base?: Base | undefined, action: {
4
+ declare const _default: (config: SearchConfig) => (state?: SearchState | undefined, action: {
260
5
  [key: string]: any;
261
6
  context: keyof typeof Context;
262
7
  facet: string;
263
8
  params: {
264
9
  [key: string]: string;
265
10
  };
266
- }) => import("immer/dist/internal").WritableDraft<SearchState> | Base;
11
+ }) => SearchState;
267
12
  export default _default;
@@ -49,7 +49,7 @@ export declare const searchTab: {
49
49
  label: undefined;
50
50
  totalCount: string;
51
51
  };
52
- export declare const filtering: Omit<Filter, "customWhere" | "items"> & {
52
+ export declare const filtering: Omit<Filter, "items" | "customWhere"> & {
53
53
  customWhere?: CustomWhereClause[] | undefined;
54
54
  items?: FilterItem[] | undefined;
55
55
  };
@@ -40,10 +40,10 @@ export declare const getTotalCount: (state: AppState, current?: string, context?
40
40
  export declare const getSearchTerm: (state: AppState) => string;
41
41
  export declare const getSearchTabs: (state: AppState, returnType?: StateType) => Tab[];
42
42
  export declare const getQueryParams: (state: AppState, current?: string, context?: Context) => Record<string, any>;
43
- export declare const getQueryParameter: <K extends keyof SearchQueryParams, K2 extends "internalPaging" | "linkDepth" | "loadMorePaging" | keyof import("../models/Queries").SearchQueryOptions | "env" | "internalPageIndex" | "pagesLoaded" | "prevPageIndex" | "projectId" | "selectedFilters">({ state, facet, context, }: {
43
+ export declare const getQueryParameter: <K extends keyof SearchQueryParams, K2 extends "projectId" | "linkDepth" | "internalPaging" | "loadMorePaging" | keyof import("../models/Queries").SearchQueryOptions | "env" | "internalPageIndex" | "pagesLoaded" | "prevPageIndex" | "selectedFilters">({ state, facet, context, }: {
44
44
  state: AppState;
45
- facet?: string | undefined;
46
- context?: Context | undefined;
45
+ facet?: string;
46
+ context?: Context;
47
47
  }, key: K | K2, ifnull?: any) => SearchQueryParams[K] | QueryParams2[K2];
48
48
  export declare const getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType) => CustomApi;
49
49
  export declare const getCustomEnv: (state: AppState, current: string, context?: Context) => any;
@@ -76,7 +76,7 @@ export declare const selectFacets: {
76
76
  getQueryParams: (state: AppState, facet: string) => Record<string, any>;
77
77
  getQueryParameter: ({ state, facet }: {
78
78
  state: AppState;
79
- facet?: string | undefined;
79
+ facet?: string;
80
80
  }, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
81
81
  getRenderableFilters: (state: AppState, facet?: string, context?: Context) => Filters;
82
82
  getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType) => any[];
@@ -105,7 +105,7 @@ export declare const selectListing: {
105
105
  getQueryParams: (state: AppState, listing?: string) => Record<string, any>;
106
106
  getQueryParameter: ({ state, facet }: {
107
107
  state: AppState;
108
- facet?: string | undefined;
108
+ facet?: string;
109
109
  }, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
110
110
  getRenderableFilters: (state: AppState, listing?: string) => Filters;
111
111
  getResults: (state: AppState, listing?: string) => any[];
@@ -4,9 +4,9 @@ export function GetDeliveryApiStatusFromHostname(currentHostname: any): "publish
4
4
  export const deliveryApi: DeliveryApi;
5
5
  export const cachedSearch: CachedSearch;
6
6
  declare class DeliveryApi {
7
- search(query: any, linkDepth: any, project: any, env: any): Promise<import("contensis-core-api").PagedList<import("contensis-delivery-api/lib/models").Entry>>;
7
+ search(query: any, linkDepth: any, project: any, env: any): Promise<import("contensis-core-api").PagedList<import("contensis-delivery-api").Entry>>;
8
8
  getClient(deliveryApiStatus: string | undefined, project: any, env: any): Client;
9
- getEntry(id: any, linkDepth: number | undefined, deliveryApiStatus: string | undefined, project: any, env: any): Promise<import("contensis-delivery-api/lib/models").Entry>;
9
+ getEntry(id: any, linkDepth: number | undefined, deliveryApiStatus: string | undefined, project: any, env: any): Promise<import("contensis-delivery-api").Entry>;
10
10
  }
11
11
  declare class CachedSearch {
12
12
  cache: LruCache;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  export declare const toJS: <Props extends {
3
3
  [key: string]: any;
4
- }>(WrappedComponent: React.ComponentType<Props>) => React.ComponentType<Props>;
4
+ }>(WrappedComponent: (props: Props) => React.JSX.Element) => (wrappedComponentProps: Props) => React.JSX.Element;
@@ -6,9 +6,9 @@ export declare const contentTypeIdExpression: (contentTypeIds: string[], webpage
6
6
  export declare const filterExpressions: (filters: FilterExpression[], isOptional?: boolean) => IExpression[];
7
7
  export declare const dataFormatExpression: (contentTypeIds: string[], dataFormat?: string) => ILogicalExpression[];
8
8
  export declare const featuredResultsExpression: ({ contentTypeId, fieldId, fieldValue, }?: {
9
- contentTypeId?: string | string[] | undefined;
10
- fieldId?: string | string[] | undefined;
11
- fieldValue?: boolean | undefined;
9
+ contentTypeId?: string | string[];
10
+ fieldId?: string | string[];
11
+ fieldValue?: boolean;
12
12
  }) => IExpression[];
13
13
  export declare const languagesExpression: (languages: string[]) => IExpression[];
14
14
  export declare const includeInSearchExpressions: (webpageTemplates: string[], includeInSearchFields: string[]) => IExpression[];
@@ -3,6 +3,21 @@ import { PagedList, Query } from 'contensis-core-api';
3
3
  import { CustomApi } from '../models/Search';
4
4
  import { TimedSearchResponse } from '../models/SearchUtil';
5
5
  export declare function fixFreeTextForElastic(s: string): string;
6
+ /** `convertKeyForAggregation` and `parseKeyForAggregation` exists to prevent an
7
+ * auto-generated aggregation using a reserved keyword because Elasticsearch has a list of
8
+ * reserved keywords when it parses the response:
9
+ * `'location' is one of the reserved aggregation keywords we use a heuristics based
10
+ * response parser and using these reserved keywords could throw its heuristics off
11
+ * course. We are working on a solution in Elasticsearch itself to make the response
12
+ * parseable. For now these are all the reserved keywords: after_key, _as_string,
13
+ * bg_count, bottom_right, bounds, buckets, count, doc_count, doc_count_error_upper_bound,
14
+ * fields, from, top, type, from_as_string, hits, key, key_as_string, keys, location,
15
+ * max_score, meta, min, min_length, score, sum_other_doc_count, to, to_as_string, top_left,
16
+ * total, value, value_as_string, values, geometry, properties`
17
+ */
18
+ export declare const convertKeyForAggregation: (key: string) => string;
19
+ export declare const parseKeyForAggregation: (key: string) => string;
20
+ export declare const convertFieldIdForAggregation: (fieldId: string) => string;
6
21
  export declare const timedSearch: (query: Query, linkDepth?: number, projectId?: string, env?: string) => Promise<null | TimedSearchResponse>;
7
22
  export declare const getItemsFromResult: (result?: {
8
23
  duration: number;
@@ -24,8 +39,8 @@ export declare const routeParams: (staticRoute?: any, location?: {
24
39
  [key: string]: any;
25
40
  pathname: string;
26
41
  search: string;
27
- hash?: string | undefined;
28
- } | undefined) => any;
42
+ hash?: string;
43
+ }) => any;
29
44
  export declare const callCustomApi: <T>(customApi: CustomApi, filters: {
30
45
  [key: string]: string;
31
46
  }) => Promise<T>;
@@ -1,5 +1,4 @@
1
- import { default as mapSearchResultToState } from 'jsonpath-mapper';
2
- import MappingTemplate from 'jsonpath-mapper/dist/models/Template';
1
+ import { default as mapSearchResultToState, MappingTemplate } from 'jsonpath-mapper';
3
2
  import { LoadFiltersSearchResults } from '../models/SearchActions';
4
3
  export declare const facetTemplate: any;
5
4
  export declare const filterTemplate: MappingTemplate<LoadFiltersSearchResults>;
@@ -5,3 +5,4 @@ export declare const CacheDuration: {
5
5
  expressStatic: string;
6
6
  };
7
7
  export declare const getCacheDuration: (status?: number) => string;
8
+ export declare const anyUpdateHeader: string;
@@ -6,7 +6,7 @@ type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
6
6
  type SearchQueryArgs = WithOptional<SearchQueryOptions & {
7
7
  idFilters?: SearchQueryOptions['filters'];
8
8
  sharedFilters?: SearchQueryOptions['filters'];
9
- }, 'assetTypes' | 'customWhere' | 'dynamicOrderBy' | 'excludeIds' | 'featuredResults' | 'fields' | 'includeInSearchFields' | 'languages' | 'omitDefaultSearchFields' | 'orderBy' | 'pageIndex' | 'searchTerm' | 'webpageTemplates' | 'weightedSearchFields'>;
9
+ }, 'aggregations' | 'assetTypes' | 'customWhere' | 'dynamicOrderBy' | 'excludeIds' | 'featuredResults' | 'fieldLinkDepths' | 'fields' | 'includeInSearchFields' | 'languages' | 'omitDefaultSearchFields' | 'orderBy' | 'pageIndex' | 'searchTerm' | 'webpageTemplates' | 'weightedSearchFields'>;
10
10
  /**
11
11
  * Builds our complete Delivery API Query object from a set of provided arguments
12
12
  * @param queryParams
@@ -1,5 +1,5 @@
1
1
  declare const staticAssets: (app: any, { appRootPath, scripts, startupScriptFilename, staticFolderPath, staticRoutePath, staticRoutePaths, }: {
2
- appRootPath?: any;
2
+ appRootPath?: string | undefined;
3
3
  scripts?: {
4
4
  attributes?: {
5
5
  [key: string]: string;
@@ -4,7 +4,7 @@ import { Express } from 'express';
4
4
  import http from 'http';
5
5
  import React from 'react';
6
6
  import { deliveryProxy } from './features/reverse-proxy';
7
- import { ServerConfig } from "../config";
7
+ import { ServerConfig } from "../models";
8
8
  type Exporting = {
9
9
  app: Express;
10
10
  apiProxy: typeof deliveryProxy;
@@ -1,5 +1,5 @@
1
1
  import { ChunkExtractor } from '@loadable/server';
2
- import { ServerConfig } from "../../config";
2
+ import { ServerConfig } from "../../models";
3
3
  export declare const loadableBundleData: ({ stats, templates }: ServerConfig, staticRoutePath: string, build?: string) => {
4
4
  stats?: string | null | undefined;
5
5
  templates?: {
@@ -1,5 +1,5 @@
1
1
  import { Response } from 'express';
2
- import { AppState } from "../../redux/appstate";
2
+ import { AppState } from "../../models";
3
3
  export declare const addStandardHeaders: (state: AppState, response: Response, packagejson: any, groups: {
4
4
  globalGroups?: any[];
5
5
  allowedGroups?: any[];
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Express } from 'express';
3
- import { ServerConfig } from "../config";
3
+ import { ServerConfig } from "../models";
4
4
  declare const webApp: (app: Express, ReactApp: React.ComponentType<any>, config: ServerConfig & {
5
5
  allowedGroups?: string[];
6
6
  globalGroups?: string[];
@@ -7,4 +7,4 @@ declare const _default: (wrappedComponentProps: {
7
7
  logoutUser: any;
8
8
  }) => React.JSX.Element;
9
9
  export default _default;
10
- import React from "react";
10
+ import React from 'react';
@@ -6,11 +6,11 @@ declare function LoginForm({ authenticationError, loading, loginUser }: {
6
6
  }): React.JSX.Element;
7
7
  declare namespace LoginForm {
8
8
  namespace propTypes {
9
- const loginException: PropTypes.Requireable<boolean>;
10
- const authenticationError: PropTypes.Requireable<boolean>;
11
- const loading: PropTypes.Requireable<boolean>;
12
- const loginUser: PropTypes.Requireable<(...args: any[]) => any>;
9
+ let loginException: PropTypes.Requireable<boolean>;
10
+ let authenticationError: PropTypes.Requireable<boolean>;
11
+ let loading: PropTypes.Requireable<boolean>;
12
+ let loginUser: PropTypes.Requireable<(...args: any[]) => any>;
13
13
  }
14
14
  }
15
- import React from "react";
16
- import PropTypes from "prop-types";
15
+ import React from 'react';
16
+ import PropTypes from 'prop-types';
@@ -5,9 +5,9 @@ declare function LogoutForm({ logoutUser, user }: {
5
5
  }): React.JSX.Element;
6
6
  declare namespace LogoutForm {
7
7
  namespace propTypes {
8
- const logoutUser: PropTypes.Requireable<(...args: any[]) => any>;
9
- const user: PropTypes.Requireable<object>;
8
+ let logoutUser: PropTypes.Requireable<(...args: any[]) => any>;
9
+ let user: PropTypes.Requireable<object>;
10
10
  }
11
11
  }
12
- import React from "react";
13
- import PropTypes from "prop-types";
12
+ import React from 'react';
13
+ import PropTypes from 'prop-types';
@@ -1,2 +1,2 @@
1
1
  export default LoginStyled;
2
- declare const LoginStyled: any;
2
+ declare const LoginStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,2 +1,2 @@
1
1
  export default LoginFormStyled;
2
- declare const LoginFormStyled: any;
2
+ declare const LoginFormStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,7 +1,7 @@
1
- export default withLogin;
2
- declare function withLogin(WrappedComponent: any): {
1
+ import React from 'react';
2
+ declare const withLogin: (WrappedComponent: React.ComponentType) => {
3
3
  (): React.JSX.Element;
4
4
  displayName: string;
5
- WrappedComponent: any;
5
+ WrappedComponent: React.ComponentType<{}>;
6
6
  };
7
- import React from "react";
7
+ export default withLogin;
@@ -1,7 +1,6 @@
1
- export default useLogin;
2
- declare function useLogin(): {
3
- loginUser: (username: any, password: any) => any;
4
- logoutUser: (redirectPath: any) => any;
1
+ declare const useLogin: () => {
2
+ loginUser: (username: string, password: string) => any;
3
+ logoutUser: (redirectPath?: string) => any;
5
4
  errorMessage: any;
6
5
  isAuthenticated: any;
7
6
  isAuthenticationError: any;
@@ -12,3 +11,4 @@ declare function useLogin(): {
12
11
  authenticationErrorMessage: any;
13
12
  error: any;
14
13
  };
14
+ export default useLogin;
@@ -1,6 +1,7 @@
1
- export function loginUser(username: any, password: any, cookies: any): any;
2
- export function logoutUser(redirectPath: any, cookies: any): any;
3
- export function registerUser(user: any, mappers: any): any;
4
- export function requestPasswordReset(userEmailObject: any): any;
5
- export function resetPassword(resetPasswordObject: any): any;
6
- export function changePassword(userId: any, currentPassword: any, newPassword: any): any;
1
+ import { CookieHelper } from '../util/CookieHelper.class';
2
+ export declare const loginUser: (username: string, password: string, cookies?: CookieHelper) => any;
3
+ export declare const logoutUser: (redirectPath?: string, cookies?: CookieHelper) => any;
4
+ export declare const registerUser: (user: any, mappers: any) => any;
5
+ export declare const requestPasswordReset: (userEmailObject: any) => any;
6
+ export declare const resetPassword: (resetPasswordObject: any) => any;
7
+ export declare const changePassword: (userId: any, currentPassword: any, newPassword: any) => any;
@@ -1 +1 @@
1
- export const userSagas: import("redux-saga/effects").ForkEffect<never>[];
1
+ export declare const userSagas: import("redux-saga/effects").ForkEffect<never>[];
@@ -1,9 +1,5 @@
1
- export function handleRequiresLoginSaga(action: any): Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").CallEffect<Generator<import("redux-saga/effects").SelectEffect | Promise<undefined[] | Error[] | {
2
- message: string;
3
- }[] | {
4
- message: string;
5
- data: any;
6
- }[]> | import("redux-saga/effects").PutEffect<{
1
+ export declare const loginSagas: import("redux-saga/effects").ForkEffect<never>[];
2
+ export declare function handleRequiresLoginSaga(action: any): Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").CallEffect<Generator<import("redux-saga/effects").SelectEffect | Promise<any[]> | import("redux-saga/effects").PutEffect<{
7
3
  type: string;
8
4
  authenticationState: {
9
5
  isLoading: boolean;
@@ -15,15 +11,8 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
15
11
  errorMessage: any;
16
12
  };
17
13
  }> | import("redux-saga/effects").CallEffect<Generator<Promise<{
18
- authenticationState: {
19
- clientCredentials: null;
20
- isAuthenticated: boolean;
21
- isAuthenticationError: boolean;
22
- isError: boolean;
23
- };
24
- user: Error | {
25
- groups: any;
26
- } | null | undefined;
14
+ authenticationState: import("../../state").AuthenticationState;
15
+ user: any;
27
16
  }> | import("redux-saga/effects").PutEffect<{
28
17
  type: string;
29
18
  authenticationState: any;
@@ -36,5 +25,4 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
36
25
  cookies: any;
37
26
  securityToken: any;
38
27
  }>, any, any>;
39
- export function refreshSecurityToken(): Generator<any, void, unknown>;
40
- export const loginSagas: import("redux-saga/effects").ForkEffect<never>[];
28
+ export declare function refreshSecurityToken(): Generator<any, void, unknown>;