@zengenti/contensis-react-base 3.0.2-beta.9 → 3.1.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 (140) hide show
  1. package/README.md +38 -2
  2. package/cjs/{App-81a45001.js → App-7ff737fa.js} +70 -34
  3. package/cjs/App-7ff737fa.js.map +1 -0
  4. package/cjs/{login-51b66359.js → ChangePassword.container-a617190b.js} +246 -84
  5. package/cjs/ChangePassword.container-a617190b.js.map +1 -0
  6. package/cjs/{ContensisDeliveryApi-de88df2a.js → ContensisDeliveryApi-9e32960d.js} +156 -122
  7. package/cjs/ContensisDeliveryApi-9e32960d.js.map +1 -0
  8. package/cjs/CookieConstants-000427db.js +10 -0
  9. package/cjs/CookieConstants-000427db.js.map +1 -0
  10. package/cjs/{RouteLoader-47d70a26.js → RouteLoader-049e81e5.js} +8 -5
  11. package/cjs/RouteLoader-049e81e5.js.map +1 -0
  12. package/cjs/{ToJs-61c03582.js → ToJs-149fc5e1.js} +49 -2
  13. package/cjs/ToJs-149fc5e1.js.map +1 -0
  14. package/cjs/_commonjsHelpers-b3309d7b.js +11 -0
  15. package/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  16. package/cjs/client.js +14 -12
  17. package/cjs/client.js.map +1 -1
  18. package/cjs/contensis-react-base.js +46 -360
  19. package/cjs/contensis-react-base.js.map +1 -1
  20. package/cjs/forms.js +3495 -127
  21. package/cjs/forms.js.map +1 -1
  22. package/cjs/redux.js +3 -4
  23. package/cjs/redux.js.map +1 -1
  24. package/cjs/routing.js +4 -3
  25. package/cjs/routing.js.map +1 -1
  26. package/cjs/{sagas-6d12e7ca.js → sagas-e04b94c1.js} +44 -20
  27. package/cjs/sagas-e04b94c1.js.map +1 -0
  28. package/cjs/search.js +13 -13
  29. package/cjs/search.js.map +1 -1
  30. package/cjs/{selectors-c76c2676.js → selectors-46b689d0.js} +11 -11
  31. package/cjs/selectors-46b689d0.js.map +1 -0
  32. package/cjs/user.js +33 -159
  33. package/cjs/user.js.map +1 -1
  34. package/cjs/util.js +6 -4
  35. package/cjs/util.js.map +1 -1
  36. package/cjs/{version-38afaf2a.js → version-79a027cb.js} +12 -23
  37. package/cjs/version-79a027cb.js.map +1 -0
  38. package/cjs/{version-886f49d8.js → version-afd4f77e.js} +3 -3
  39. package/cjs/{version-886f49d8.js.map → version-afd4f77e.js.map} +1 -1
  40. package/esm/{App-5f914483.js → App-ff944c78.js} +64 -29
  41. package/esm/App-ff944c78.js.map +1 -0
  42. package/esm/{login-4d07c2de.js → ChangePassword.container-ae0f9ce4.js} +229 -78
  43. package/esm/ChangePassword.container-ae0f9ce4.js.map +1 -0
  44. package/esm/{ContensisDeliveryApi-ad06857d.js → ContensisDeliveryApi-c66b0cc3.js} +155 -123
  45. package/esm/ContensisDeliveryApi-c66b0cc3.js.map +1 -0
  46. package/esm/CookieConstants-3d3b6531.js +6 -0
  47. package/esm/CookieConstants-3d3b6531.js.map +1 -0
  48. package/esm/{RouteLoader-f5d5f733.js → RouteLoader-02eef6d9.js} +8 -5
  49. package/esm/RouteLoader-02eef6d9.js.map +1 -0
  50. package/esm/{ToJs-0066e629.js → ToJs-ae860aad.js} +49 -3
  51. package/esm/ToJs-ae860aad.js.map +1 -0
  52. package/esm/_commonjsHelpers-1789f0cf.js +8 -0
  53. package/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  54. package/esm/client.js +15 -13
  55. package/esm/client.js.map +1 -1
  56. package/esm/contensis-react-base.js +45 -360
  57. package/esm/contensis-react-base.js.map +1 -1
  58. package/esm/forms.js +3497 -129
  59. package/esm/forms.js.map +1 -1
  60. package/esm/redux.js +6 -7
  61. package/esm/redux.js.map +1 -1
  62. package/esm/routing.js +4 -3
  63. package/esm/routing.js.map +1 -1
  64. package/esm/{sagas-53d2aefb.js → sagas-933a8fc8.js} +44 -20
  65. package/esm/sagas-933a8fc8.js.map +1 -0
  66. package/esm/search.js +14 -14
  67. package/esm/search.js.map +1 -1
  68. package/esm/{selectors-3f0d804d.js → selectors-01074974.js} +11 -12
  69. package/esm/selectors-01074974.js.map +1 -0
  70. package/esm/user.js +21 -151
  71. package/esm/user.js.map +1 -1
  72. package/esm/util.js +4 -4
  73. package/esm/{version-f4629693.js → version-0fbd1b82.js} +3 -3
  74. package/esm/{version-f4629693.js.map → version-0fbd1b82.js.map} +1 -1
  75. package/esm/{version-dd31c7f0.js → version-346a9787.js} +13 -23
  76. package/esm/version-346a9787.js.map +1 -0
  77. package/models/client/client.d.ts +1 -1
  78. package/models/config.d.ts +4 -4
  79. package/models/redux/appstate.d.ts +2 -1
  80. package/models/routing/redux/actions.d.ts +10 -6
  81. package/models/routing/redux/selectors.d.ts +5 -4
  82. package/models/routing/redux/types.d.ts +0 -1
  83. package/models/routing/routes.d.ts +20 -17
  84. package/models/routing/util/queries.d.ts +3 -2
  85. package/models/search/models/Queries.d.ts +9 -10
  86. package/models/search/models/Search.d.ts +26 -24
  87. package/models/search/models/SearchActions.d.ts +36 -36
  88. package/models/search/models/SearchState.d.ts +11 -11
  89. package/models/search/models/SearchUtil.d.ts +1 -1
  90. package/models/search/models/WithSearch.d.ts +1 -1
  91. package/models/search/redux/actions.d.ts +7 -7
  92. package/models/search/redux/selectors.d.ts +27 -27
  93. package/models/search/redux/types.d.ts +21 -21
  94. package/models/search/redux/util.d.ts +2 -2
  95. package/models/search/search/ContensisDeliveryApi.d.ts +1 -1
  96. package/models/search/search/expressions.d.ts +4 -4
  97. package/models/search/search/util.d.ts +2 -2
  98. package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
  99. package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
  100. package/models/server/features/linkdepth-api/search.d.ts +3 -3
  101. package/models/server/internalServer.d.ts +7 -5
  102. package/models/server/util/bundles.d.ts +2 -2
  103. package/models/server/util/handleExceptions.d.ts +1 -1
  104. package/models/testImmer/redux/reducer.d.ts +1 -1
  105. package/models/user/components/Login.d.ts +2 -3
  106. package/models/user/containers/ChangePassword.container.d.ts +2 -2
  107. package/models/user/containers/ForgotPassword.container.d.ts +2 -2
  108. package/models/user/containers/Login.container.d.ts +2 -2
  109. package/models/user/containers/Registration.container.d.ts +2 -2
  110. package/models/user/hocs/withLogin.d.ts +5 -11
  111. package/models/user/hocs/withRegistration.d.ts +2 -8
  112. package/models/user/redux/actions.d.ts +2 -2
  113. package/models/user/redux/sagas/login.d.ts +9 -8
  114. package/models/user/redux/selectors.d.ts +4 -4
  115. package/models/user/util/CookieConstants.d.ts +8 -0
  116. package/models/user/util/CookieHelper.class.d.ts +15 -3
  117. package/models/user/util/LoginHelper.class.d.ts +27 -23
  118. package/models/util/CachedDeliveryApi.d.ts +25 -0
  119. package/models/util/ContensisDeliveryApi.d.ts +20 -44
  120. package/models/util/LruCache.d.ts +12 -0
  121. package/models/util/ToJs.d.ts +1 -1
  122. package/models/util/index.d.ts +1 -1
  123. package/models/util/json-mapper.d.ts +1 -1
  124. package/package.json +10 -11
  125. package/cjs/App-81a45001.js.map +0 -1
  126. package/cjs/ContensisDeliveryApi-de88df2a.js.map +0 -1
  127. package/cjs/RouteLoader-47d70a26.js.map +0 -1
  128. package/cjs/ToJs-61c03582.js.map +0 -1
  129. package/cjs/login-51b66359.js.map +0 -1
  130. package/cjs/sagas-6d12e7ca.js.map +0 -1
  131. package/cjs/selectors-c76c2676.js.map +0 -1
  132. package/cjs/version-38afaf2a.js.map +0 -1
  133. package/esm/App-5f914483.js.map +0 -1
  134. package/esm/ContensisDeliveryApi-ad06857d.js.map +0 -1
  135. package/esm/RouteLoader-f5d5f733.js.map +0 -1
  136. package/esm/ToJs-0066e629.js.map +0 -1
  137. package/esm/login-4d07c2de.js.map +0 -1
  138. package/esm/sagas-53d2aefb.js.map +0 -1
  139. package/esm/selectors-3f0d804d.js.map +0 -1
  140. package/esm/version-dd31c7f0.js.map +0 -1
@@ -2,13 +2,13 @@ import { Context } from '../models/Enums';
2
2
  import { QueryParams as QueryParams2 } from '../models/Queries';
3
3
  import { CustomApi, SearchQueryParams } from '../models/Search';
4
4
  import { AppState, Facet, Facets, Filters, Paging, SelectedFilters, Tab } from '../models/SearchState';
5
- declare type StateType = 'immutable' | 'js';
5
+ type StateType = 'immutable' | 'js';
6
6
  export declare const getSearchContext: (state: AppState) => Context;
7
7
  export declare const getCurrent: (state: AppState, context?: Context) => string;
8
8
  export declare const getCurrentFacet: (state: AppState) => string;
9
9
  export declare const getCurrentListing: (state: AppState) => string;
10
10
  export declare const getCurrentTab: (state: AppState) => number;
11
- export declare const getFacets: (state: AppState, returnType?: StateType | undefined) => Facets;
11
+ export declare const getFacets: (state: AppState, returnType?: StateType) => Facets;
12
12
  export declare const getTabFacets: (state: AppState) => {
13
13
  [k: string]: Facet;
14
14
  };
@@ -18,19 +18,19 @@ export declare const getFacetTitles: (state: AppState) => {
18
18
  title: string | undefined;
19
19
  totalCount: number;
20
20
  }[];
21
- export declare const getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType | undefined) => Facet;
21
+ export declare const getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType) => Facet;
22
22
  export declare const getListing: (state: AppState, listing?: string) => Facet;
23
- export declare const getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => Filters;
23
+ export declare const getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType) => Filters;
24
24
  export declare const getRenderableFilters: (state: AppState, facet?: string, context?: Context) => Filters;
25
- export declare const getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => string[];
26
- export declare const getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) => SelectedFilters;
27
- export declare const getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
25
+ export declare const getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType) => string[];
26
+ export declare const getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType) => SelectedFilters;
27
+ export declare const getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType) => any[];
28
28
  export declare const getIsInternalPaging: (state: AppState, current: string, context?: Context) => boolean;
29
- export declare const getIsLoaded: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
30
- export declare const getIsLoading: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
29
+ export declare const getIsLoaded: (state: AppState, context?: Context, facet?: string) => boolean;
30
+ export declare const getIsLoading: (state: AppState, context?: Context, facet?: string) => boolean;
31
31
  export declare const getIsSsr: (state: AppState) => boolean;
32
- export declare const getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
33
- export declare const getPaging: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => Paging;
32
+ export declare const getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType) => any[];
33
+ export declare const getPaging: (state: AppState, current?: string, context?: Context, returnType?: StateType) => Paging;
34
34
  export declare const getPageIndex: (state: AppState, current?: string, context?: Context) => number;
35
35
  export declare const getPageSize: (state: AppState, current?: string, context?: Context) => number;
36
36
  export declare const getPrevPageIndex: (state: AppState, current?: string, context?: Context) => number;
@@ -38,57 +38,57 @@ export declare const getPageIsLoading: (state: AppState, current?: string, conte
38
38
  export declare const getPagesLoaded: (state: AppState, current?: string, context?: Context) => number[];
39
39
  export declare const getTotalCount: (state: AppState, current?: string, context?: Context) => number;
40
40
  export declare const getSearchTerm: (state: AppState) => string;
41
- export declare const getSearchTabs: (state: AppState, returnType?: StateType | undefined) => Tab[];
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
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, }: {
44
44
  state: AppState;
45
45
  facet?: string | undefined;
46
46
  context?: Context | undefined;
47
47
  }, key: K | K2, ifnull?: any) => SearchQueryParams[K] | QueryParams2[K2];
48
- export declare const getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType | undefined) => CustomApi;
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;
50
- export declare const getTabsAndFacets: (state: AppState, returnType?: StateType | undefined) => any;
50
+ export declare const getTabsAndFacets: (state: AppState, returnType?: StateType) => any;
51
51
  export declare const getSearchTotalCount: (state: AppState) => number;
52
52
  export declare const getFacetsTotalCount: (state: AppState) => number;
53
53
  export declare const selectFacets: {
54
54
  getCurrent: (state: AppState) => string;
55
55
  getCurrentTab: (state: AppState) => number;
56
- getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType | undefined) => CustomApi;
56
+ getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType) => CustomApi;
57
57
  getCustomEnv: (state: AppState, current: string, context?: Context) => any;
58
- getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType | undefined) => Facet;
58
+ getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType) => Facet;
59
59
  getFacetTitles: (state: AppState) => {
60
60
  isSelected: boolean;
61
61
  key: string;
62
62
  title: string | undefined;
63
63
  totalCount: number;
64
64
  }[];
65
- getFacets: (state: AppState, returnType?: StateType | undefined) => Facets;
65
+ getFacets: (state: AppState, returnType?: StateType) => Facets;
66
66
  getFacetsTotalCount: (state: AppState) => number;
67
- getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
68
- getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => Filters;
69
- getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => string[];
70
- getIsLoaded: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
71
- getIsLoading: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
67
+ getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType) => any[];
68
+ getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType) => Filters;
69
+ getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType) => string[];
70
+ getIsLoaded: (state: AppState, context?: Context, facet?: string) => boolean;
71
+ getIsLoading: (state: AppState, context?: Context, facet?: string) => boolean;
72
72
  getPageIndex: (state: AppState, current?: string, context?: Context) => number;
73
73
  getPageIsLoading: (state: AppState, current?: string, context?: Context) => boolean;
74
74
  getPagesLoaded: (state: AppState, current?: string, context?: Context) => number[];
75
- getPaging: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => Paging;
75
+ getPaging: (state: AppState, current?: string, context?: Context, returnType?: StateType) => Paging;
76
76
  getQueryParams: (state: AppState, facet: string) => Record<string, any>;
77
77
  getQueryParameter: ({ state, facet }: {
78
78
  state: AppState;
79
79
  facet?: string | undefined;
80
80
  }, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
81
81
  getRenderableFilters: (state: AppState, facet?: string, context?: Context) => Filters;
82
- getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
82
+ getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType) => any[];
83
83
  getTabFacets: (state: AppState) => {
84
84
  [k: string]: Facet;
85
85
  };
86
- getTabsAndFacets: (state: AppState, returnType?: StateType | undefined) => any;
86
+ getTabsAndFacets: (state: AppState, returnType?: StateType) => any;
87
87
  getTotalCount: (state: AppState, current?: string, context?: Context) => number;
88
- getSearchTabs: (state: AppState, returnType?: StateType | undefined) => Tab[];
88
+ getSearchTabs: (state: AppState, returnType?: StateType) => Tab[];
89
89
  getSearchTerm: (state: AppState) => string;
90
90
  getSearchTotalCount: (state: AppState) => number;
91
- getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) => SelectedFilters;
91
+ getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType) => SelectedFilters;
92
92
  };
93
93
  export declare const selectListing: {
94
94
  getCurrent: (state: AppState) => string;
@@ -1,21 +1,21 @@
1
- export declare const APPLY_CONFIG: string;
2
- export declare const CLEAR_FILTERS: string;
3
- export declare const DO_SEARCH: string;
4
- export declare const EXECUTE_SEARCH: string;
5
- export declare const EXECUTE_SEARCH_ERROR: string;
6
- export declare const EXECUTE_SEARCH_PRELOAD: string;
7
- export declare const LOAD_FILTERS: string;
8
- export declare const LOAD_FILTERS_COMPLETE: string;
9
- export declare const LOAD_FILTERS_ERROR: string;
10
- export declare const SET_FEATURED_ENTRIES: string;
11
- export declare const SET_ROUTE_FILTERS: string;
12
- export declare const SET_SEARCH_FILTERS: string;
13
- export declare const SET_SEARCH_ENTRIES: string;
14
- export declare const SET_SELECTED_FILTER: string;
15
- export declare const UPDATE_CURRENT_FACET: string;
16
- export declare const UPDATE_CURRENT_TAB: string;
17
- export declare const UPDATE_SORT_ORDER: string;
18
- export declare const UPDATE_PAGE_INDEX: string;
19
- export declare const UPDATE_PAGE_SIZE: string;
20
- export declare const UPDATE_SEARCH_TERM: string;
21
- export declare const UPDATE_SELECTED_FILTERS: string;
1
+ export declare const APPLY_CONFIG = "@SEARCH/APPLY_CONFIG";
2
+ export declare const CLEAR_FILTERS = "@SEARCH/CLEAR_FILTERS";
3
+ export declare const DO_SEARCH = "@SEARCH/DO_SEARCH";
4
+ export declare const EXECUTE_SEARCH = "@SEARCH/EXECUTE_SEARCH";
5
+ export declare const EXECUTE_SEARCH_ERROR = "@SEARCH/EXECUTE_SEARCH_ERROR";
6
+ export declare const EXECUTE_SEARCH_PRELOAD = "@SEARCH/EXECUTE_SEARCH_PRELOAD";
7
+ export declare const LOAD_FILTERS = "@SEARCH/LOAD_FILTERS";
8
+ export declare const LOAD_FILTERS_COMPLETE = "@SEARCH/LOAD_FILTERS_COMPLETE";
9
+ export declare const LOAD_FILTERS_ERROR = "@SEARCH/LOAD_FILTERS_ERROR";
10
+ export declare const SET_FEATURED_ENTRIES = "@SEARCH/SET_FEATURED_ENTRIES";
11
+ export declare const SET_ROUTE_FILTERS = "@SEARCH/SET_ROUTE_FILTERS";
12
+ export declare const SET_SEARCH_FILTERS = "@SEARCH/SET_SEARCH_FILTERS";
13
+ export declare const SET_SEARCH_ENTRIES = "@SEARCH/SET_SEARCH_ENTRIES";
14
+ export declare const SET_SELECTED_FILTER = "@SEARCH/SET_SELECTED_FILTER";
15
+ export declare const UPDATE_CURRENT_FACET = "@SEARCH/UPDATE_CURRENT_FACET";
16
+ export declare const UPDATE_CURRENT_TAB = "@SEARCH/UPDATE_CURRENT_TAB";
17
+ export declare const UPDATE_SORT_ORDER = "@SEARCH/UPDATE_SORT_ORDER";
18
+ export declare const UPDATE_PAGE_INDEX = "@SEARCH/UPDATE_PAGE_INDEX";
19
+ export declare const UPDATE_PAGE_SIZE = "@SEARCH/UPDATE_PAGE_SIZE";
20
+ export declare const UPDATE_SEARCH_TERM = "@SEARCH/UPDATE_SEARCH_TERM";
21
+ export declare const UPDATE_SELECTED_FILTERS = "@SEARCH/UPDATE_SELECTED_FILTERS";
@@ -21,6 +21,6 @@ export declare const runSearch: (action: EnsureSearchAction | SetSearchEntriesAc
21
21
  * @param action
22
22
  * @returns true or false
23
23
  */
24
- export declare const filterParamsChanged: (action: EnsureSearchAction | SetSearchEntriesAction, state?: AppState | undefined) => boolean;
24
+ export declare const filterParamsChanged: (action: EnsureSearchAction | SetSearchEntriesAction, state?: AppState) => boolean;
25
25
  export declare const debugExecuteSearch: (action: EnsureSearchAction | SetSearchEntriesAction, state: AppState) => void;
26
- export declare const scrollTop: (scrollYPos: number) => void;
26
+ export declare const scrollTo: (scrollToElement: string) => void;
@@ -18,7 +18,7 @@ declare class CachedSearch {
18
18
  getTaxonomyId(node: any): any;
19
19
  fetch(uri: any, opts?: {}): any;
20
20
  }
21
- import { Client } from "contensis-delivery-api";
21
+ import { Client } from 'contensis-delivery-api';
22
22
  declare class LruCache {
23
23
  constructor(limit?: number);
24
24
  map: {};
@@ -1,8 +1,8 @@
1
1
  import { ContensisQueryOrderBy, IExpression, ILogicalExpression, VersionStatus } from 'contensis-core-api';
2
2
  import { CustomWhereClause, WeightedSearchField } from '../models/Search';
3
3
  import { FieldOperators, FilterExpression } from '../models/Queries';
4
- export declare const fieldExpression: (field: string | string[], value: any, operator?: FieldOperators, weight?: number | undefined, fuzzySearch?: boolean) => IExpression[];
5
- export declare const contentTypeIdExpression: (contentTypeIds: string[], webpageTemplates?: string[] | undefined, assetTypes?: string[] | undefined) => ILogicalExpression[];
4
+ export declare const fieldExpression: (field: string | string[], value: any, operator?: FieldOperators, weight?: number, fuzzySearch?: boolean) => IExpression[];
5
+ export declare const contentTypeIdExpression: (contentTypeIds: string[], webpageTemplates?: string[], assetTypes?: string[]) => ILogicalExpression[];
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, }?: {
@@ -22,5 +22,5 @@ export declare const orderByExpression: (orderBy: string[]) => ContensisQueryOrd
22
22
  * @param {array} where the where array as you'd provide it to the HTTP API
23
23
  * @returns {array} array of constructed Delivery API Operators
24
24
  */
25
- export declare const customWhereExpressions: (where?: CustomWhereClause | undefined) => IExpression[];
26
- export declare const termExpressions: (searchTerm: string, weightedSearchFields: WeightedSearchField[], fuzzySearch?: boolean | undefined) => any[];
25
+ export declare const customWhereExpressions: (where?: CustomWhereClause) => IExpression[];
26
+ export declare const termExpressions: (searchTerm: string, weightedSearchFields: WeightedSearchField[], fuzzySearch?: boolean, omitSearchFields?: string[]) => any[];
@@ -3,11 +3,11 @@ 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
- export declare const timedSearch: (query: Query, linkDepth?: number, projectId?: string | undefined, env?: string | undefined) => Promise<null | TimedSearchResponse>;
6
+ export declare const timedSearch: (query: Query, linkDepth?: number, projectId?: string, env?: string) => Promise<null | TimedSearchResponse>;
7
7
  export declare const getItemsFromResult: (result?: {
8
8
  duration: number;
9
9
  payload: PagedList<Entry> | any[];
10
- } | undefined) => Entry[];
10
+ }) => Entry[];
11
11
  export declare const extractQuotedPhrases: (searchTerm: string) => string[];
12
12
  export declare const buildUrl: (route: string, params: {
13
13
  [key: string]: string;
@@ -2,7 +2,7 @@ import { QueryParams } from '../models/Queries';
2
2
  import { AppState } from '../models/SearchState';
3
3
  import { Context } from '../models/Enums';
4
4
  import { EnsureSearchAction, SetSearchEntriesAction } from '../models/SearchActions';
5
- declare type QueryParamsMapperParams = {
5
+ type QueryParamsMapperParams = {
6
6
  context: Context;
7
7
  facet: string;
8
8
  action: EnsureSearchAction | SetSearchEntriesAction;
@@ -1,6 +1,6 @@
1
1
  import { LinkDepthApiConfig, LinkDepthApiFilters, LinkFields } from './api.d';
2
2
  import QueryLevelResults from './QueryLevelResults';
3
- export declare type LinkDepthSearchServiceConstuctorArgs = Partial<LinkDepthApiConfig> & {
3
+ export type LinkDepthSearchServiceConstuctorArgs = Partial<LinkDepthApiConfig> & {
4
4
  params: {
5
5
  [key: string]: string | undefined;
6
6
  };
@@ -2,11 +2,11 @@ import { FilterExpression, SearchQueryOptions } from "../../../search";
2
2
  import { Query } from 'contensis-core-api';
3
3
  import { Entry } from 'contensis-delivery-api/lib/models';
4
4
  import { LinkDepthApiFilters } from './api.d';
5
- declare type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
6
- declare type SearchQueryArgs = WithOptional<SearchQueryOptions & {
5
+ type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
6
+ type SearchQueryArgs = WithOptional<SearchQueryOptions & {
7
7
  idFilters?: SearchQueryOptions['filters'];
8
8
  sharedFilters?: SearchQueryOptions['filters'];
9
- }, 'assetTypes' | 'customWhere' | 'dynamicOrderBy' | 'excludeIds' | 'featuredResults' | 'fields' | 'includeInSearchFields' | 'languages' | 'orderBy' | 'pageIndex' | 'searchTerm' | 'webpageTemplates' | 'weightedSearchFields'>;
9
+ }, 'assetTypes' | 'customWhere' | 'dynamicOrderBy' | 'excludeIds' | 'featuredResults' | '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,13 +1,15 @@
1
1
  /// <reference types="node" />
2
2
  import 'isomorphic-fetch';
3
- import express from 'express';
3
+ import { Express } from 'express';
4
4
  import http from 'http';
5
5
  import React from 'react';
6
+ import { deliveryProxy } from './features/reverse-proxy';
6
7
  import { ServerConfig } from "../config";
7
- declare const _default: {
8
- app: import("express-serve-static-core").Express;
9
- apiProxy: any;
8
+ type Exporting = {
9
+ app: Express;
10
+ apiProxy: typeof deliveryProxy;
10
11
  server: http.Server;
11
- start: (ReactApp: React.ComponentType<any>, config: ServerConfig, ServerFeatures: (app: express.Express) => void) => void;
12
+ start: (ReactApp: React.ComponentType<any>, config: ServerConfig, ServerFeatures: (app: Express) => void) => void;
12
13
  };
14
+ declare const _default: Exporting;
13
15
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { ChunkExtractor } from '@loadable/server';
2
2
  import { ServerConfig } from "../../config";
3
- export declare const loadableBundleData: ({ stats, templates }: ServerConfig, staticRoutePath: string, build?: string | undefined) => {
3
+ export declare const loadableBundleData: ({ stats, templates }: ServerConfig, staticRoutePath: string, build?: string) => {
4
4
  stats?: string | null | undefined;
5
5
  templates?: {
6
6
  templateHTML: string;
@@ -8,7 +8,7 @@ export declare const loadableBundleData: ({ stats, templates }: ServerConfig, st
8
8
  templateHTMLFragment: string;
9
9
  } | null | undefined;
10
10
  };
11
- declare type LoadableChunkExtractors = {
11
+ type LoadableChunkExtractors = {
12
12
  legacy?: ChunkExtractor;
13
13
  modern?: ChunkExtractor;
14
14
  commonLoadableExtractor: ChunkExtractor;
@@ -1 +1 @@
1
- export declare const unhandledExceptionHandler: (handleExceptions?: boolean) => void;
1
+ export declare const unhandledExceptionHandler: (handleExceptions?: boolean | string[]) => void;
@@ -1,2 +1,2 @@
1
- declare var _default: any;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,10 +1,9 @@
1
- declare var _default: React.ComponentType<{
1
+ declare const _default: (wrappedComponentProps: {
2
2
  errorMessage: any;
3
3
  isAuthenticated: any;
4
4
  isLoading: any;
5
5
  user: any;
6
6
  loginUser: any;
7
7
  logoutUser: any;
8
- }>;
8
+ }) => JSX.Element;
9
9
  export default _default;
10
- import React from "react";
@@ -1,5 +1,5 @@
1
- declare var _default: import("react").ComponentType<{
1
+ declare const _default: (wrappedComponentProps: {
2
2
  [x: string]: any;
3
3
  children: any;
4
- }>;
4
+ }) => JSX.Element;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
- declare var _default: import("react").ComponentType<{
1
+ declare const _default: (wrappedComponentProps: {
2
2
  [x: string]: any;
3
3
  children: any;
4
- }>;
4
+ }) => JSX.Element;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
- declare var _default: import("react").ComponentType<{
1
+ declare const _default: (wrappedComponentProps: {
2
2
  [x: string]: any;
3
3
  children: any;
4
- }>;
4
+ }) => JSX.Element;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
- declare var _default: import("react").ComponentType<{
1
+ declare const _default: (wrappedComponentProps: {
2
2
  [x: string]: any;
3
3
  children: any;
4
- }>;
4
+ }) => JSX.Element;
5
5
  export default _default;
@@ -1,12 +1,6 @@
1
1
  export default withLogin;
2
- declare function withLogin(WrappedComponent: any): import("react-redux").ConnectedComponent<import("react").ComponentType<{
3
- [key: string]: any;
4
- }>, import("react-redux").Omit<{
5
- [key: string]: any;
6
- } & {
7
- children?: import("react").ReactNode;
8
- }, "error" | "isError" | "isLoading" | "user" | "isAuthenticated" | "isAuthenticationError" | "loginUser" | "logoutUser" | "authenticationError"> | import("react-redux").Omit<import("react").ClassAttributes<import("react").Component<{
9
- [key: string]: any;
10
- }, any, any>> & {
11
- [key: string]: any;
12
- }, "error" | "isError" | "isLoading" | "user" | "isAuthenticated" | "isAuthenticationError" | "loginUser" | "logoutUser" | "authenticationError">>;
2
+ declare function withLogin(WrappedComponent: any): {
3
+ (): JSX.Element;
4
+ displayName: string;
5
+ WrappedComponent: any;
6
+ };
@@ -1,12 +1,6 @@
1
1
  export default withRegistration;
2
- declare function withRegistration(WrappedComponent: any): import("react-redux").ConnectedComponent<import("react").ComponentType<{
2
+ declare function withRegistration(WrappedComponent: any): import("react-redux").ConnectedComponent<(wrappedComponentProps: {
3
3
  [key: string]: any;
4
- }>, import("react-redux").Omit<{
5
- [key: string]: any;
6
- } & {
7
- children?: import("react").ReactNode;
8
- }, "error" | "isLoading" | "user" | "registerUser" | "isSuccess"> | import("react-redux").Omit<import("react").ClassAttributes<import("react").Component<{
9
- [key: string]: any;
10
- }, any, any>> & {
4
+ }) => JSX.Element, import("react-redux").Omit<{
11
5
  [key: string]: any;
12
6
  }, "error" | "isLoading" | "user" | "registerUser" | "isSuccess">>;
@@ -1,5 +1,5 @@
1
- export function loginUser(username: any, password: any): any;
2
- export function logoutUser(redirectPath: any): any;
1
+ export function loginUser(username: any, password: any, cookies: any): any;
2
+ export function logoutUser(redirectPath: any, cookies: any): any;
3
3
  export function registerUser(user: any, mappers: any): any;
4
4
  export function requestPasswordReset(userEmailObject: any): any;
5
5
  export function resetPassword(resetPasswordObject: any): any;
@@ -8,6 +8,12 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
8
8
  authenticationState: {
9
9
  isLoading: boolean;
10
10
  };
11
+ }> | import("redux-saga/effects").PutEffect<{
12
+ type: string;
13
+ authenticationState: {
14
+ isError: boolean;
15
+ errorMessage: any;
16
+ };
11
17
  }> | import("redux-saga/effects").CallEffect<Generator<Promise<{
12
18
  authenticationState: {
13
19
  clientCredentials: null;
@@ -25,15 +31,10 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
25
31
  }>, void, {
26
32
  authenticationState: any;
27
33
  user: any;
28
- }>> | import("redux-saga/effects").PutEffect<{
29
- type: string;
30
- authenticationState: {
31
- isError: boolean;
32
- errorMessage: any;
33
- };
34
- }>, any, [any, any]>> | import("redux-saga/effects").PutEffect<{
34
+ }>>, any, [any, any]>> | import("redux-saga/effects").PutEffect<{
35
35
  type: string;
36
+ cookies: any;
36
37
  securityToken: any;
37
- }>, void, any>;
38
+ }>, any, any>;
38
39
  export function refreshSecurityToken(): Generator<any, void, unknown>;
39
40
  export const loginSagas: import("redux-saga/effects").ForkEffect<never>[];
@@ -11,15 +11,15 @@ export declare const selectUserIsError: (state: AppState) => any;
11
11
  */
12
12
  export declare const selectUserAuthenticationErrorMessage: (state: AppState) => any;
13
13
  export declare const selectUserErrorMessage: (state: AppState) => any;
14
- export declare const selectClientCredentials: (state: AppState, returnType?: StateType | undefined) => any;
15
- export declare const selectUser: (state: AppState, returnType?: StateType | undefined) => any;
14
+ export declare const selectClientCredentials: (state: AppState, returnType?: StateType) => any;
15
+ export declare const selectUser: (state: AppState, returnType?: StateType) => any;
16
16
  export declare const selectUserIsZengentiStaff: (state: AppState) => any;
17
17
  export declare const selectUserGuid: (state: AppState) => any;
18
18
  export declare const selectUsername: (state: AppState) => any;
19
19
  export declare const selectUserEmail: (state: AppState) => any;
20
- export declare const selectUserGroups: (state: AppState, returnType?: StateType | undefined) => any;
20
+ export declare const selectUserGroups: (state: AppState, returnType?: StateType) => any;
21
21
  export declare const selectUserSecurityToken: (state: AppState) => any;
22
- export declare const selectUserRegistration: (state: AppState, returnType?: StateType | undefined) => any;
22
+ export declare const selectUserRegistration: (state: AppState, returnType?: StateType) => any;
23
23
  export declare const selectUserRegistrationError: (state: AppState) => any;
24
24
  export declare const selectUserRegistrationIsLoading: (state: AppState) => any;
25
25
  export declare const selectUserRegistrationIsSuccess: (state: AppState) => any;
@@ -0,0 +1,8 @@
1
+ export declare const LOGIN_COOKIE = "ContensisCMSUserName";
2
+ export declare const REFRESH_TOKEN_COOKIE = "RefreshToken";
3
+ export type CookieObject = {
4
+ [name: string]: any;
5
+ };
6
+ export declare const findLoginCookies: (cookies: CookieObject | string) => string | {
7
+ [k: string]: any;
8
+ };
@@ -1,5 +1,17 @@
1
+ type Cookies = {
2
+ [k: string]: string;
3
+ };
1
4
  export declare class CookieHelper {
2
- static GetCookie(name: any): string | null;
3
- static SetCookie(name: any, value: any, maxAgeDays?: number): void;
4
- static DeleteCookie(name: any): void;
5
+ private cookies;
6
+ private setCookie;
7
+ private removeCookie;
8
+ get raw(): Cookies;
9
+ constructor(cookies: {
10
+ [k: string]: string;
11
+ }, setCookie: CookieHelper['setCookie'], removeCookie: CookieHelper['removeCookie']);
12
+ GetCookie(name: string): string | null;
13
+ SetCookie(name: string, value: string, maxAgeDays?: number): void;
14
+ DeleteCookie(name: string): void;
5
15
  }
16
+ export declare const mapCookieHeader: (cookies: any) => any;
17
+ export {};
@@ -3,19 +3,39 @@ export class LoginHelper {
3
3
  static WSFED_LOGIN: boolean;
4
4
  static LOGIN_ROUTE: string;
5
5
  static ACCESS_DENIED_ROUTE: string;
6
- static SetLoginCookies({ contensisClassicToken, refreshToken }: {
6
+ static withCookies: (cookieHelper: any) => LoginHelper;
7
+ static GetUserDetails: (client: any) => Promise<(Error | {
8
+ groups: any;
9
+ } | null)[]>;
10
+ static ClientRedirectToHome(location: any): void;
11
+ static ClientRedirectToSignInPage(redirectPath: any): Promise<void>;
12
+ static GetAccessDeniedRoute(originalPath: any): string;
13
+ static ClientRedirectToAccessDeniedPage(originalPath: any): void;
14
+ static ClientRedirectToPath(redirectPath: any): void;
15
+ static WsFedLogin(redirectUri: any): Promise<void>;
16
+ static RemoveSecurityTokenQuery(): void;
17
+ static WsFedLogout(redirectPath: any): Promise<void>;
18
+ static GetCredentialsForSecurityToken(securityToken: any): Promise<undefined[] | Error[] | {
19
+ message: string;
20
+ }[] | {
21
+ message: string;
22
+ data: any;
23
+ }[]>;
24
+ constructor(cookies: any);
25
+ cookies: any;
26
+ SetLoginCookies({ contensisClassicToken, refreshToken }: {
7
27
  contensisClassicToken: any;
8
28
  refreshToken: any;
9
29
  }): void;
10
- static GetCachedCredentials(): {
30
+ GetCachedCredentials(): {
11
31
  bearerToken: null;
12
32
  bearerTokenExpiryDate: null;
13
- refreshToken: string | null;
33
+ refreshToken: any;
14
34
  refreshTokenExpiryDate: null;
15
- contensisClassicToken: string | null;
35
+ contensisClassicToken: any;
16
36
  };
17
- static ClearCachedCredentials(): void;
18
- static LoginUser({ username, password, clientCredentials }: {
37
+ ClearCachedCredentials(): void;
38
+ LoginUser({ username, password, clientCredentials }: {
19
39
  username: any;
20
40
  password: any;
21
41
  clientCredentials: any;
@@ -30,21 +50,5 @@ export class LoginHelper {
30
50
  groups: any;
31
51
  } | null | undefined;
32
52
  }>;
33
- static GetUserDetails: (client: any) => Promise<(Error | {
34
- groups: any;
35
- } | null)[]>;
36
- static LogoutUser(redirectPath: any): void;
37
- static ClientRedirectToHome(location: any): void;
38
- static ClientRedirectToSignInPage(redirectPath: any): Promise<void>;
39
- static ClientRedirectToAccessDeniedPage(originalPath: any): void;
40
- static ClientRedirectToPath(redirectPath: any): void;
41
- static WsFedLogin(redirectUri: any): Promise<void>;
42
- static RemoveSecurityTokenQuery(): void;
43
- static WsFedLogout(redirectPath: any): Promise<void>;
44
- static GetCredentialsForSecurityToken(securityToken: any): Promise<undefined[] | Error[] | {
45
- message: string;
46
- }[] | {
47
- message: string;
48
- data: any;
49
- }[]>;
53
+ LogoutUser(redirectPath: any): void;
50
54
  }
@@ -0,0 +1,25 @@
1
+ import { VersionStatus } from 'contensis-core-api';
2
+ import { Client, Query } from 'contensis-delivery-api';
3
+ import { INodeOperations, NodeGetRootOptions } from 'contensis-delivery-api/lib/models';
4
+ import { DeliveryApi } from './ContensisDeliveryApi';
5
+ import { LruCache } from './LruCache';
6
+ import { CookieObject } from "../user/util/CookieConstants";
7
+ declare class CachedSearch {
8
+ cache: LruCache;
9
+ cookies?: CookieObject;
10
+ constructor(cookies?: CookieObject);
11
+ getClient(...args: Parameters<DeliveryApi['getClient']>): Client;
12
+ search(query: Query, linkDepth?: number, project?: string): Promise<import("contensis-core-api").PagedList<import("contensis-delivery-api/lib/models").Entry>>;
13
+ searchUsingPost(query: Query, linkDepth?: number, project?: string): any;
14
+ get(id: string, linkDepth?: number, versionStatus?: VersionStatus, project?: string): Promise<import("contensis-delivery-api/lib/models").Entry>;
15
+ getContentType(id: string, project?: string): Promise<import("contensis-core-api").ContentType>;
16
+ getRootNode(options: NodeGetRootOptions, project?: string): Promise<import("contensis-delivery-api/lib/models").Node>;
17
+ getNode(options: Parameters<INodeOperations['get']>[0], project?: string): Promise<import("contensis-delivery-api/lib/models").Node>;
18
+ getAncestors(options: Parameters<INodeOperations['getAncestors']>[0], project?: string): Promise<import("contensis-delivery-api/lib/models").Node[]>;
19
+ getChildren(options: Parameters<INodeOperations['getChildren']>[0], project?: string): Promise<import("contensis-delivery-api/lib/models").Node[]>;
20
+ getSiblings(options: Parameters<INodeOperations['getSiblings']>[0], project?: string): Promise<import("contensis-delivery-api/lib/models").Node[]>;
21
+ request<T extends () => Promise<any>>(key: string, execute: T): ReturnType<T>;
22
+ }
23
+ export declare const cachedSearch: CachedSearch;
24
+ export declare const cachedSearchWithCookies: (cookies?: CookieObject) => CachedSearch;
25
+ export {};