@zengenti/contensis-react-base 3.0.0-beta.8 → 3.0.0-beta.80
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.
- package/README.md +1 -1
- package/cjs/{App-e3200f18.js → App-5a34ea98.js} +228 -181
- package/cjs/App-5a34ea98.js.map +1 -0
- package/cjs/{RouteLoader-df3de0cb.js → RouteLoader-2675e1c9.js} +31 -23
- package/cjs/RouteLoader-2675e1c9.js.map +1 -0
- package/cjs/{ToJs-697ace9f.js → ToJs-a9a8522b.js} +39 -34
- package/cjs/ToJs-a9a8522b.js.map +1 -0
- package/cjs/{actions-a24bf46e.js → actions-8dc9e8de.js} +5 -4
- package/cjs/actions-8dc9e8de.js.map +1 -0
- package/cjs/client.js +22 -44
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +3955 -135
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +547 -580
- package/cjs/forms.js.map +1 -1
- package/cjs/{fromJSLeaveImmer-c00d597f.js → fromJSLeaveImmer-e74c673c.js} +2 -16
- package/cjs/fromJSLeaveImmer-e74c673c.js.map +1 -0
- package/cjs/{login-bc55ee33.js → login-6b9de6a1.js} +92 -55
- package/cjs/login-6b9de6a1.js.map +1 -0
- package/cjs/{reducers-fde41d6b.js → reducers-3a4f8971.js} +26 -25
- package/cjs/reducers-3a4f8971.js.map +1 -0
- package/cjs/redux.js +6 -5
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +5 -4
- package/cjs/routing.js.map +1 -1
- package/cjs/sagas-594b5ecd.js +2090 -0
- package/cjs/sagas-594b5ecd.js.map +1 -0
- package/cjs/search.js +296 -1915
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-0ec95076.js → selectors-656da4b7.js} +8 -3
- package/cjs/selectors-656da4b7.js.map +1 -0
- package/cjs/setCachingHeaders-ee619bdf.js +12 -0
- package/cjs/setCachingHeaders-ee619bdf.js.map +1 -0
- package/cjs/user.js +21 -12
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +17 -17
- package/cjs/util.js.map +1 -1
- package/cjs/{version-4f0f5fa6.js → version-330551f5.js} +34 -22
- package/cjs/version-330551f5.js.map +1 -0
- package/cjs/{version-be0c7b7a.js → version-eba6d09b.js} +2 -2
- package/{esm/version-ad2ec52c.js.map → cjs/version-eba6d09b.js.map} +1 -1
- package/esm/{App-f9e7d03b.js → App-a973f962.js} +228 -182
- package/esm/App-a973f962.js.map +1 -0
- package/esm/{RouteLoader-027215f2.js → RouteLoader-f607a134.js} +31 -23
- package/esm/RouteLoader-f607a134.js.map +1 -0
- package/esm/{ToJs-46761960.js → ToJs-4e02a04d.js} +38 -32
- package/esm/ToJs-4e02a04d.js.map +1 -0
- package/esm/{actions-b949ef5c.js → actions-180948dd.js} +5 -4
- package/esm/actions-180948dd.js.map +1 -0
- package/esm/client.js +24 -27
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +3953 -134
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +547 -583
- package/esm/forms.js.map +1 -1
- package/esm/{fromJSLeaveImmer-392af4e3.js → fromJSLeaveImmer-0114ffcf.js} +2 -16
- package/esm/fromJSLeaveImmer-0114ffcf.js.map +1 -0
- package/esm/{login-6eab4c94.js → login-508cac0f.js} +92 -55
- package/esm/login-508cac0f.js.map +1 -0
- package/esm/{reducers-d6c0edb1.js → reducers-8e5d6232.js} +26 -25
- package/esm/reducers-8e5d6232.js.map +1 -0
- package/esm/redux.js +8 -7
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +5 -4
- package/esm/routing.js.map +1 -1
- package/esm/sagas-1f2b2aa0.js +2000 -0
- package/esm/sagas-1f2b2aa0.js.map +1 -0
- package/esm/search.js +252 -1856
- package/esm/search.js.map +1 -1
- package/esm/{selectors-8fca7fb2.js → selectors-a5e5835b.js} +9 -6
- package/esm/selectors-a5e5835b.js.map +1 -0
- package/esm/setCachingHeaders-d49060e1.js +10 -0
- package/esm/setCachingHeaders-d49060e1.js.map +1 -0
- package/esm/user.js +23 -14
- package/esm/user.js.map +1 -1
- package/esm/util.js +17 -17
- package/esm/util.js.map +1 -1
- package/esm/{version-ad2ec52c.js → version-2485e2fb.js} +2 -2
- package/{cjs/version-be0c7b7a.js.map → esm/version-2485e2fb.js.map} +1 -1
- package/esm/{version-612d9ef0.js → version-c776a92b.js} +33 -22
- package/esm/version-c776a92b.js.map +1 -0
- package/models/app/pages/VersionInfo/components/VersionInfo.d.ts +1 -1
- package/models/forms/index.d.ts +3 -1
- package/models/index.d.ts +1 -0
- package/models/redux/appstate.d.ts +5 -10
- package/models/redux/sagas/navigation.d.ts +1 -1
- package/models/redux/selectors/navigation.d.ts +2 -1
- package/models/routing/components/RouteLoader.d.ts +2 -19
- package/models/routing/redux/actions.d.ts +1 -1
- package/models/routing/redux/selectors.d.ts +1 -1
- package/models/routing/routes.d.ts +9 -3
- package/models/routing/util/expressions.d.ts +3 -2
- package/models/routing/util/queries.d.ts +1 -1
- package/models/search/containers/withListing.d.ts +1 -1
- package/models/search/containers/withSearch.d.ts +1 -1
- package/models/search/hooks/useFacets.hook.d.ts +3 -0
- package/models/search/hooks/useListing.hook.d.ts +3 -0
- package/models/search/hooks/useMinilist.hook.d.ts +2 -9
- package/models/search/index.d.ts +6 -2
- package/models/search/models/Queries.d.ts +8 -5
- package/models/search/models/Search.d.ts +60 -28
- package/models/search/models/SearchActions.d.ts +9 -5
- package/models/search/models/SearchProps.d.ts +52 -7
- package/models/search/models/SearchState.d.ts +5 -1
- package/models/search/models/index.d.ts +3 -1
- package/models/search/redux/actions.d.ts +5 -2
- package/models/search/redux/reducers.d.ts +230 -314
- package/models/search/redux/sagas.d.ts +11 -7
- package/models/search/redux/selectors.d.ts +21 -24
- package/models/search/redux/util.d.ts +1 -0
- package/models/search/search/ContensisDeliveryApi.d.ts +1 -0
- package/models/search/search/expressions.d.ts +5 -8
- package/models/search/{redux → search}/queries.d.ts +0 -0
- package/models/search/search/util.d.ts +14 -0
- package/models/search/transformations/entry-to-filteritem.mapper.d.ts +2 -1
- package/models/search/transformations/filter-to-filterexpression.mapper.d.ts +6 -0
- package/models/search/transformations/filters-to-filterexpressions.mapper.d.ts +3 -0
- package/models/search/transformations/index.d.ts +3 -0
- package/models/search/transformations/queryParams-to-customapi.mapper.d.ts +3 -0
- package/models/search/transformations/state-to-searchuri.d.ts +2 -13
- package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +24 -0
- package/models/server/features/linkdepth-api/QueryLevelResults.d.ts +50 -0
- package/models/server/features/linkdepth-api/api.d.ts +12 -0
- package/models/server/features/linkdepth-api/events-api.config.d.ts +37 -0
- package/models/server/features/linkdepth-api/search.d.ts +31 -0
- package/models/server/features/linkdepth-api/util.d.ts +11 -0
- package/models/server/middleware/bundleManipulation.d.ts +2 -1
- package/models/server/util/bundles.d.ts +17 -21
- package/models/server/util/getVersionInfo.d.ts +1 -0
- package/models/server/util/headers.d.ts +3 -2
- package/models/user/components/Login.d.ts +1 -2
- package/models/user/components/LoginForm.d.ts +1 -2
- package/models/user/hocs/withLogin.d.ts +4 -2
- package/models/user/hocs/withRegistration.d.ts +2 -0
- package/models/user/hooks/useLogin.d.ts +5 -3
- package/models/user/redux/reducers.d.ts +4 -5
- package/models/user/redux/sagas/login.d.ts +11 -8
- package/models/user/redux/selectors.d.ts +12 -6
- package/models/user/util/LoginHelper.class.d.ts +4 -3
- package/models/util/ContensisDeliveryApi.d.ts +4 -4
- package/models/util/json-mapper.d.ts +9 -3
- package/models/util/merge.d.ts +1 -0
- package/package.json +60 -55
- package/CHANGELOG.md +0 -293
- package/cjs/App-e3200f18.js.map +0 -1
- package/cjs/RouteLoader-df3de0cb.js.map +0 -1
- package/cjs/ToJs-697ace9f.js.map +0 -1
- package/cjs/actions-a24bf46e.js.map +0 -1
- package/cjs/fromJSLeaveImmer-c00d597f.js.map +0 -1
- package/cjs/login-bc55ee33.js.map +0 -1
- package/cjs/reducers-fde41d6b.js.map +0 -1
- package/cjs/selectors-0ec95076.js.map +0 -1
- package/cjs/version-4f0f5fa6.js.map +0 -1
- package/esm/App-f9e7d03b.js.map +0 -1
- package/esm/RouteLoader-027215f2.js.map +0 -1
- package/esm/ToJs-46761960.js.map +0 -1
- package/esm/actions-b949ef5c.js.map +0 -1
- package/esm/fromJSLeaveImmer-392af4e3.js.map +0 -1
- package/esm/login-6eab4c94.js.map +0 -1
- package/esm/reducers-d6c0edb1.js.map +0 -1
- package/esm/selectors-8fca7fb2.js.map +0 -1
- package/esm/version-612d9ef0.js.map +0 -1
- package/models/search/transformations/filters-to-filterexpression.d.ts +0 -1
- package/models/search/transformations/filters-to-filterexpression.mapper.d.ts +0 -2
- package/models/server/features/caching/cacheHashing.d.ts +0 -1
- package/package-lock.json +0 -14093
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
import { Context } from '../models/Enums';
|
|
2
2
|
import { QueryParams as QueryParams2 } from '../models/Queries';
|
|
3
|
-
import { CustomApi,
|
|
4
|
-
import { AppState, Facet, Facets, Filters, Paging, Tab } from '../models/SearchState';
|
|
3
|
+
import { CustomApi, SearchQueryParams } from '../models/Search';
|
|
4
|
+
import { AppState, Facet, Facets, Filters, Paging, SelectedFilters, Tab } from '../models/SearchState';
|
|
5
5
|
declare 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
|
-
export declare const getCurrentTab: (state: AppState) =>
|
|
10
|
+
export declare const getCurrentTab: (state: AppState) => number;
|
|
11
11
|
export declare const getFacets: (state: AppState, returnType?: StateType | undefined) => Facets;
|
|
12
12
|
export declare const getTabFacets: (state: AppState) => {
|
|
13
13
|
[k: string]: Facet;
|
|
14
14
|
};
|
|
15
15
|
export declare const getFacetTitles: (state: AppState) => {
|
|
16
|
+
isSelected: boolean;
|
|
16
17
|
key: string;
|
|
17
18
|
title: string | undefined;
|
|
18
19
|
totalCount: number;
|
|
19
20
|
}[];
|
|
20
|
-
export declare const getFacet: (state: AppState, facetName?: string, context?: Context, returnType?: StateType | undefined) => Facet;
|
|
21
|
+
export declare const getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType | undefined) => Facet;
|
|
21
22
|
export declare const getListing: (state: AppState, listing?: string) => Facet;
|
|
22
23
|
export declare const getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => Filters;
|
|
23
24
|
export declare const getRenderableFilters: (state: AppState, facet?: string, context?: Context) => Filters;
|
|
24
25
|
export declare const getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => string[];
|
|
25
|
-
export declare const getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) =>
|
|
26
|
-
[k: string]: string[];
|
|
27
|
-
};
|
|
26
|
+
export declare const getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) => SelectedFilters;
|
|
28
27
|
export declare const getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
|
|
29
28
|
export declare const getIsInternalPaging: (state: AppState, current: string, context?: Context) => boolean;
|
|
30
29
|
export declare const getIsLoaded: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
|
|
31
30
|
export declare const getIsLoading: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
|
|
32
31
|
export declare const getIsSsr: (state: AppState) => boolean;
|
|
33
|
-
export declare const getFeaturedResults: (state: AppState, current?: string, context?: Context) => any[];
|
|
32
|
+
export declare const getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
|
|
34
33
|
export declare const getPaging: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => Paging;
|
|
35
34
|
export declare const getPageIndex: (state: AppState, current?: string, context?: Context) => number;
|
|
36
35
|
export declare const getPrevPageIndex: (state: AppState, current?: string, context?: Context) => number;
|
|
@@ -40,30 +39,31 @@ export declare const getTotalCount: (state: AppState, current?: string, context?
|
|
|
40
39
|
export declare const getSearchTerm: (state: AppState) => string;
|
|
41
40
|
export declare const getSearchTabs: (state: AppState, returnType?: StateType | undefined) => Tab[];
|
|
42
41
|
export declare const getQueryParams: (state: AppState, current?: string, context?: Context) => Record<string, any>;
|
|
43
|
-
export declare const getQueryParameter: <K extends keyof
|
|
42
|
+
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
43
|
state: AppState;
|
|
45
44
|
facet?: string | undefined;
|
|
46
45
|
context?: Context | undefined;
|
|
47
|
-
}, key: K | K2, ifnull?: any) =>
|
|
46
|
+
}, key: K | K2, ifnull?: any) => SearchQueryParams[K] | QueryParams2[K2];
|
|
48
47
|
export declare const getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType | undefined) => CustomApi;
|
|
49
48
|
export declare const getCustomEnv: (state: AppState, current: string, context?: Context) => any;
|
|
50
49
|
export declare const getTabsAndFacets: (state: AppState, returnType?: StateType | undefined) => any;
|
|
51
|
-
export declare const getSearchTotalCount: (state: AppState) =>
|
|
50
|
+
export declare const getSearchTotalCount: (state: AppState) => number;
|
|
52
51
|
export declare const getFacetsTotalCount: (state: AppState) => number;
|
|
53
52
|
export declare const selectFacets: {
|
|
54
53
|
getCurrent: (state: AppState) => string;
|
|
55
|
-
getCurrentTab: (state: AppState) =>
|
|
54
|
+
getCurrentTab: (state: AppState) => number;
|
|
56
55
|
getCustomApi: (state: AppState, current: string, context?: Context, returnType?: StateType | undefined) => CustomApi;
|
|
57
56
|
getCustomEnv: (state: AppState, current: string, context?: Context) => any;
|
|
58
|
-
getFacet: (state: AppState, facetName?: string, context?: Context, returnType?: StateType | undefined) => Facet;
|
|
57
|
+
getFacet: (state: AppState, facetName?: string, context?: Context | string, returnType?: StateType | undefined) => Facet;
|
|
59
58
|
getFacetTitles: (state: AppState) => {
|
|
59
|
+
isSelected: boolean;
|
|
60
60
|
key: string;
|
|
61
61
|
title: string | undefined;
|
|
62
62
|
totalCount: number;
|
|
63
63
|
}[];
|
|
64
64
|
getFacets: (state: AppState, returnType?: StateType | undefined) => Facets;
|
|
65
65
|
getFacetsTotalCount: (state: AppState) => number;
|
|
66
|
-
getFeaturedResults: (state: AppState, current?: string, context?: Context) => any[];
|
|
66
|
+
getFeaturedResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
|
|
67
67
|
getFilters: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => Filters;
|
|
68
68
|
getFiltersToLoad: (state: AppState, facet: string, context?: Context, returnType?: StateType | undefined) => string[];
|
|
69
69
|
getIsLoaded: (state: AppState, context?: Context, facet?: string | undefined) => boolean;
|
|
@@ -75,8 +75,8 @@ export declare const selectFacets: {
|
|
|
75
75
|
getQueryParams: (state: AppState, facet: string) => Record<string, any>;
|
|
76
76
|
getQueryParameter: ({ state, facet }: {
|
|
77
77
|
state: AppState;
|
|
78
|
-
facet
|
|
79
|
-
}, key: keyof
|
|
78
|
+
facet?: string | undefined;
|
|
79
|
+
}, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
|
|
80
80
|
getRenderableFilters: (state: AppState, facet?: string, context?: Context) => Filters;
|
|
81
81
|
getResults: (state: AppState, current?: string, context?: Context, returnType?: StateType | undefined) => any[];
|
|
82
82
|
getTabFacets: (state: AppState) => {
|
|
@@ -86,10 +86,8 @@ export declare const selectFacets: {
|
|
|
86
86
|
getTotalCount: (state: AppState, current?: string, context?: Context) => number;
|
|
87
87
|
getSearchTabs: (state: AppState, returnType?: StateType | undefined) => Tab[];
|
|
88
88
|
getSearchTerm: (state: AppState) => string;
|
|
89
|
-
getSearchTotalCount: (state: AppState) =>
|
|
90
|
-
getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) =>
|
|
91
|
-
[k: string]: string[];
|
|
92
|
-
};
|
|
89
|
+
getSearchTotalCount: (state: AppState) => number;
|
|
90
|
+
getSelectedFilters: (state: AppState, facet?: string, context?: Context, returnType?: StateType | undefined) => SelectedFilters;
|
|
93
91
|
};
|
|
94
92
|
export declare const selectListing: {
|
|
95
93
|
getCurrent: (state: AppState) => string;
|
|
@@ -107,15 +105,14 @@ export declare const selectListing: {
|
|
|
107
105
|
getQueryParameter: ({ state, facet }: {
|
|
108
106
|
state: AppState;
|
|
109
107
|
facet?: string | undefined;
|
|
110
|
-
}, key: keyof
|
|
108
|
+
}, key: keyof SearchQueryParams | keyof QueryParams2, ifnull: any) => any;
|
|
111
109
|
getRenderableFilters: (state: AppState, listing?: string) => Filters;
|
|
112
110
|
getResults: (state: AppState, listing?: string) => any[];
|
|
113
111
|
getSearchTerm: (state: AppState) => string;
|
|
114
112
|
getTotalCount: (state: AppState, listing?: string) => number;
|
|
115
|
-
getSelectedFilters: (state: AppState, listing?: string) =>
|
|
116
|
-
[k: string]: string[];
|
|
117
|
-
};
|
|
113
|
+
getSelectedFilters: (state: AppState, listing?: string) => SelectedFilters;
|
|
118
114
|
};
|
|
119
115
|
export declare const selectCurrentPath: (state: AppState) => any;
|
|
116
|
+
export declare const selectCurrentProject: (state: AppState) => any;
|
|
120
117
|
export declare const selectVersionStatus: (state: AppState) => any;
|
|
121
118
|
export {};
|
|
@@ -23,3 +23,4 @@ export declare const runSearch: (action: EnsureSearchAction | SetSearchEntriesAc
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const filterParamsChanged: (action: EnsureSearchAction | SetSearchEntriesAction, state?: AppState | undefined) => boolean;
|
|
25
25
|
export declare const debugExecuteSearch: (action: EnsureSearchAction | SetSearchEntriesAction, state: AppState) => void;
|
|
26
|
+
export declare const scrollTop: (scrollYPos: number) => void;
|
|
@@ -16,6 +16,7 @@ declare class CachedSearch {
|
|
|
16
16
|
request(key: any, execute: any): any;
|
|
17
17
|
extendTaxonomyNode(node: any): any;
|
|
18
18
|
getTaxonomyId(node: any): any;
|
|
19
|
+
fetch(uri: any, opts?: {}): any;
|
|
19
20
|
}
|
|
20
21
|
import { Client } from "contensis-delivery-api";
|
|
21
22
|
declare class LruCache {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { IExpression, ILogicalExpression, VersionStatus } from 'contensis-core-api';
|
|
1
|
+
import { ContensisQueryOrderBy, IExpression, ILogicalExpression, VersionStatus } from 'contensis-core-api';
|
|
2
2
|
import { CustomWhereClause, WeightedSearchField } from '../models/Search';
|
|
3
|
-
import { FieldOperators } from '../models/Queries';
|
|
3
|
+
import { FieldOperators, FilterExpression } from '../models/Queries';
|
|
4
4
|
export declare const fieldExpression: (field: string | string[], value: any, operator?: FieldOperators, weight?: number | undefined) => IExpression[];
|
|
5
5
|
export declare const contentTypeIdExpression: (contentTypeIds: string[], webpageTemplates?: string[] | undefined, assetTypes?: string[] | undefined) => ILogicalExpression[];
|
|
6
|
-
export declare const filterExpressions: (filters:
|
|
7
|
-
key: string;
|
|
8
|
-
value: string;
|
|
9
|
-
operator: FieldOperators;
|
|
10
|
-
}[]) => IExpression[];
|
|
6
|
+
export declare const filterExpressions: (filters: FilterExpression[], isOptional?: boolean) => IExpression[];
|
|
11
7
|
export declare const dataFormatExpression: (contentTypeIds: string[], dataFormat?: string) => ILogicalExpression[];
|
|
12
8
|
export declare const featuredResultsExpression: ({ contentTypeId, fieldId, fieldValue, }?: {
|
|
13
9
|
contentTypeId?: string | string[] | undefined;
|
|
@@ -17,8 +13,9 @@ export declare const featuredResultsExpression: ({ contentTypeId, fieldId, field
|
|
|
17
13
|
export declare const languagesExpression: (languages: string[]) => IExpression[];
|
|
18
14
|
export declare const includeInSearchExpressions: (webpageTemplates: string[], includeInSearchFields: string[]) => IExpression[];
|
|
19
15
|
export declare const defaultExpressions: (versionStatus: VersionStatus) => IExpression[];
|
|
16
|
+
export declare const includeIdsExpression: (includeIds: string[]) => IExpression[];
|
|
20
17
|
export declare const excludeIdsExpression: (excludeIds: string[]) => ILogicalExpression[];
|
|
21
|
-
export declare const orderByExpression: (orderBy: string[]) =>
|
|
18
|
+
export declare const orderByExpression: (orderBy: string[]) => ContensisQueryOrderBy;
|
|
22
19
|
/**
|
|
23
20
|
* Accept HTTP style objects and map them to
|
|
24
21
|
* their equivalent JS client "Op" expressions
|
|
File without changes
|
|
@@ -12,6 +12,20 @@ export declare const extractQuotedPhrases: (searchTerm: string) => string[];
|
|
|
12
12
|
export declare const buildUrl: (route: string, params: {
|
|
13
13
|
[key: string]: string;
|
|
14
14
|
}) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Returns all params from the current route query string or static route
|
|
17
|
+
* Supply static route argument if reading parameters from the route path
|
|
18
|
+
* Supply location argument for the params to be read in SSR
|
|
19
|
+
* @param staticRoute Matched static route from react-router 5 or 6
|
|
20
|
+
* @param location location object containing at least pathname and search
|
|
21
|
+
* @returns Keyed params object
|
|
22
|
+
*/
|
|
23
|
+
export declare const routeParams: (staticRoute?: any, location?: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
pathname: string;
|
|
26
|
+
search: string;
|
|
27
|
+
hash?: string | undefined;
|
|
28
|
+
} | undefined) => any;
|
|
15
29
|
export declare const callCustomApi: <T>(customApi: CustomApi, filters: {
|
|
16
30
|
[key: string]: string;
|
|
17
31
|
}) => Promise<T>;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
state: AppState;
|
|
4
|
-
facet?: string;
|
|
5
|
-
orderBy?: string;
|
|
6
|
-
pageIndex: number;
|
|
7
|
-
term?: string;
|
|
8
|
-
};
|
|
9
|
-
declare const mapStateToSearchUri: (params: SearchStateParams) => {
|
|
10
|
-
path: Location['pathname'];
|
|
11
|
-
search: Location['search'];
|
|
12
|
-
hash: Location['hash'];
|
|
13
|
-
};
|
|
1
|
+
import { NavigateMapper } from '../models/Search';
|
|
2
|
+
declare const mapStateToSearchUri: NavigateMapper;
|
|
14
3
|
export default mapStateToSearchUri;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LinkDepthApiConfig, LinkDepthApiFilters, LinkFields } from './api.d';
|
|
2
|
+
import QueryLevelResults from './QueryLevelResults';
|
|
3
|
+
export declare type LinkDepthSearchServiceConstuctorArgs = Partial<LinkDepthApiConfig> & {
|
|
4
|
+
params: {
|
|
5
|
+
[key: string]: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare class LinkDepthSearchService {
|
|
10
|
+
contentTypeIds: string[];
|
|
11
|
+
filters: LinkDepthApiFilters;
|
|
12
|
+
sharedFilters: LinkDepthApiFilters;
|
|
13
|
+
linkFields: LinkFields;
|
|
14
|
+
params: {
|
|
15
|
+
[key: string]: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
debug: boolean;
|
|
18
|
+
queryLevels: QueryLevelResults[];
|
|
19
|
+
constructor({ contentTypeId, filters, sharedFilters, linkFields, params, debug, }: LinkDepthSearchServiceConstuctorArgs);
|
|
20
|
+
DoSearch: () => Promise<any>;
|
|
21
|
+
RunFinalQueries: () => Promise<any>;
|
|
22
|
+
private InitQueryLevels;
|
|
23
|
+
}
|
|
24
|
+
export default LinkDepthSearchService;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PagedList } from 'contensis-core-api';
|
|
2
|
+
import { Entry } from 'contensis-delivery-api/lib/models';
|
|
3
|
+
import { LinkDepthApiFilters, LinkFields } from './api.d';
|
|
4
|
+
declare class QueryLevelResults {
|
|
5
|
+
level: number;
|
|
6
|
+
contentTypeIds: string[];
|
|
7
|
+
linkFieldIds: string[];
|
|
8
|
+
linkFields: LinkFields;
|
|
9
|
+
filters: LinkDepthApiFilters;
|
|
10
|
+
sharedFilters: LinkDepthApiFilters;
|
|
11
|
+
returnEntries: boolean;
|
|
12
|
+
resolveFirstParent: boolean;
|
|
13
|
+
validatedLinks: {
|
|
14
|
+
contentTypeId: string;
|
|
15
|
+
linkFieldId: string;
|
|
16
|
+
entryIds: string[];
|
|
17
|
+
}[];
|
|
18
|
+
parent: QueryLevelResults | undefined;
|
|
19
|
+
children: QueryLevelResults[];
|
|
20
|
+
runFirstQuery: boolean;
|
|
21
|
+
runFinalQuery: boolean;
|
|
22
|
+
private params;
|
|
23
|
+
private debug;
|
|
24
|
+
private firstQuery;
|
|
25
|
+
private firstResults;
|
|
26
|
+
private finalQuery;
|
|
27
|
+
private finalResults;
|
|
28
|
+
constructor({ level, contentTypeIds, linkFields, filters, sharedFilters, returnEntries, resolveFirstParent, params, parent, debug, }: {
|
|
29
|
+
level: number;
|
|
30
|
+
contentTypeIds: string[];
|
|
31
|
+
linkFields: LinkFields;
|
|
32
|
+
filters: LinkDepthApiFilters;
|
|
33
|
+
sharedFilters: LinkDepthApiFilters;
|
|
34
|
+
returnEntries?: boolean;
|
|
35
|
+
resolveFirstParent?: boolean;
|
|
36
|
+
params: {
|
|
37
|
+
[key: string]: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
parent?: QueryLevelResults;
|
|
40
|
+
debug?: boolean;
|
|
41
|
+
});
|
|
42
|
+
AddChild: ({ child }: {
|
|
43
|
+
child: QueryLevelResults;
|
|
44
|
+
}) => void;
|
|
45
|
+
RunFirstQuery: () => Promise<void>;
|
|
46
|
+
RunFinalQuery: () => Promise<void>;
|
|
47
|
+
GetResultsEntries: () => Entry[];
|
|
48
|
+
GetResults: () => PagedList<Entry>;
|
|
49
|
+
}
|
|
50
|
+
export default QueryLevelResults;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Express } from 'express';
|
|
2
|
+
import { LinkDepthApiConfig } from './api.d';
|
|
3
|
+
/**
|
|
4
|
+
* Make a LinkDepth api at the uri specified in middlewareConfig.
|
|
5
|
+
* The api supports a GET request and specified filters are supplied as query-string parameters.
|
|
6
|
+
* The response should be a normal Delivery API response.
|
|
7
|
+
* @param app Express app instance
|
|
8
|
+
* @param middlewareConfig Middleware configuration that represents the content types we want to search within, any filters that are required and any linkFields we wish to search within to derive a set of search results from the entries that contain the linkFields. Each key inside of linkFields represents another "linkDepth" of entries and we can specify all the same contentTypeId, filters, and linkFields of their own. There is no currently no limit on how deep these linkFields can go
|
|
9
|
+
* @returns Returns nothing if uri, contentTypeId or linkFields is not set in middlewareConfig
|
|
10
|
+
*/
|
|
11
|
+
declare const makeLinkDepthApi: (app: Express, middlewareConfig: LinkDepthApiConfig) => void;
|
|
12
|
+
export default makeLinkDepthApi;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const eventsApiConfig: {
|
|
2
|
+
uri: string;
|
|
3
|
+
contentTypeId: string;
|
|
4
|
+
filters: {
|
|
5
|
+
eventTag: string;
|
|
6
|
+
researchEntity: string;
|
|
7
|
+
staffTag: string;
|
|
8
|
+
studentTag: string;
|
|
9
|
+
subject: string;
|
|
10
|
+
};
|
|
11
|
+
sharedFilters: {
|
|
12
|
+
selectedDate: {
|
|
13
|
+
fieldId: string;
|
|
14
|
+
fieldOperator: string;
|
|
15
|
+
};
|
|
16
|
+
futureEventDates: {
|
|
17
|
+
fieldId: string;
|
|
18
|
+
fieldOperator: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
linkFields: {
|
|
22
|
+
eventDates: {
|
|
23
|
+
contentTypeId: string;
|
|
24
|
+
sharedFilters: {
|
|
25
|
+
selectedDate: {
|
|
26
|
+
fieldId: string;
|
|
27
|
+
fieldOperator: string;
|
|
28
|
+
};
|
|
29
|
+
futureEventDates: {
|
|
30
|
+
fieldId: string;
|
|
31
|
+
fieldOperator: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default eventsApiConfig;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FilterExpression, SearchQueryOptions } from "../../../search";
|
|
2
|
+
import { Query } from 'contensis-core-api';
|
|
3
|
+
import { Entry } from 'contensis-delivery-api/lib/models';
|
|
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 & {
|
|
7
|
+
idFilters?: SearchQueryOptions['filters'];
|
|
8
|
+
sharedFilters?: SearchQueryOptions['filters'];
|
|
9
|
+
}, 'assetTypes' | 'customWhere' | 'dynamicOrderBy' | 'excludeIds' | 'featuredResults' | 'fields' | 'includeInSearchFields' | 'languages' | 'orderBy' | 'pageIndex' | 'searchTerm' | 'webpageTemplates' | 'weightedSearchFields'>;
|
|
10
|
+
/**
|
|
11
|
+
* Builds our complete Delivery API Query object from a set of provided arguments
|
|
12
|
+
* @param queryParams
|
|
13
|
+
* @returns Delivery API Query
|
|
14
|
+
*/
|
|
15
|
+
export declare const searchQuery: ({ assetTypes, contentTypeIds, customWhere, fields, filters, idFilters, sharedFilters, pageSize, pageIndex, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryArgs) => Query;
|
|
16
|
+
export declare const appendSearchQueryFilters: (query: Query, idFilters: FilterExpression[]) => void;
|
|
17
|
+
export declare const finalQuery: ({ assetTypes, contentTypeIds, fields, filters, idFilters, sharedFilters, pageSize, pageIndex, orderBy, searchTerm, versionStatus, webpageTemplates, weightedSearchFields, }: SearchQueryArgs, children: Omit<SearchQueryArgs, 'pageSize' | 'pageIndex' | 'versionStatus'>[]) => Query;
|
|
18
|
+
/**
|
|
19
|
+
* Create a filter expression from a provided filters configuration object
|
|
20
|
+
* and populate them based on the presence of that key in params, filter
|
|
21
|
+
* out any filter keys that do not have a value set in params
|
|
22
|
+
* @param f filters configuration from any level
|
|
23
|
+
* @param params request.query object from Express middleware
|
|
24
|
+
* @returns FilterExpression[] we can use to use with searchQuery function
|
|
25
|
+
*/
|
|
26
|
+
export declare const makeFilterExpressions: (f: LinkDepthApiFilters, params: {
|
|
27
|
+
[param: string]: string | undefined;
|
|
28
|
+
}) => FilterExpression[];
|
|
29
|
+
export declare const makeDerivedIdsFilterExpression: (prevFieldId: string, entries: Entry[], ownIds?: boolean, alwaysApplyFilter?: boolean) => FilterExpression[];
|
|
30
|
+
export declare const resolveParentEntries: (parentContentTypeIds: string[], replaceContentTypeIds: string[], parentFieldId: string, results: Entry[], params: any, debug: boolean) => Promise<Entry[]>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Entry } from 'contensis-delivery-api/lib/models';
|
|
2
|
+
import { PagedList } from 'contensis-core-api';
|
|
3
|
+
/**
|
|
4
|
+
* Util class holds our search results helper boilerplate methods
|
|
5
|
+
*/
|
|
6
|
+
export declare class Util {
|
|
7
|
+
static GetIds(entries: Entry[], fieldId?: string): any[];
|
|
8
|
+
static GetItems(result: PagedList<Entry>): Entry[];
|
|
9
|
+
static GetResults(result: PagedList<Entry>): PagedList<Entry> | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const mergeResults: (results: Entry[], parentResults: Entry[], replaceContentTypeIds: string[], linkFieldId: string) => Entry[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RequestHandler } from 'express';
|
|
2
|
-
export declare const bundleManipulationMiddleware: ({ appRootPath, maxage, staticRoutePath, }: {
|
|
2
|
+
export declare const bundleManipulationMiddleware: ({ appRootPath, maxage, staticFolderPath, staticRoutePath, }: {
|
|
3
3
|
appRootPath: string;
|
|
4
4
|
maxage: string;
|
|
5
|
+
staticFolderPath: string;
|
|
5
6
|
staticRoutePath: string;
|
|
6
7
|
}) => RequestHandler;
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
import { ChunkExtractor } from '@loadable/server';
|
|
2
2
|
import { ServerConfig } from "../../config";
|
|
3
|
-
export declare const loadableBundleData: ({ stats, templates }: {
|
|
4
|
-
stats: any;
|
|
5
|
-
templates: any;
|
|
6
|
-
}, staticRoutePath: string, build?: string | undefined) => {
|
|
3
|
+
export declare const loadableBundleData: ({ stats, templates }: ServerConfig, staticRoutePath: string, build?: string | undefined) => {
|
|
7
4
|
stats?: string | null | undefined;
|
|
8
5
|
templates?: {
|
|
9
|
-
templateHTML:
|
|
10
|
-
templateHTMLStatic:
|
|
11
|
-
templateHTMLFragment:
|
|
6
|
+
templateHTML: string;
|
|
7
|
+
templateHTMLStatic: string;
|
|
8
|
+
templateHTMLFragment: string;
|
|
12
9
|
} | null | undefined;
|
|
13
10
|
};
|
|
14
11
|
declare type LoadableChunkExtractors = {
|
|
15
|
-
legacy
|
|
16
|
-
modern
|
|
12
|
+
legacy?: ChunkExtractor;
|
|
13
|
+
modern?: ChunkExtractor;
|
|
17
14
|
commonLoadableExtractor: ChunkExtractor;
|
|
18
|
-
}
|
|
15
|
+
};
|
|
19
16
|
export declare const loadableChunkExtractors: () => LoadableChunkExtractors;
|
|
20
|
-
export declare const getBundleData: (config:
|
|
17
|
+
export declare const getBundleData: (config: ServerConfig, staticRoutePath: string) => {
|
|
21
18
|
default: {
|
|
22
19
|
stats?: string | null | undefined;
|
|
23
20
|
templates?: {
|
|
24
|
-
templateHTML:
|
|
25
|
-
templateHTMLStatic:
|
|
26
|
-
templateHTMLFragment:
|
|
21
|
+
templateHTML: string;
|
|
22
|
+
templateHTMLStatic: string;
|
|
23
|
+
templateHTMLFragment: string;
|
|
27
24
|
} | null | undefined;
|
|
28
25
|
};
|
|
29
26
|
legacy: {
|
|
30
27
|
stats?: string | null | undefined;
|
|
31
28
|
templates?: {
|
|
32
|
-
templateHTML:
|
|
33
|
-
templateHTMLStatic:
|
|
34
|
-
templateHTMLFragment:
|
|
29
|
+
templateHTML: string;
|
|
30
|
+
templateHTMLStatic: string;
|
|
31
|
+
templateHTMLFragment: string;
|
|
35
32
|
} | null | undefined;
|
|
36
33
|
};
|
|
37
34
|
modern: {
|
|
38
35
|
stats?: string | null | undefined;
|
|
39
36
|
templates?: {
|
|
40
|
-
templateHTML:
|
|
41
|
-
templateHTMLStatic:
|
|
42
|
-
templateHTMLFragment:
|
|
37
|
+
templateHTML: string;
|
|
38
|
+
templateHTMLStatic: string;
|
|
39
|
+
templateHTMLFragment: string;
|
|
43
40
|
} | null | undefined;
|
|
44
41
|
};
|
|
45
42
|
};
|
|
46
|
-
export declare const buildBundleTags: (bundles: any, differentialBundles?: boolean, staticRoutePath?: string, attributes?: string) => any;
|
|
47
43
|
export declare const getBundleTags: (loadableExtractor: LoadableChunkExtractors, scripts: ServerConfig['scripts'], staticRoutePath?: string) => string;
|
|
48
44
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVersionInfo: (staticFolderPath: string) => any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
|
|
2
|
+
import { AppState } from "../../redux/appstate";
|
|
3
|
+
export declare const addStandardHeaders: (state: AppState, response: Response, packagejson: any, groups: {
|
|
3
4
|
globalGroups?: any[];
|
|
4
5
|
allowedGroups?: any[];
|
|
5
6
|
}) => void;
|
|
6
|
-
export declare const addVarnishAuthenticationHeaders: (state:
|
|
7
|
+
export declare const addVarnishAuthenticationHeaders: (state: AppState, response: Response, groups?: {
|
|
7
8
|
globalGroups?: any[];
|
|
8
9
|
allowedGroups?: any[];
|
|
9
10
|
}) => void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export default LoginForm;
|
|
2
|
-
declare function LoginForm({
|
|
3
|
-
loginException: any;
|
|
2
|
+
declare function LoginForm({ authenticationError, loading, loginUser }: {
|
|
4
3
|
authenticationError: any;
|
|
5
4
|
loading: any;
|
|
6
5
|
loginUser: any;
|
|
@@ -3,8 +3,10 @@ declare function withLogin(WrappedComponent: any): import("react-redux").Connect
|
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}>, import("react-redux").Omit<{
|
|
5
5
|
[key: string]: any;
|
|
6
|
-
}
|
|
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<{
|
|
7
9
|
[key: string]: any;
|
|
8
10
|
}, any, any>> & {
|
|
9
11
|
[key: string]: any;
|
|
10
|
-
}, "error" | "isLoading" | "user" | "
|
|
12
|
+
}, "error" | "isError" | "isLoading" | "user" | "isAuthenticated" | "isAuthenticationError" | "loginUser" | "logoutUser" | "authenticationError">>;
|
|
@@ -3,6 +3,8 @@ declare function withRegistration(WrappedComponent: any): import("react-redux").
|
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}>, import("react-redux").Omit<{
|
|
5
5
|
[key: string]: any;
|
|
6
|
+
} & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
6
8
|
}, "error" | "isLoading" | "user" | "registerUser" | "isSuccess"> | import("react-redux").Omit<import("react").ClassAttributes<import("react").Component<{
|
|
7
9
|
[key: string]: any;
|
|
8
10
|
}, any, any>> & {
|
|
@@ -2,11 +2,13 @@ export default useLogin;
|
|
|
2
2
|
declare function useLogin(): {
|
|
3
3
|
loginUser: (username: any, password: any) => any;
|
|
4
4
|
logoutUser: (redirectPath: any) => any;
|
|
5
|
-
authenticationError: any;
|
|
6
|
-
authenticationErrorMessage: any;
|
|
7
|
-
error: any;
|
|
8
5
|
errorMessage: any;
|
|
9
6
|
isAuthenticated: any;
|
|
7
|
+
isAuthenticationError: any;
|
|
8
|
+
isError: any;
|
|
10
9
|
isLoading: any;
|
|
11
10
|
user: any;
|
|
11
|
+
authenticationError: any;
|
|
12
|
+
authenticationErrorMessage: any;
|
|
13
|
+
error: any;
|
|
12
14
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export declare const initialUserState: {
|
|
2
2
|
authenticationState: {
|
|
3
|
-
authenticated: boolean;
|
|
4
|
-
authenticationError: boolean;
|
|
5
|
-
authenticationErrorMessage: null;
|
|
6
3
|
clientCredentials: null;
|
|
7
|
-
error: boolean;
|
|
8
4
|
errorMessage: null;
|
|
9
|
-
|
|
5
|
+
isAuthenticated: boolean;
|
|
6
|
+
isAuthenticationError: boolean;
|
|
7
|
+
isError: boolean;
|
|
8
|
+
isLoading: boolean;
|
|
10
9
|
};
|
|
11
10
|
passwordResetRequest: {
|
|
12
11
|
isSending: boolean;
|
|
@@ -6,17 +6,14 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
|
|
|
6
6
|
}[]> | import("redux-saga/effects").PutEffect<{
|
|
7
7
|
type: string;
|
|
8
8
|
authenticationState: {
|
|
9
|
-
|
|
10
|
-
message: any;
|
|
11
|
-
stack: any;
|
|
12
|
-
};
|
|
9
|
+
isLoading: boolean;
|
|
13
10
|
};
|
|
14
11
|
}> | import("redux-saga/effects").CallEffect<Generator<Promise<{
|
|
15
12
|
authenticationState: {
|
|
16
|
-
authenticated: boolean;
|
|
17
|
-
authenticationError: boolean;
|
|
18
|
-
error: boolean;
|
|
19
13
|
clientCredentials: null;
|
|
14
|
+
isAuthenticated: boolean;
|
|
15
|
+
isAuthenticationError: boolean;
|
|
16
|
+
isError: boolean;
|
|
20
17
|
};
|
|
21
18
|
user: Error | {
|
|
22
19
|
groups: any;
|
|
@@ -28,7 +25,13 @@ export function handleRequiresLoginSaga(action: any): Generator<import("redux-sa
|
|
|
28
25
|
}>, void, {
|
|
29
26
|
authenticationState: any;
|
|
30
27
|
user: any;
|
|
31
|
-
}
|
|
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<{
|
|
32
35
|
type: string;
|
|
33
36
|
securityToken: any;
|
|
34
37
|
}>, void, any>;
|